/* ═══════════════════════════════════════════════════════════
   MADHURS CATALOG — Category Listing Page CSS
   Matches madhurs.co.uk legacy design on v2.0 system
   ═══════════════════════════════════════════════════════════ */

/* ─── LAYOUT: Sidebar + Content ─── */
.ct-main {
    padding: 0 0 40px;
    background: #f5f5f5;
}
.ct-layout {
    display: flex !important;
    gap: 0;
    align-items: flex-start;
    width: 100%;
}
.ct-sidebar {
    flex: 0 0 254px !important;
    width: 254px !important;
    min-width: 254px;
    background: transparent;
    padding: 15px 12px 20px 0;
}
.ct-content {
    flex: 1 1 0% !important;
    min-width: 0;
    padding-left: 0;
}
.ct-sidebar-close {
    display: none;
}

/* ─── MOBILE BAR (Categories/Filters buttons) ─── */
.ct-mobile-bar {
    display: none;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.ct-mobile-buttons {
    display: flex;
    gap: 10px;
}
.ct-mobile-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.ct-mobile-btn:hover { background: #f5f5f5; }
.ct-mobile-btn i { margin-right: 6px; }

/* ─── BREADCRUMB ─── */
.ct-breadcrumb-bar {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.ct-breadcrumb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.ct-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: #666;
}
.ct-breadcrumb li { display: inline-flex; align-items: center; }
.ct-breadcrumb a { color: #333; text-decoration: none; }
.ct-breadcrumb a:hover { text-decoration: underline; }
.ct-sep { margin: 0 6px; color: #595959; font-size: 12px; }
.ct-current { color: #595959; }

/* ─── ACTIVE FILTER PILLS (inline with breadcrumb) ─── */
.ct-active-filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ct-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #1a1f3c;
    border-radius: 20px;
    font-size: 13px;
    color: #1a1f3c;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.ct-filter-pill:hover { background: #f0f1f5; }
.ct-pill-remove { font-size: 10px; color: #1a1f3c; cursor: pointer; opacity: 0.7; }
.ct-pill-remove:hover { opacity: 1; }
.ct-pill-reset { background: #1a1f3c; border-color: #1a1f3c; color: #fff; }
.ct-pill-reset:hover { background: #2c2c44; }
.ct-pill-reset i { color: #fff; }

/* ─── PAGE HEADER (Title + Sort) ─── */
.ct-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 10px 0 0;
}
.ct-h1 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    color: #333;
}
.ct-subtitle {
    font-size: 14px;
    color: #595959;
    margin: 2px 0 0;
}
.ct-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ct-sort-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}
.ct-sort-select {
    padding: 6px 30px 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    appearance: auto;
    min-width: 140px;
}

/* ─── PRODUCT GRID — 5 columns on desktop (matches madhurs.co.uk) ─── */
.ct-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    grid-gap: 15px !important;
}

/* No Products */
.ct-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}
.ct-no-products h4 {
    font-size: 18px;
    margin: 0 0 8px;
    color: #333;
}
.ct-no-products p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* ─── SIDEBAR FILTER SECTIONS — Card style matching madhurs.co.uk ─── */
.ct-filter-section {
    background: #fff;
    border: 0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 15px;
}

/* Category Section Title — matches .widget-title */
.ct-filter-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 0;
    border-bottom: none;
    color: #222;
}

/* Collapsible Filter Toggle — clean style, no accent line */
.ct-filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0 0 10px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    text-align: left;
}
.ct-filter-toggle i {
    font-size: 11px;
    transition: transform 0.2s;
    color: #555;
}
.ct-filter-toggle[aria-expanded="false"] i { transform: rotate(-90deg); }
.ct-filter-body { /* default visible */ }
.ct-collapsed-body { display: none; }

/* ─── Category List in Sidebar — matches madhurs.co.uk .category-scroll ─── */
.ct-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 196px;  /* exactly 7 items visible */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #f5f5f5;
}
.ct-category-list::-webkit-scrollbar { width: 6px; background-color: #f5f5f5; }
.ct-category-list::-webkit-scrollbar-track { background-color: #f5f5f5; border-radius: 50px; }
.ct-category-list::-webkit-scrollbar-thumb { background-color: #333; border-radius: 50px; }
.ct-category-link {
    display: inline-block;
    padding: 0;
    margin-bottom: 5px;
    font-size: 14px;
    color: #505050;
    text-decoration: none;
    transition: color 0.3s;
}
.ct-category-link:hover { color: #1a1f3c; }

/* ─── Checkbox Lists — matching madhurs.co.uk scrollbar ─── */
.ct-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 196px;  /* exactly 7 items visible, scroller if more */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #f5f5f5;
}
.ct-checkbox-list::-webkit-scrollbar { width: 6px; background-color: #f5f5f5; }
.ct-checkbox-list::-webkit-scrollbar-track { background-color: #f5f5f5; border-radius: 50px; }
.ct-checkbox-list::-webkit-scrollbar-thumb { background-color: #333; border-radius: 50px; }
.ct-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    line-height: 1.4;
}
.ct-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #333;
}
.ct-filter-name { flex: 1; }
.ct-filter-count { color: #999; font-size: 12px; }
.ct-no-results { padding: 8px 0; font-size: 13px; color: #999; font-style: italic; }

/* Search Input in Filters — with search icon */
.ct-search-input {
    width: 100%;
    padding: 7px 10px 7px 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='5'/%3E%3Cline x1='10' y1='10' x2='13' y2='13'/%3E%3C/svg%3E") 10px center no-repeat;
}
.ct-search-input:focus {
    outline: none;
    border-color: #bbb;
    box-shadow: none;
}

/* Special Filters (Free Shipping, On Sale) — inside price card */
.ct-special-filter {
    margin-top: 6px;
    padding-top: 0;
}

/* ─── Price Slider Area ─── */
.ct-price-slider {
    margin: 10px 5px 15px;
    height: 6px;
}
.ct-price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #333;
}
.ct-price-apply {
    display: block;
    width: 100%;
    padding: 7px;
    border: none;
    background: #1a1f3c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    border-radius: 3px;
    transition: all 0.2s;
}
.ct-price-apply:hover {
    background: #2c2c44;
}

/* noUiSlider Overrides — !important needed to override library defaults */
.noUi-target { background: #e0e0e0 !important; border: none !important; box-shadow: none !important; height: 4px !important; }
.noUi-connect { background: #1a1f3c !important; }
.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 2px solid #1a1f3c !important;
    background: #fff !important;
    box-shadow: none !important;
    top: -7px !important;
    right: -9px !important;
    cursor: pointer !important;
}
.noUi-handle::before, .noUi-handle::after { display: none !important; }

/* ─── Colour Swatches — 4-column grid matching madhurs.co.uk ─── */
.ct-colour-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 8px;
}
.ct-colour-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.ct-colour-swatch input { display: none; }
.ct-swatch-circle {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}
.ct-swatch-active .ct-swatch-circle,
.ct-colour-swatch:hover .ct-swatch-circle { border-color: #333; }
.ct-swatch-name {
    font-size: 11px;
    color: #555;
    text-align: center;
    line-height: 1.2;
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Hidden colour swatches beyond first 8 */
.ct-colour-hidden { display: none !important; }
/* "See all" button for colours */
.ct-colour-see-all {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #333;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.ct-colour-see-all:hover { background: #f5f5f5; border-color: #ccc; }

/* ─── Size Group — 2-column grid matching madhurs.co.uk ─── */
.ct-size-group { margin-bottom: 12px; }
.ct-size-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.ct-size-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.ct-size-see-all {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.ct-size-see-all:hover { text-decoration: underline; }
/* Size checkbox list: 2-column grid with scrollbar at 7 rows */
.ct-size-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 196px;  /* ~7 rows visible */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #f5f5f5;
}
.ct-size-list::-webkit-scrollbar { width: 6px; background-color: #f5f5f5; }
.ct-size-list::-webkit-scrollbar-track { background-color: #f5f5f5; border-radius: 50px; }
.ct-size-list::-webkit-scrollbar-thumb { background-color: #333; border-radius: 50px; }
.ct-size-list .ct-checkbox-label {
    padding: 3px 0;
    font-size: 13px;
}
/* Collapsed: hide the size list (used for 2nd+ groups) */
.ct-size-collapsed { display: none !important; }

/* ─── BELOW GRID: MAGAZINE ─── */


/* ─── MOBILE OVERLAY ─── */
.ct-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}
.ct-overlay.ct-active { display: block; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   Grid: 5 → 4 → 4 → 3 → 2 columns
   ═══════════════════════════════════════════════════════════ */

/* Tablet landscape */
@media (max-width: 1100px) {
    .ct-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Tablet portrait */
@media (max-width: 991px) {
    .ct-grid { grid-template-columns: repeat(4, 1fr) !important; grid-gap: 10px !important; }
    .ct-sidebar { flex: 0 0 220px !important; width: 220px !important; min-width: 220px; padding-right: 10px; }
}

/* Mobile landscape — sidebar becomes overlay */
@media (max-width: 767px) {
    .ct-mobile-bar { display: block; }

    .ct-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -300px;
        width: 280px !important;
        min-width: 280px;
        height: 100%;
        background: #fff;
        z-index: 999;
        padding: 15px !important;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        transition: left 0.3s ease;
        max-height: 100vh;
        overflow-y: auto;
        flex: none !important;
    }
    .ct-sidebar.ct-sidebar-open { left: 0; }
    .ct-sidebar-close {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 5px;
        padding: 0 0 10px;
        font-size: 14px;
        color: #666;
        cursor: pointer;
        border-bottom: 1px solid #eee;
        margin-bottom: 10px;
    }

    .ct-content { padding-left: 0 !important; }
    .ct-grid { grid-template-columns: repeat(3, 1fr) !important; grid-gap: 8px !important; }

    .ct-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ct-sort-select { width: 100%; }

    .ct-magazine-list li,
    .ct-trending-list li { flex-basis: 100%; }
}

/* Small mobile */
@media (max-width: 500px) {
    .ct-grid { grid-template-columns: repeat(2, 1fr) !important; grid-gap: 6px !important; }
}
/* ─── Windowed Pagination Styling ─── */
.ct-pagination-wrap {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}
.ct-pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.ct-page-item {
    display: inline-flex;
}
.ct-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    margin-left: -1px;
}
.ct-page-link:hover {
    background: #f5f5f5;
    z-index: 1;
}
.ct-active .ct-page-link {
    background: #333;
    color: #fff;
    border-color: #333;
    z-index: 2;
}
.ct-disabled .ct-page-link {
    color: #ccc;
    pointer-events: none;
    background: #fafafa;
}
.ct-dots .ct-page-link {
    border: none;
    background: none;
    min-width: 24px;
    cursor: default;
}

/* ─── Magazine Section — Matches madhurs.co.uk .Fashion----guides ─── */
.ct-magazine-bar {
    background-color: #1a1f3c;
    padding: 50px 0;
    margin-top: 0;
}
.ct-magazine-title {
    color: #fff;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 40px;
    font-style: normal;
}
.ct-magazine-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start;
}
.ct-magazine-list li {
    display: block;
    line-height: 40px;
    flex-basis: 33.3%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ct-magazine-list a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 0 10px 0 0;
}
.ct-magazine-list a:hover {
    color: #f19a04;
    text-decoration: underline !important;
}

/* ─── Season Trends Section — Matches madhurs.co.uk .this---seasons---trends ─── */
.ct-trending-bar {
    padding: 50px 0;
    background-color: #fff;
}
.ct-trending-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 40px;
    color: #333;
    font-style: normal;
    text-decoration: none;
    text-underline-offset: unset;
    letter-spacing: 2px;
}
.ct-trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start;
}
.ct-trending-list li {
    display: block;
    line-height: 40px;
    flex-basis: 33.3%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ct-trending-list a {
    color: #000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.ct-trending-list a:hover {
    text-decoration: underline;
    color: #f19a04;
}

/* ─── Mobile overrides for Magazine & Trends ─── */
@media (max-width: 479px) {
    .ct-magazine-list li {
        line-height: 35px;
        flex-basis: 50%;
    }
    .ct-trending-list li {
        line-height: 30px;
        flex-basis: 100%;
        text-align: center;
    }
    .ct-magazine-title,
    .ct-trending-title {
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 700;
    }
    .ct-magazine-bar {
        padding: 30px 0;
    }
    .ct-trending-bar {
        padding: 30px 0;
    }
}
@media (min-width: 480px) and (max-width: 769px) {
    .ct-magazine-list li {
        line-height: 35px;
        flex-basis: 50%;
    }
    .ct-trending-list li {
        line-height: 30px;
        flex-basis: 100%;
        text-align: center;
    }
    .ct-magazine-title,
    .ct-trending-title {
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 700;
    }
    .ct-trending-list a {
        text-align: center;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .ct-magazine-list li,
    .ct-trending-list li {
        line-height: 35px;
        flex-basis: 33.3%;
    }
    .ct-magazine-title,
    .ct-trending-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
}
@media (min-width: 992px) and (max-width: 1024px) {
    .ct-magazine-list li,
    .ct-trending-list li {
        line-height: 35px;
        flex-basis: 33%;
    }
    .ct-magazine-title,
    .ct-trending-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
}

/* ═══ Category Description (inside ct-content, below grid) ═══ */
.ct-desc-content {
    padding: 30px 0 10px;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}
.ct-desc-content h1,
.ct-desc-content h2,
.ct-desc-content h3 {
    color: #1a1a1a;
    margin: 20px 0 10px;
    font-weight: 600;
}
.ct-desc-content h2 { font-size: 20px; }
.ct-desc-content h3 { font-size: 17px; }
.ct-desc-content p { margin: 0 0 14px; }
.ct-desc-content a { color: #1e0090; text-decoration: underline; }
.ct-desc-content ul, .ct-desc-content ol { margin: 0 0 14px 20px; }
/* ═══════════════════════════════════════
   PRODUCT DETAIL PAGE — Matches madhurs.co.uk
   ═══════════════════════════════════════ */
.pd-main { padding: 30px 0 0; background: #fff; }
.pd-top { display: flex; gap: 40px; margin-bottom: 40px; }
.pd-image-col { flex: 0 0 45%; max-width: 45%; }
.pd-info-col { flex: 1; }

/* Product Image */
.pd-image-wrap {
    position: relative; background: #f9f9f9; border-radius: 4px;
    overflow: hidden; aspect-ratio: 1/1; display: flex;
    align-items: center; justify-content: center;
}
.pd-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Brand + Title — Brand bigger than product name */
.pd-brand { font-size: 26px; font-weight: 700; color: #333; margin: 0 0 5px; }
.pd-title { font-size: 20px; font-weight: 400; color: #333; margin: 0 0 12px; line-height: 1.3; }

/* Price */
.pd-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pd-was-price { font-size: 16px; color: #999; text-decoration: line-through; }
.pd-current-price { font-size: 24px; font-weight: 700; color: #e00; }
.pd-current-price.pd-no-sale { color: #333; }
.pd-discount-badge { background: #e74c3c; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 3px; }

/* Shipping */
.pd-shipping { font-size: 14px; color: #777; margin-bottom: 20px; }

/* Buy Button */
.pd-buy-btn {
    display: block; width: 100%; max-width: 400px; padding: 14px 30px;
    background: #2c2c44; color: #fff; border: none; font-size: 16px;
    font-weight: 600; text-align: center; cursor: pointer; text-transform: uppercase;
    letter-spacing: 1px; transition: background 0.2s; text-decoration: none;
    margin-bottom: 25px; border-radius: 2px;
}
.pd-buy-btn:hover { background: #1a1a30; color: #fff; }

/* Accordion Sections */
.pd-accordion { border-top: 1px solid #eee; }
.pd-acc-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 0; cursor: pointer; font-size: 15px; font-weight: 700;
    color: #333; text-transform: none; letter-spacing: 0;
    border: none; background: none; width: 100%; text-align: left;
}
.pd-acc-header i { font-size: 12px; color: #666; transition: transform 0.2s; }
.pd-acc-header[aria-expanded="false"] i { transform: rotate(-90deg); }
.pd-acc-body { padding: 0 0 15px; }
.pd-acc-body.pd-acc-hidden { display: none; }

/* Sizes Section — always visible, no accordion */
.pd-section { border-top: 1px solid #eee; padding: 15px 0; }
.pd-section-header {
    font-size: 15px; font-weight: 700; color: #333;
    text-transform: none; letter-spacing: 0;
    margin: 0 0 12px;
}

/* Attributes Table */
.pd-attr-table { width: 100%; }
.pd-attr-table tr td { padding: 4px 15px 4px 0; font-size: 14px; vertical-align: top; }
.pd-attr-table tr td:first-child,
.pd-attr-table .pd-attr-label { color: #333; width: 120px; font-weight: 700; }
.pd-attr-table tr td:last-child { color: #333; }

/* Description — 10 line clamp with view more */
.pd-description { font-size: 14px; color: #444; line-height: 1.7; }
.pd-desc-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pd-view-more {
    display: inline;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
}
.pd-view-more:hover { color: #333; }

/* Sizes — now using .pd-size-tags and .pd-size-tag (see below) */

/* Share */
.pd-share { display: flex; align-items: center; gap: 10px; margin-top: 15px; }
.pd-share span { font-size: 13px; color: #666; }
.pd-share-btn {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; color: #fff;
    font-size: 14px; text-decoration: none; transition: opacity 0.2s;
}
.pd-share-btn:hover { opacity: 0.8; }
.pd-share-fb { background: #3b5998; }
.pd-share-tw { background: #1da1f2; }
.pd-share-pin { background: #e60023; }
.pd-share-li { background: #0077b5; }
.pd-share-ig { background: #e1306c; }

/* Similar / Related Products Rows */
.pd-related-section { padding: 30px 0; border-top: 1px solid #eee; }
.pd-related-title {
    font-size: 22px; font-weight: 400; color: #333; margin: 0 0 20px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    padding-bottom: 0;
    font-family: inherit;
    letter-spacing: -0.2px;
}

/* Retailer name — no truncation in product detail related sections */
.pd-related-section .pd-platform-title,
.pd-related-section .platform-title {
    max-width: none !important;
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Size Tags — clickable, Stylight-style */
.pd-size-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pd-size-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    background: #fff;
}
.pd-size-tag:hover {
    border-color: #333;
    background: #f5f5f5;
    color: #000;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 767px) {
    .pd-top { flex-direction: column; gap: 20px; }
    .pd-image-col { flex: 1; max-width: 100%; }
    .pd-related-section .product-grid-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .pd-brand { font-size: 20px; }
    .pd-title { font-size: 16px; }
    .pd-current-price { font-size: 20px; }
    .pd-size-tags { gap: 6px; }
    .pd-size-tag { padding: 5px 10px; font-size: 13px; }
    .pd-related-title { font-size: 18px; }
}
@media (max-width: 991px) and (min-width: 768px) {
    .pd-related-section .product-grid-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 1100px) and (min-width: 992px) {
    .pd-related-section .product-grid-row { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}
/* ── Shop Similar Section ── */
.ct-shop-similar { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.ct-shop-similar-heading { margin-bottom: 20px; }
.ct-shop-similar-heading h2 { font-size: 22px; font-weight: 700; color: #333; margin: 0; }

/* ── No Product Found — uses .ct-no-products from main grid section ── */
/* Styles defined at line ~166. grid:has ensures min-height collapses. */
.ct-grid:has(.ct-no-products) {
    min-height: auto !important;
}
/* ═══════════════════════════════════════════════════════════
   BRAND/SHOP PAGE — Entity Logo/Name + Category Groups
   Shared styles for brand, shop, and category flow pages
   ═══════════════════════════════════════════════════════════ */

/* ─── Entity Logo / Name Card (Stylight-style) ─── */
.ct-entity-logo {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
}
.ct-entity-logo img {
    max-width: 160px;
    max-height: 60px;
    object-fit: contain;
}
/* Name fallback — matches Stylight: bold, clean, centered */
.ct-entity-name {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

/* ─── Category Groups (Women, Men, Beauty, Home & Living) ─── */
.ct-cat-group {
    margin-bottom: 8px;
}
.ct-cat-group:last-child {
    margin-bottom: 0;
}
.ct-cat-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 6px 0;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-align: left;
}
.ct-cat-group-toggle i {
    font-size: 10px;
    transition: transform 0.2s;
    color: #555;
}
.ct-cat-group-toggle[aria-expanded="false"] i {
    transform: rotate(-90deg);
}
.ct-cat-group-list {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 0;
    max-height: 196px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #f5f5f5;
}
.ct-cat-group-list::-webkit-scrollbar { width: 6px; background-color: #f5f5f5; }
.ct-cat-group-list::-webkit-scrollbar-track { background-color: #f5f5f5; border-radius: 50px; }
.ct-cat-group-list::-webkit-scrollbar-thumb { background-color: #333; border-radius: 50px; }
.ct-cat-group-collapsed {
    display: none;
}
.ct-cat-group-list li {
    margin-bottom: 2px;
}
.ct-cat-group-list .ct-category-link {
    font-size: 14.5px;
    padding: 2px 0;
}

/* ─── Brand/Shop Description (below grid) ─── */
.ct-brand-description {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 20px;
}
/* Above-grid variant (inside product grid partial) */
.ct-brand-desc-above {
    background: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    margin-bottom: 12px;
}
.ct-brand-desc-text {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}
.ct-desc-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ct-read-toggle {
    display: none; /* JS shows it only when text overflows */
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.ct-read-toggle.ct-toggle-visible {
    display: inline-block;
}
.ct-read-toggle:hover {
    color: #000;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE SIDEBAR MODES — Categories vs Filters
   ═══════════════════════════════════════════════════════════════════
   The sidebar (#ctSidebar) holds both #ctCategoryNav and a series of
   filter sections. On mobile we add a mode class on open so only the
   relevant region is shown:

     .ct-sidebar-mode-categories → only #ctCategoryNav visible
     .ct-sidebar-mode-filters    → #ctCategoryNav hidden, filters visible

   Desktop is unaffected because no mode class is ever applied there
   (the buttons that set it are inside .ct-mobile-bar which is desktop-hidden).
   =================================================================== */
@media (max-width: 767px) {
    /* Categories mode: hide every direct .ct-filter-section under #ctSidebarContent */
    .ct-sidebar.ct-sidebar-mode-categories #ctSidebarContent > .ct-filter-section {
        display: none !important;
    }
    /* Categories mode: also hide the dynamic entity logo row (filter-only thing) */
    .ct-sidebar.ct-sidebar-mode-categories .ct-entity-logo-dynamic {
        display: none !important;
    }

    /* Filters mode: hide the category nav block */
    .ct-sidebar.ct-sidebar-mode-filters #ctCategoryNav {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   APPLY BUTTON BAR (mobile, filters mode only)
   =================================================================== */
.ct-sidebar-apply-bar {
    display: none; /* hidden by default — desktop and any non-filters mode */
}

@media (max-width: 767px) {
    .ct-sidebar.ct-sidebar-mode-filters .ct-sidebar-apply-bar {
        display: block;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 10px 0;
        margin: 14px -15px -15px;
        z-index: 2;
    }
    .ct-sidebar-apply {
        display: block;
        width: calc(100% - 24px);
        margin: 0 12px;
        padding: 12px 16px;
        background: #1a1f3c;
        color: #fff;
        border: 0;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
    }
    .ct-sidebar-apply:hover { background: #2a2f4c; }
}

/* ═══════════════════════════════════════════════════════════════════
   SORT — Mobile icon + popup vs Desktop dropdown
   ═══════════════════════════════════════════════════════════════════
   Desktop (>= 768px): show the existing label + <select>, hide icon.
   Mobile  (<  768px): hide label + <select>, show the icon button.
   The icon sits on the SAME line as the H1 (the .ct-header rule is
   overridden so .ct-header-right doesn't push to a new line).
   =================================================================== */
.ct-sort-mobile { display: none; }   /* default: desktop hides it */
.ct-sort-desktop { display: flex; align-items: center; gap: 8px; }

@media (max-width: 767px) {
    /* Override the existing .ct-header rule that stacks vertically.
       The H1 stays on its row; the sort icon sits on the same row at the right. */
    .ct-header {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 8px !important;
        flex-wrap: nowrap;
    }
    .ct-header-left {
        flex: 1 1 auto;
        min-width: 0; /* allow H1 to truncate if necessary */
    }
    .ct-header-right {
        flex: 0 0 auto;
        align-self: flex-start;
        margin-top: 4px;
    }

    /* Hide the desktop dropdown on mobile, show the icon */
    .ct-sort-desktop { display: none !important; }
    .ct-sort-mobile  { display: inline-block; position: relative; }

    .ct-sort-icon-btn {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #d6d6dc;
        border-radius: 50%;
        background: #fff;
        color: #1a1f3c;
        font-size: 16px;
        cursor: pointer;
        font-family: inherit;
        padding: 0;
    }
    .ct-sort-icon-btn:hover { background: #f3f4f6; }
    .ct-sort-icon-btn[aria-expanded="true"] {
        background: #1a1f3c;
        color: #fff;
        border-color: #1a1f3c;
    }

    .ct-sort-popup {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        z-index: 50;
        min-width: 200px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        padding: 6px 0;
        display: flex;
        flex-direction: column;
    }
    .ct-sort-popup[hidden] { display: none; }
    .ct-sort-popup-opt {
        display: block;
        width: 100%;
        text-align: left;
        padding: 11px 16px;
        background: transparent;
        border: 0;
        font-size: 14px;
        color: #1a1f3c;
        cursor: pointer;
        font-family: inherit;
    }
    .ct-sort-popup-opt:hover { background: #f3f4f6; }
}

/* ═══════════════════════════════════════════════════════════════════
   SAFETY: ensure the sort <select> width override (line 520 of original
   madhurs-catalog.css) doesn't leak now that we hide it on mobile.
   The .ct-sort-desktop wrapper inherits the hidden state from above,
   but if the original ".ct-sort-select { width: 100% }" rule applied
   somewhere unexpected, we reset it here.
   =================================================================== */
@media (max-width: 767px) {
    .ct-sort-desktop .ct-sort-select { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORY DESCRIPTION CLAMP — mobile only, ~30 lines
   ═══════════════════════════════════════════════════════════════════
   Brand/shop pages already use .ct-desc-clamped at 3 lines (suitable
   for short bios). Category descriptions are 1000-1500 words (B3
   spec), so 3 lines would hide almost everything. Override the line
   count to 30 for catalog descriptions while reusing every other
   piece of the existing pattern (the same #ctReadToggle button, the
   same initDescriptionToggle JS handler).

   Mobile: line-clamp:30 overrides the default 3.
   Desktop: clamp disabled entirely → full text renders inline. The
   existing #ctReadToggle has display:none by default and is only
   shown by JS when overflow is detected; with no clamp on desktop
   there's no overflow and the button stays hidden naturally.
   =================================================================== */
@media (max-width: 991px) {
    .ct-desc-clamped.ct-desc-clamped-30 {
        -webkit-line-clamp: 30;
    }
}

@media (min-width: 992px) {
    .ct-desc-clamped.ct-desc-clamped-30 {
        display: block !important;
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   BUILD 5 — FILTER SECTION SPACING
   ═══════════════════════════════════════════════════════════════════
   The original .ct-filter-section above uses:
       padding: 1.5rem;          (24px on every side)
       margin-bottom: 15px;
   That's ~39px of vertical separation between sections, which left
   the filter sidebar feeling sparse on mobile (per Image 2).

   Halved: padding 0.75rem 1rem (12/16) + margin-bottom 8px → ~20px
   between sections. Mobile only — desktop sidebar already feels
   correctly proportioned and changing it could disturb spacing
   inside the existing card layout.
   =================================================================== */
@media (max-width: 991px) {
    .ct-filter-section {
        padding: 0.75rem 1rem;
        margin-bottom: 8px;
    }
    .ct-filter-section .ct-filter-title {
        margin-bottom: 8px;
    }
    /* Compress the collapsible toggle button vertical rhythm too */
    .ct-filter-section .ct-filter-toggle {
        margin-bottom: 6px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PATCH: catalog-title-bar-mobile-fit-v1 — 2026-05-12
   ═══════════════════════════════════════════════════════════════════
   On mobile, the "Sort by [Popular]" dropdown in .ct-header-right was
   eating ~45% of the viewport width, which forced the H1 retailer name
   ("Mytheresa - UK") and the .ct-subtitle ("11,428 products from 323
   brands") to wrap into two lines each. The CSS file already has an
   icon-mode mobile pattern (.ct-sort-icon-btn + .ct-sort-popup) but the
   HTML in _product-grid.blade.php was never updated to use the
   .ct-sort-desktop / .ct-sort-mobile wrappers those rules depend on, so
   the desktop dropdown leaks through to mobile.

   This patch is HTML-free: it tightens the existing dropdown on mobile
   instead of swapping to an icon. The "Sort by" label is redundant on
   mobile (the dropdown is obviously a sorter), so we hide it. The
   dropdown collapses to its content width. The H1 drops one size tier
   and gets nowrap + ellipsis as a safety net for very long names. The
   subtitle does the same. Net result: H1 on one line, subtitle on one
   line, dropdown takes only the room it actually needs.
   =================================================================== */
@media (max-width: 767px) {
    .ct-h1 {
        font-size: 1.15rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ct-subtitle {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ct-sort-label {
        display: none;
    }
    .ct-sort-select {
        min-width: 0;
        width: auto;
        padding: 6px 22px 6px 8px;
        font-size: 12px;
    }
    .ct-header-right {
        flex: 0 0 auto;
        margin-top: 2px;
        gap: 4px;
    }
}
