/* ──────────────── FONTS ──────────────── */
/* Import Bitsumishi from Breakdance’s generated CSS */
@import url("https://sheethaus.com/wp-content/uploads/breakdance/font_styles/custom_font_bitsumishi.css");

@import url("https://use.typekit.net/qce1uuy.css");

/* ─────── End of Font Imports ─────── */


/* General Shop Layout & Base Styles */
.custom-product-card .added_to_cart.wc-forward {
	display: none!important;
}

.woocommerce-ordering select.orderby {
	padding: 10px 20px 10px 4px;
	font-family: "Gotham", sans-serif;
}

.custom-product-card .jdgm-prev-badge__text {
	font-family: "Gotham", sans-serif;
}


.custom-shop-sorting { margin-bottom: 20px; display: flex; justify-content: flex-end; }
.custom-shop-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 20px; margin-bottom: 30px; min-height: 200px; /* Min height during AJAX load */ }
@media (min-width: 576px) { .custom-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) and (max-width: 1200px) { .custom-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1201px) { .custom-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.custom-product-card { border: 4px solid #344343; border-radius: 0px; padding: 16px; text-align: center; background-color: #fff; display: flex; flex-direction: column; justify-content: space-between; transition: box-shadow 0.3s ease; }
.custom-product-card:hover { box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, .25), 0px 1px 3px -1px rgba(152, 152, 152, .2); }
.custom-product-link { text-decoration: none; color: inherit; }
.custom-product-card img { max-width: 100%; height: auto; margin-bottom: 10px; border-radius: 4px; }
.custom-product-title { font-family: "Bitsumishi", sans-serif; font-size: 18px!important; margin: 10px 0; color: #344343;  text-align: left; /* Ensure title is left aligned if card is centered */ }
.custom-product-price { font-family: "Gotham", sans-serif; font-size: 16px; color: #555; margin-bottom: 10px; text-align: left; /* Ensure price is left aligned */ }
.custom-product-price .price { font-weight: bold; }

/* Review Styles (Judge.me & WooCommerce Native) */
.custom-product-judgeme-reviews,
.custom-product-rating {
    display: flex;         /* Use flexbox for alignment */
    flex-wrap: wrap;       /* Allow items to wrap if necessary */
    align-items: center;   /* Vertically center stars and text */
    justify-content: flex-start; /* Align content to the left */
    gap: 0.3em 0.5em;      /* Row gap, Column gap (for stars and text, then next line if wrapped) */
    margin-bottom: 10px;
    text-align: left;      /* Fallback for text alignment */
}

/* Judge.me stars container (jdgm_get_widget_stars outputs .jdgm-star-rating) */
.custom-product-judgeme-reviews .jdgm-star-rating {
    margin: 0; /* Judge.me styles this internally. Ensure it doesn't have conflicting margins. */
    flex-shrink: 0; /* Prevent stars from shrinking if space is tight */
}

/* WooCommerce native rating block (output by wc_get_rating_html) */
.custom-product-rating .woocommerce-product-rating {
    display: flex; /* Make inner WC rating block also flex if needed */
    align-items: center;
    gap: 0.5em;
    margin: 0; /* Remove default margins */
    flex-shrink: 0; /* Prevent stars/text from shrinking */
}
.custom-product-rating .star-rating {
    margin: 0; /* Remove default WooCommerce centering margins */
    /* display: inline-block; is default for .star-rating */
}
/* WooCommerce may output text like "Rated X.XX out of 5" after stars, style it if needed */
.custom-product-rating .woocommerce-product-rating .star-rating + * {
    font-size: 0.85em; /* Example, adjust as needed */
    color: #555555;
}


.custom-review-count-text {
    font-size: 0.85em; /* Adjust as needed */
    color: #555555;    /* Adjust color as needed */
    line-height: 1.2;  /* Helps align with stars if font sizes differ */
    /* white-space: nowrap; /* Optional: prevent this specific text from wrapping */
}


.custom-variations-form { margin-top: 10px; text-align: left; /* Ensure form elements align left */ }
.custom-variation-select-wrap { margin-bottom: 10px; }
.custom-variation-select-wrap label { display: block; margin-bottom: 5px; font-size: 14px; font-family: "Gotham", sans-serif; text-align: left;}
.custom-product-attribute { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-family: "Gotham", sans-serif; }
.custom-ajax-add-to-cart-btn { border-radius: 8px; padding: 16px 20px; background-color: #7b5642; border: 1px solid transparent; width: 100%; color: #fff !important; transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out; cursor: pointer; font-family: "Bitsumishi", sans-serif; font-size: 20px; letter-spacing: 2px; text-decoration: none; display: inline-block; box-sizing: border-box; margin-top: auto; text-align: center; }
.custom-ajax-add-to-cart-btn:hover { background-color: transparent; color: #344343!important; border: 1px solid #7b5642; }
.custom-ajax-add-to-cart-btn:disabled, .custom-ajax-add-to-cart-btn.loading { opacity: 0.7; cursor: not-allowed; }
.custom-ajax-add-to-cart-btn.loading::after { content: ' ...'; }

/* Success Popup Styles */
.custom-shop-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 10001; }
.custom-shop-success-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #ffffff; color: #333; border-radius: 0px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); z-index: 10002; width: 100%; max-width: 720px; padding: 0; font-family: "Gotham", sans-serif; }
.popup-header { display: flex; align-items: center; padding: 15px 20px;  }
.popup-success-icon { color: #4CAF50; font-size: 20px; margin-right: 10px; line-height: 1; }
.popup-title { font-size: 18px!important; font-weight: 600; margin: 0; flex-grow: 1; color: #202020; font-family: "Bitsumishi", sans-serif; letter-spacing: 2px; }
.popup-close-button { background: none; border: none; font-size: 28px; color: #777; cursor: pointer; padding: 0 5px; line-height: 1; }
.popup-close-button:hover { color: #333; }
.popup-product-info { display: flex; align-items: center; padding: 20px; gap: 15px; }
.popup-product-image img { width: 60px; height: auto; max-height: 60px; object-fit: contain; border: 1px solid #eee; border-radius: 4px; }
.popup-product-name { font-size: 15px; line-height: 1.4; color: #333; font-family: "Gotham", sans-serif; }
.popup-actions { display: flex; justify-content: flex-start; padding: 15px 20px; gap: 10px;  }
.popup-actions button { transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out; cursor: pointer; text-decoration: none; box-sizing: border-box; text-align: center;  }
.popup-continue-shopping { padding: 16px 20px; border-radius: 8px; font-family: "Bitsumishi", sans-serif; font-size: 20px; letter-spacing: 2px; background-color: #fff; color: #344343; border: 1px solid #7b5642; }
.popup-continue-shopping:hover { background-color: #7b5642; color: #fff; }
.popup-go-to-basket { border-radius: 8px; padding: 16px 20px; background-color: #7b5642; border: 1px solid transparent; color: #fff !important; font-family: "Bitsumishi", sans-serif; font-size: 20px; letter-spacing: 2px; }
.popup-go-to-basket:hover { background-color: #fff; color: #344343!important; border: 1px solid #7b5642; }

/* Mobile Filter Sidebar & Toggle Styles */
.custom-shop-filter-toggle-btn { display: none; margin-bottom: 20px; padding: 10px 20px; background-color: #7b5642; color: #fff; border: none; border-radius: 8px; font-family: "Bitsumishi", sans-serif; font-size: 18px; letter-spacing: 1px; cursor: pointer; width: 100%; box-sizing: border-box; }
.custom-shop-filter-toggle-btn:hover { background-color: #6a4a35; }
.custom-shop-container { display: flex; flex-wrap: nowrap; gap: 30px; width: 100%; max-width: 1400px; margin: auto; padding: 100px 16px 100px 16px; }
.custom-shop-sidebar h3 { font-size: 20px; margin-bottom: 20px; font-family: "Gotham", sans-serif; }
.custom-filter-widget { margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.custom-filter-widget:last-child { border-bottom: none; margin-bottom: 0; }
.custom-filter-widget .widget-title { font-size: 16px; margin-bottom: 10px; font-family: "Gotham", sans-serif; font-weight: bold; color: #333; }
.custom-filter-widget ul { list-style: none; padding: 0; margin: 0; }
.custom-filter-widget ul li { margin-bottom: 8px; }
.custom-filter-widget ul li a { text-decoration: none; color: #555; font-family: "Gotham", sans-serif; font-size: 14px; transition: color 0.2s ease; }
.custom-filter-widget ul li a:hover, .custom-filter-widget ul li a.active-filter { color: #7b5642; font-weight: bold; }
.custom-product-search-form { display: flex; margin-bottom: 15px; }
.custom-product-search-form .search-field { flex-grow: 1; padding: 10px; border: 1px solid #ccc; border-radius: 4px 0 0 4px; font-family: "Gotham", sans-serif; }
.custom-product-search-form button { padding: 10px 15px; background-color: #7b5642; letter-spacing: 2px; color: white; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-family: "Bitsumishi", sans-serif; font-size: 14px; }
.custom-product-search-form button:hover { background-color: #6a4a35; }
.custom-shop-filter-close-btn { display: none; position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 30px; color: #777; cursor: pointer; padding: 5px; line-height: 1; }
.custom-shop-filter-close-btn:hover { color: #333; }
.filter-sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 9990; }
.filter-sidebar-overlay.active { display: block; }

/* AJAX PAGINATION STYLES */
.custom-shop-pagination { clear: both; margin-top: 30px; text-align: center; }
.custom-shop-pagination.loading-pagination .page-numbers { opacity: 0.5; pointer-events: none; }
.custom-shop-pagination ul.page-numbers { list-style: none; padding: 0; display: inline-flex; gap: 5px; justify-content: center; }
.custom-shop-pagination .page-numbers li, .custom-shop-pagination .page-numbers { display: inline; }
.custom-shop-pagination .page-numbers a, .custom-shop-pagination .page-numbers span { display: inline-block; padding: 8px 14px; border: 1px solid #ddd; text-decoration: none; color: #333; font-family: "Gotham", sans-serif; border-radius: 4px; transition: background-color 0.2s ease, color 0.2s ease; }
.custom-shop-pagination .page-numbers span.current, .custom-shop-pagination .page-numbers a:hover { background-color: #7b5642; color: #fff; border-color: #7b5642; }

/* Mobile Specific Sidebar and Layout (up to 991px) */
@media (max-width: 991px) {
    .custom-shop-filter-toggle-btn { display: block; position: sticky; top: 70px; left: 0; margin-top: 20px; width: 90%; margin: 20px auto 0 auto; }
    .custom-shop-container { flex-wrap: wrap; padding: 5%; }
    .custom-shop-sidebar { position: fixed; top: 0; left: 0; transform: translateX(-105%); width: 90%; max-width: 100%; height: 100dvh; background-color: #fff; z-index: 9999; overflow-y: auto; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.1); transition: transform 0.3s ease-in-out; flex-basis: auto; }
    .custom-shop-sidebar.active { transform: translateX(0); }
    .custom-shop-sidebar.active .custom-shop-filter-close-btn { display: block; }
    .custom-shop-main-content { width: 100%; flex-basis: 100%; }
    body.filters-open { overflow: hidden; }
    .custom-product-title, .custom-product-price { text-align: center; /* Center title/price on mobile if desired, or keep left */ }
    .custom-product-judgeme-reviews, .custom-product-rating { justify-content: center; /* Center review block on mobile */ }

}

/* Desktop Layout (992px and up) */
@media (min-width: 992px) {
    .custom-shop-sidebar { flex-grow: 0; flex-shrink: 0; position: sticky; transform: none; height: fit-content; overflow-y: visible; padding: 0; box-shadow: none; transition: none; top: 100px; left: 0; }
    .custom-shop-main-content { flex-basis: 0; flex-grow: 1; min-width: 0; }
    .custom-shop-filter-toggle-btn { display: none; }
    .custom-shop-filter-close-btn { display: none; }
}

/* Responsive adjustments for Success Popup & Product Grid */
@media (max-width: 767px) {
    .custom-shop-success-popup { max-width: 95%; }
    .popup-title { font-size: 16px; }
    .popup-product-info { flex-direction: column; text-align: center; }
    .popup-product-image img { margin-bottom: 10px; }
    .popup-actions { flex-direction: column; }
    .popup-actions button { width: 100%; margin-bottom: 10px; font-size: 16px; }
    .popup-actions button:last-child { margin-bottom: 0; }
    .custom-shop-grid { grid-template-columns: 1fr; }
}
.custom-reset-filters-widget {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee; /* Keeps the widget separator */
}

a.custom-reset-filters-button {
    /* --- Inheriting styles from .custom-ajax-add-to-cart-btn --- */
    border-radius: 8px;
    padding: 0px 20px; /* Match padding */
    background-color: #7b5642; /* Match initial background */
    border: 1px solid transparent; /* Match initial border */
    width: 100%; /* Make it full width like the add to cart button */
    color: #fff !important; /* Match initial text color */
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out;
    cursor: pointer;
    font-family: "Bitsumishi", sans-serif; /* Match font */
    font-size: 20px; /* Match font size */
    letter-spacing: 2px; /* Match letter spacing */
    text-decoration: none;
    display: inline-block; /* Or block if you prefer full width without text-align:center on parent */
    box-sizing: border-box;
    text-align: center; /* Center text within the button */
    margin-top: 5px; /* Add a little top margin if needed */
}

a.custom-reset-filters-button:hover {
    /* --- Inheriting hover styles from .custom-ajax-add-to-cart-btn --- */
    background-color: transparent;
    color: #344343 !important; /* Match hover text color */
    border: 1px solid #7b5642; /* Match hover border */
}

/* Ensure no conflict with general filter widget link styles if specificity is an issue */
.custom-filter-widget ul li a.custom-reset-filters-button {
    font-weight: normal; /* Override potential bold from .active-filter if it's in a list */
}
