/* ============================================================
   SHOP.CSS  —  shared styles for shop_grouped & shop_brand
   ============================================================ */

/* ── Reset / base ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Product Card (shared) ── */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: box-shadow .3s ease, transform .3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.14);
    transform: translateY(-4px);
}
.product-card-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f8f8;
    padding: 10px;
    display: block;
    transition: transform .3s ease;
}
.product-card:hover .product-card-img { transform: scale(1.05); }
.product-card-body {
    padding: 12px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-title a { color: inherit; text-decoration: none; }
.product-card-title a:hover { color: #ff6b6b; }
.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-top: auto;
}
.product-card-price .old-price {
    font-size: .8rem;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 400;
}

/* ── Products Grid (shared) ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

/* ── Empty state ── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: .95rem;
}

/* ── Pagination ── */
.pagination_wrap { text-align: center; padding: 20px 0 10px; }
.pagination_wrap ul {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pagination_wrap ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    color: #555;
    font-size: .88rem;
    text-decoration: none;
    transition: all .2s;
}
.pagination_wrap ul li a:hover,
.pagination_wrap ul li a.current_page {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

/* ── Mobile Sort/Filter buttons (shared) ── */
.mobile-shop-bar {
    display: none;
    gap: 10px;
    padding: 10px 0 4px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}
.mobile-shop-bar .msb-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 0;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.mobile-shop-bar .msb-btn:hover,
.mobile-shop-bar .msb-btn.active {
    border-color: #ff6b6b;
    color: #ff6b6b;
}
.mobile-shop-bar .msb-btn i { font-size: 1rem; }

/* ── Bottom Sheet (mobile filter / sort panel) ── */
.bottom-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    opacity: 0;
    transition: opacity .25s ease;
}
.bottom-sheet-overlay.open { opacity: 1; }

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    z-index: 1001;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    max-height: 80vh;
    overflow-y: auto;
}
.bottom-sheet.open { transform: translateY(0); }

.bs-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 6px;
}
.bs-handle::after {
    content: '';
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}
.bs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.bs-header h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #222; }
.bs-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.bs-body { padding: 16px 20px 24px; }

/* Sort options in bottom sheet */
.sort-options { display: flex; flex-direction: column; gap: 4px; }
.sort-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-size: .95rem;
    color: #333;
    transition: all .2s;
    background: none;
    width: 100%;
    text-align: left;
}
.sort-option:hover { background: #fff5f5; }
.sort-option.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
    color: #ff6b6b;
    font-weight: 600;
}
.sort-option i { width: 20px; text-align: center; font-size: 1rem; }

/* Filter sections inside bottom sheet */
.filter-section { margin-bottom: 20px; }
.filter-section-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    margin: 0 0 10px;
}
.brand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.brand-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: #fff;
    font-size: .83rem;
    color: #444;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}
.brand-chip:hover,
.brand-chip.active {
    border-color: #ff6b6b;
    background: #fff0f0;
    color: #ff6b6b;
    font-weight: 600;
}
.bs-apply-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 18px;
    transition: opacity .2s;
}
.bs-apply-btn:hover { opacity: .9; }

/* ============================================================
   GROUPED SHOP  (shop_grouped.html)
   ============================================================ */

.grouped-shop-page { padding: 10px 0 60px; }

/* Brand filter pills row */
.brand-filter-bar {
    padding: 14px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}
.brand-filter-bar .bfb-label {
    font-weight: 700;
    color: #555;
    font-size: .88rem;
    margin-right: 4px;
}
.brand-pill {
    display: inline-block;
    padding: 5px 15px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: .82rem;
    color: #555;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.brand-pill:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff5f5;
}

/* Brand Section */
.brand-section {
    padding: 36px 0 20px;
    border-bottom: 2px solid #f5f5f5;
}
.brand-section:last-child { border-bottom: none; }

/* Brand Banner */
.brand-banner-link {
    display: block;
    width: 100%;
    margin-bottom: 22px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.brand-banner-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.brand-banner-link:hover img { transform: scale(1.02); }

/* Brand header row */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.brand-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-logo-small {
    height: 38px;
    width: auto;
    object-fit: contain;
}
.brand-name-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 2px;
}
.brand-product-count {
    font-size: .8rem;
    color: #999;
    margin: 0;
}

/* See More button */
.see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 24px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: all .3s ease;
    box-shadow: 0 4px 12px rgba(255,107,107,.3);
    white-space: nowrap;
}
.see-more-btn:hover {
    background: linear-gradient(135deg, #ee5a6f, #e34455);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255,107,107,.4);
}
.see-more-wrap {
    text-align: center;
    margin-top: 22px;
}

/* ============================================================
   BRAND SHOP  (shop_brand.html)
   ============================================================ */

.brand-shop-page { padding: 16px 0 60px; }

/* Back link */
.back-to-shop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff6b6b;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.back-to-shop:hover { text-decoration: underline; color: #ff6b6b; }

/* Brand page banner */
.brand-page-banner {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Brand page header */
.brand-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}
.brand-page-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}
.brand-page-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0;
    color: #222;
}

/* Layout: sidebar + main */
.shop-layout {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}
.shop-sidebar-wrap { width: 230px; flex-shrink: 0; }
.shop-main { flex: 1; min-width: 0; }

/* Sidebar widget */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.sidebar-widget h3 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #222;
}
.brand-pill-sidebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 5px;
    color: #555;
    text-decoration: none;
    font-size: .85rem;
    transition: all .2s;
    margin-bottom: 2px;
}
.brand-pill-sidebar:hover,
.brand-pill-sidebar.active {
    background: #fff0f0;
    color: #ff6b6b;
    font-weight: 600;
}
.brand-pill-sidebar.active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff6b6b;
    flex-shrink: 0;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.shop-toolbar p { margin: 0; color: #666; font-size: .88rem; }
.shop-toolbar select {
    padding: 7px 14px;
    border: 1.5px solid #ddd;
    border-radius: 5px;
    font-size: .88rem;
    cursor: pointer;
    outline: none;
    color: #333;
    background: #fff;
    transition: border-color .2s;
}
.shop-toolbar select:focus { border-color: #ff6b6b; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    /* Hide desktop sidebar, show mobile bar */
    .shop-sidebar-wrap { display: none; }
    .mobile-shop-bar { display: flex; }
    .shop-toolbar .desktop-sort { display: none; }   /* hide desktop sort select */
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .brand-banner-link img { height: 140px; }
    .brand-page-banner { height: 160px; }
    .shop-sidebar { display: none; }
    .woocommerce-ordering { display: none; }   
    .products.three-column { grid-template-columns: repeat(2, 1fr); }
    .woocommerce-toolbar-top {
        display: none;
    }
    .woocommerce-ordering select {
        display: none;
    }
}

@media (max-width: 600px) {
    .brand-filter-bar { display: none; }  /* hide pill row on mobile (use bottom sheet) */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card-img { height: 160px; }
    .brand-name-title { font-size: 1.1rem; }
    .brand-banner-link img { height: 110px; }
    .brand-page-banner { height: 130px; }
    .brand-page-name { font-size: 1.3rem; }
    .see-more-btn { padding: 9px 18px; font-size: .82rem; }
    .shop-sidebar { display: none; }
    .woocommerce-ordering { display: none; }   
    .products.three-column { grid-template-columns: repeat(2, 1fr); }
    .woocommerce-toolbar-top {
        display: none;
    }
    .woocommerce-ordering select {
        display: none;
    }
}

@media (max-width: 480px) {
    .products.three-column { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-holder { height: 150px !important; }

} 

@media (max-width: 400px) {
    .products-grid { gap: 8px; }
    .product-card-img { height: 140px; }
    .product-card-body { padding: 8px 10px 12px; }
    .product-card-title { font-size: .82rem; }
    .product-card-price { font-size: .9rem; }
    .shop-sidebar { display: none; }
    .woocommerce-ordering { display: none; }   
    .products.three-column { grid-template-columns: repeat(2, 1fr); }
    .woocommerce-toolbar-top {
        display: none;
    }
    .woocommerce-ordering select {
        display: none;
    }
}
/* ── Legacy shop layout wrappers ── */
.shop-section { padding: 24px 0 60px; }
/* 
.shop-area {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}

.woocommerce-content-wrap {
    flex: 1;
    min-width: 0;
}

.shop-sidebar {
    width: 230px;
    flex-shrink: 0;
}

.products.three-column {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}
.products.three-column .product {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: box-shadow .3s, transform .3s;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}
.products.three-column .product:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.14);
    transform: translateY(-4px);
}
.product-holder {
    height: 200px !important;
    overflow: hidden;
    background: #f8f8f8;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.product-holder img {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    transition: transform .3s;
}
.products.three-column .product:hover .product-holder img { transform: scale(1.05); }
.product-info {
    padding: 12px 14px 16px !important;
}
.product__title {
    font-size: .9rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 8px !important;
    height: auto !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
}
.product__title a { color: inherit; text-decoration: none; white-space: normal !important; }
.product__title a:hover { color: #ff6b6b; }
.product__price {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ff6b6b !important;
    margin: 0 !important;
}

.shop-sidebar .widget {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.widget__title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #222;
}
.widget__title span { display: block; }
.widget__search {
    display: flex;
    gap: 6px;
}
.widget__search input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #ddd;
    border-radius: 5px;
    font-size: .88rem;
    outline: none;
}
.widget__search input:focus { border-color: #ff6b6b; }
.widget__search button {
    padding: 8px 14px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.filter-price { font-size: .88rem; color: #555; }
.filter-price p { margin: 10px 0 8px; }
#slider-range { margin-bottom: 10px; }
.filter-submit-btn {
    padding: 7px 18px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}

.checkbox__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: .85rem;
    color: #444;
}
.form-check-input { cursor: pointer; accent-color: #ff6b6b; }
#brand-more-btn, #cat-more-btn {
    margin-top: 8px;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    padding: 5px 14px;
    font-size: .82rem;
    cursor: pointer;
    color: #666;
    transition: all .2s;
}
#brand-more-btn:hover, #cat-more-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.search-heading {
    margin: 0 0 18px;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}
.search-heading span { color: #ff6b6b; }

.bs-filter-section { margin-bottom: 20px; }
.bs-filter-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    margin: 0 0 10px;
}
.bs-radio-group { display: flex; flex-direction: column; gap: 4px; }
.bs-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    color: #333;
    transition: background .15s;
}
.bs-radio-item:hover { background: #fff5f5; }
.bs-radio-item input { accent-color: #ff6b6b; }
*/
