/**
 * Clothing Showcase Platform — additive styles
 *
 * Layered ON TOP of the original prime-pm.css. Only ADDS or refines styles
 * for the clothing-specific UI bits (size buttons, discount badges, sticky
 * mobile Buy bar, order modal, image-hint card, seller storefront).
 *
 * Nothing in the original .ppm-* classes is overridden destructively.
 */

/* ===== Card refinements ===== */
.csp-product-card .ppm-card-img {
    background-size: cover;
    background-position: center;
}
.csp-card-brand {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
    margin: 4px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.csp-card-price {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.csp-price-now {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
}
.csp-price-mrp {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
}
.csp-price-off {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}
.csp-card-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.csp-size-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #6b7280;
    background: #fff;
    font-weight: 600;
}
.csp-discount-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.72rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.csp-subcat-badge {
    background: #eff6ff !important;
    color: #1e40af !important;
}
.csp-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}
.csp-badge--low {
    background: #fef3c7;
    color: #92400e;
}

/* ===== Filter bar — minor refinement ===== */
.csp-filter-bar .ppm-filter-group {
    min-width: 140px;
}

/* ===== Submit-product form ===== */
.csp-product-form .ppm-form-section-title {
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.csp-size-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.csp-size-check {
    cursor: pointer;
    user-select: none;
}
.csp-size-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.csp-size-check span {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
    color: #374151;
    transition: all 0.15s;
    min-width: 50px;
    text-align: center;
}
.csp-size-check:hover span {
    border-color: #9ca3af;
}
.csp-size-check input:checked + span {
    border-color: var(--ppm-primary, #e63946);
    background: var(--ppm-primary, #e63946);
    color: #fff;
}

.csp-image-hint {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #075985;
}
.csp-image-hint ul {
    margin: 6px 0 6px 18px;
    padding: 0;
}
.csp-image-hint code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.78rem;
    border: 1px solid #bae6fd;
}

/* ===== Single product page ===== */
.csp-product-title {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 0 0 4px;
}
.csp-product-brand {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 12px;
}
.csp-product-brand strong {
    color: #111827;
}
.csp-product-price {
    margin: 0 0 4px;
    font-size: 1.5rem;
}
.csp-product-price .csp-price-now {
    font-size: 1.8rem;
    color: #059669;
}
.csp-price-tax-note {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 18px;
}
.csp-spec-grid .ppm-spec-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
}
.csp-product-desc h3 {
    font-size: 1.05rem;
    margin: 18px 0 10px;
    color: #111827;
}
.csp-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.csp-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Size buttons on product page ===== */
.csp-size-section {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
}
.csp-size-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.csp-size-section-head strong {
    font-size: 0.95rem;
    color: #111827;
}
.csp-size-section-head small {
    color: #9ca3af;
    font-size: 0.75rem;
}
.csp-size-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.csp-size-btn {
    min-width: 56px;
    padding: 12px 18px;
    border: 2px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.95rem;
}
.csp-size-btn:hover {
    border-color: #6b7280;
}
.csp-size-btn--active {
    border-color: var(--ppm-primary, #e63946);
    background: var(--ppm-primary, #e63946);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
}

/* ===== Buy on WhatsApp button ===== */
.csp-buy-card {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}
.csp-buy-btn {
    width: 100%;
    padding: 16px 24px !important;
    font-size: 1.05rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.csp-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
}
.csp-buy-btn:disabled {
    background: #d1d5db !important;
    box-shadow: none;
    cursor: not-allowed;
}
.csp-buy-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
}

/* ===== Order modal ===== */
.csp-order-modal-box {
    max-width: 560px !important;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}
.csp-order-modal-head {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.csp-order-modal-head h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}
.csp-order-modal-head p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}
.csp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.csp-form-grid .ppm-form-group--full {
    grid-column: 1 / -1;
}
.csp-form-grid .ppm-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.csp-form-grid input,
.csp-form-grid textarea,
.csp-form-grid select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
}
.csp-form-grid input:focus,
.csp-form-grid textarea:focus,
.csp-form-grid select:focus {
    outline: none;
    border-color: var(--ppm-primary, #e63946);
}
.csp-order-submit {
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 800;
    cursor: pointer;
}
.csp-order-submit:hover {
    background: #1ebe5d !important;
}
.csp-modal-disclaimer {
    margin: 12px 0 0;
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
}

/* ===== Sticky mobile Buy bar ===== */
.csp-sticky-buy {
    display: none;
}
@media (max-width: 768px) {
    .csp-sticky-buy {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 10px 14px;
        gap: 10px;
        align-items: center;
        z-index: 90;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    }
    .csp-sticky-price {
        flex: 0 0 auto;
        font-size: 1rem;
        font-weight: 800;
    }
    .csp-sticky-buy .ppm-btn {
        flex: 1;
        padding: 12px !important;
        font-size: 0.92rem !important;
        background: #25d366 !important;
        color: #fff !important;
        border: none !important;
        font-weight: 800;
    }
    /* push the page up so sticky bar doesn't cover content */
    body { padding-bottom: 70px !important; }
}

/* ===== Categories grid (homepage tiles) ===== */
.csp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.csp-category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    transition: transform 0.15s, box-shadow 0.15s;
    font-weight: 700;
}
.csp-category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.csp-category-tile--men    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.csp-category-tile--women  { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.csp-category-tile--kids   { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.csp-category-tile--unisex { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.csp-cat-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
}
.csp-cat-name {
    font-size: 1.05rem;
}

/* ===== Seller storefront ===== */
.csp-seller-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 28px;
    background: linear-gradient(135deg, #e63946, #c1272d);
    color: #fff;
    border-radius: 16px;
    margin-bottom: 24px;
}
.csp-seller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}
.csp-seller-name {
    margin: 0 0 6px;
    font-size: 1.6rem;
    color: #fff;
}
.csp-seller-stats {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}
.csp-seller-stats span {
    margin-right: 16px;
}

/* ===== Sub-admin dashboard ===== */
.csp-subadmin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.csp-subadmin-grid .ppm-stat-card.csp-cap-off {
    opacity: 0.45;
}

/* ===== Mobile tweaks for product form ===== */
@media (max-width: 768px) {
    .csp-form-grid {
        grid-template-columns: 1fr;
    }
    .csp-product-title {
        font-size: 1.3rem;
    }
    .csp-product-price .csp-price-now {
        font-size: 1.4rem;
    }
}

/* ============================================================================
 * v5.0.2 — point-targeted UI improvements
 * Only adds new rules. Does NOT override base layout or branding.
 * ============================================================================ */

/* Point 3 — modern size badges (grid card + single page) */
.csp-card-sizes .csp-size-chip,
.csp-spec-grid .csp-size-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 0 9px;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;             /* pill */
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    color: #374151;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
    transition: transform .12s ease, border-color .12s ease;
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}
.csp-card-sizes .csp-size-chip:hover,
.csp-spec-grid .csp-size-chip:hover {
    transform: translateY(-1px);
    border-color: #9ca3af;
}
.csp-card-sizes {
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #f3f4f6;
}

/* Point 4 — Mobile WhatsApp duplicate: hide inline buy card on mobile,
   keep only the sticky bottom bar */
@media (max-width: 768px) {
    .csp-buy-card {
        display: none !important;
    }
    /* keep sticky bar visible (already shown by .csp-sticky-buy in base CSS) */
}
/* Desktop: hide sticky bar (already in base CSS — confirming) */
@media (min-width: 769px) {
    .csp-sticky-buy {
        display: none !important;
    }
}

/* Point 5 — Order popup responsiveness + footer overlap fix */
.ppm-inquiry-modal-overlay.csp-order-modal {
    z-index: 999999;                  /* above any footer / fixed bar */
    align-items: flex-start;          /* anchor to top on tall content */
    padding: 24px 16px;
    overflow-y: auto;                 /* allow modal to scroll within overlay if very tall */
    -webkit-overflow-scrolling: touch;
}
.csp-order-modal .csp-order-modal-box {
    margin: auto;                     /* recentre vertically when content fits */
    max-width: 520px !important;
    max-height: calc(100vh - 48px);
    /* Use dynamic viewport height where supported — fixes mobile address-bar
       jump on Safari / Chrome mobile that otherwise let the modal bleed under
       the address bar or footer. */
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 22px 22px 20px;
}

/* Tighter modal layout on small screens */
@media (max-width: 600px) {
    .ppm-inquiry-modal-overlay.csp-order-modal {
        padding: 12px 10px;
    }
    .csp-order-modal .csp-order-modal-box {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 18px 16px 16px;
        border-radius: 14px;
    }
    .csp-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .csp-order-modal-head h3 {
        font-size: 1.05rem;
    }
    .csp-order-modal-head p {
        font-size: 0.8rem;
    }
    /* Body lock when modal open — prevents background scroll under modal */
    body.csp-modal-open {
        overflow: hidden;
    }
}

/* Slightly tighter modal head on all screens */
.csp-order-modal-head {
    margin-bottom: 14px;
    padding-bottom: 10px;
}
/* Confirm submit button never gets clipped by footer */
.csp-order-submit {
    margin-bottom: 4px;
}

/* Point 6 — Lead status badge + inline dropdown */
.csp-lead-status-wrap {
    position: relative;
    display: inline-block;
    min-width: 130px;
}
.csp-lead-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: #dbeafe;
    color: #1e40af;
    line-height: 1.2;
    pointer-events: none;             /* clicks go through to the select */
    transition: background .25s, color .25s, transform .15s;
    white-space: nowrap;
}
.csp-lead-status-badge.csp-flash-ok {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
/* Native <select> stacked invisibly on top of the badge — keeps native UI
   (best mobile picker support) without losing the modern badge look. */
.csp-lead-status-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font: inherit;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.csp-lead-status-select:focus + .csp-lead-status-badge,
.csp-lead-status-wrap:hover .csp-lead-status-badge {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.csp-lead-status-select:disabled {
    cursor: progress;
}

/* On the leads table, give the Status cell some breathing room */
.csp-leads-table th:nth-child(5),
.csp-leads-table td:nth-child(5) {
    padding-left: 12px;
    padding-right: 12px;
}

/* Point 7 — modest typography/spacing polish in only the edited sections */
.csp-filter-bar .ppm-filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.2px;
}
.csp-card-sizes {
    align-items: center;
}

/* ============================================================================
 * v5.0.3 — bulletproof fixes
 * - csp-desktop-only / csp-mobile-only: high-specificity show/hide utilities
 * - csp-modal-open body class lock (replaces inline style.overflow toggle)
 * - --csp-vh fallback for browsers without 100dvh support
 * ============================================================================ */

/* Mobile WhatsApp duplicate fix (final). The mobile breakpoint is 768px below
   which only the .csp-sticky-buy bar should be visible. Two complementary
   rules — class-based AND structural — make this resistant to caching issues
   and any theme overrides. */
@media (max-width: 768px) {
    .ppm-single-wrap .csp-desktop-only,
    body .csp-desktop-only {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
}
@media (min-width: 769px) {
    .ppm-single-wrap .csp-mobile-only,
    body .csp-mobile-only {
        display: none !important;
    }
}

/* Body scroll lock when modal is open — class-based, more reliable than
   inline style.overflow which iOS Safari sometimes ignores. */
body.csp-modal-open {
    overflow: hidden !important;
    position: relative;
}
@media (max-width: 768px) {
    body.csp-modal-open {
        /* fixed prevents iOS rubber-banding from scrolling page behind modal */
        position: fixed;
        width: 100%;
    }
}

/* Modal sizing: dvh-with-fallback. Browsers without dvh fall back to the
   --csp-vh CSS variable that the inline JS keeps in sync with the actual
   visible viewport on resize/orientation changes. */
.csp-order-modal .csp-order-modal-box {
    /* Fallback chain: hard cap → CSS var (set by JS) → 100vh → 100dvh */
    max-height: calc((var(--csp-vh, 1vh) * 100) - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
    .csp-order-modal .csp-order-modal-box {
        max-height: calc((var(--csp-vh, 1vh) * 100) - 20px);
        max-height: calc(100dvh - 20px);
        padding: 16px 14px 16px;
        border-radius: 12px;
    }
}

/* Modal overlay: extra high z-index + safe positioning */
.ppm-inquiry-modal-overlay.csp-order-modal {
    z-index: 2147483000 !important;  /* near max int — beats any theme/footer */
    position: fixed !important;
    inset: 0 !important;
    overflow-y: auto;
    padding: 20px 12px;
}

/* Larger size badges on grid card — make sure they're clearly visible.
   These are size-display badges (not the form checkboxes). The selectors
   are scoped to .csp-card-sizes so they only affect cards. */
.ppm-card-body .csp-card-sizes {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #f3f4f6;
}
.ppm-card-body .csp-card-sizes .csp-size-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    padding: 0 9px;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 -1px 0 rgba(17, 24, 39, 0.04);
}

/* Spec grid sizes on single product page (also pill-shaped) */
.ppm-single-specs .csp-spec-item span.csp-size-chip {
    display: inline-flex;
    align-items: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    color: #374151;
    line-height: 1;
}

/* ============================================================================
 * v5.0.5 — product card redesign to match reference design
 * Scoped to .csp-product-card--v2 — does not affect any other UI.
 * ============================================================================ */

/* Card shell */
.csp-product-card--v2 {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.csp-product-card--v2:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.06);
}

/* Image area — clean square, no internal padding */
.csp-product-card--v2 .csp-card-img-link {
    display: block;
    background: #ffffff;
    padding: 0;
    margin: 0;
}
.csp-product-card--v2 .csp-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Browsers that don't support aspect-ratio (older Safari) */
@supports not (aspect-ratio: 1/1) {
    .csp-product-card--v2 .csp-card-img {
        padding-top: 100%;
    }
}

/* Top-left image badge — single label, solid style */
.csp-product-card--v2 .csp-card-img-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.csp-product-card--v2 .csp-img-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1;
    color: #ffffff;
    background: #111827;          /* default — TRENDING / NEW ARRIVAL look */
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.15);
    text-transform: uppercase;
}
.csp-product-card--v2 .csp-img-badge--discount {
    background: #ef4444;           /* red for discount, matches screenshot */
}
.csp-product-card--v2 .csp-img-badge--low {
    background: #f59e0b;
}
.csp-product-card--v2 .csp-img-badge--sold {
    background: #6b7280;
}

/* Body */
.csp-product-card--v2 .csp-card-body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
}

/* Brand line: small icon + uppercase name, grey */
.csp-product-card--v2 .csp-card-brand-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0 0 2px;
}
.csp-product-card--v2 .csp-card-brand-icon {
    flex-shrink: 0;
    color: #9ca3af;
}

/* Title */
.csp-product-card--v2 .csp-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
    /* Match the reference's slightly classy/serif feel where possible —
       fall back to system fonts otherwise */
    font-family: Georgia, 'Times New Roman', 'Source Serif Pro', serif;
    letter-spacing: -0.01em;
}
.csp-product-card--v2 .csp-card-title a {
    color: inherit;
    text-decoration: none;
}
.csp-product-card--v2 .csp-card-title a:hover {
    color: #111827;
    text-decoration: none;
}

/* Price row */
.csp-product-card--v2 .csp-card-price {
    margin: 2px 0 4px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.csp-product-card--v2 .csp-card-price .csp-price-now {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.01em;
}
.csp-product-card--v2 .csp-card-price .csp-price-mrp {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}
/* Hide the "% OFF" inline label on the price row — it's already shown as the
   top-left image badge in v2 cards */
.csp-product-card--v2 .csp-card-price .csp-price-off {
    display: none;
}

/* Size chips — small light-bordered squares */
.csp-product-card--v2 .csp-card-sizes {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    align-items: center;
}
.csp-product-card--v2 .csp-card-sizes .csp-size-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 7px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

/* Footer with single full-width WhatsApp button */
.csp-product-card--v2 .csp-card-footer {
    padding: 0 16px 16px;
    margin: 0;
    background: #ffffff;
    border: 0;
    display: block;
}
.csp-product-card--v2 .csp-card-wa-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px !important;
    margin: 0 !important;
    background: #25d366 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.7px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    box-shadow: none;
    transition: background-color 0.15s ease, transform 0.1s ease;
    line-height: 1;
}
.csp-product-card--v2 .csp-card-wa-btn:hover {
    background: #1ebe5d !important;
    color: #ffffff !important;
    transform: none;
    text-decoration: none !important;
}
.csp-product-card--v2 .csp-card-wa-btn:active {
    transform: scale(0.99);
}
.csp-product-card--v2 .csp-card-wa-btn svg {
    flex-shrink: 0;
    fill: currentColor;
}

/* Out-of-stock visual */
.csp-product-card--v2.ppm-property-card--sold .csp-card-img {
    filter: grayscale(0.4) brightness(0.95);
}
.csp-product-card--v2.ppm-property-card--sold .csp-card-wa-btn {
    background: #9ca3af !important;
    pointer-events: none;
}

/* Mobile — keep the same look, just slightly tighter */
@media (max-width: 600px) {
    .csp-product-card--v2 .csp-card-body {
        padding: 12px 13px 10px;
    }
    .csp-product-card--v2 .csp-card-footer {
        padding: 0 13px 13px;
    }
    .csp-product-card--v2 .csp-card-title {
        font-size: 0.98rem;
    }
    .csp-product-card--v2 .csp-card-wa-btn {
        padding: 12px 14px !important;
        font-size: 0.78rem !important;
    }
}

/* ============================================================================
 * v5.0.6 — search bar redesign (clean white pill matching reference)
 * Scoped to .csp-filter-bar--v2 — does not affect any other UI.
 * ============================================================================ */

/* The outer container becomes a white rounded pill with a soft shadow.
   Inner padding zero — the columns themselves carry the visual padding. */
.csp-filter-bar.csp-filter-bar--v2 {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

/* Single horizontal row, no wrapping on desktop */
.csp-filter-bar--v2 .csp-filter-inner {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    margin: 0;
}

/* Each filter column */
.csp-filter-bar--v2 .csp-filter-col {
    flex: 1 1 0;
    min-width: 0;
    padding: 16px 22px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: 0;
}

/* Wider search column (matches the reference where 'Search Product' is the
   widest cell) */
.csp-filter-bar--v2 .csp-filter-col--search {
    flex: 2 1 0;
}

/* Label */
.csp-filter-bar--v2 .csp-filter-col label {
    display: block;
    margin: 0 0 2px;
    color: #9ca3af;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Inputs + selects — borderless, no background, look like plain text */
.csp-filter-bar--v2 .csp-filter-input,
.csp-filter-bar--v2 .csp-filter-select {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    font-size: 0.92rem !important;
    font-weight: 500;
    color: #111827 !important;
    line-height: 1.3;
    box-shadow: none !important;
    outline: none !important;
    height: auto !important;
    min-height: 0 !important;
    font-family: inherit;
}
.csp-filter-bar--v2 .csp-filter-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}
.csp-filter-bar--v2 .csp-filter-input:focus,
.csp-filter-bar--v2 .csp-filter-select:focus {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Native caret on select — replaced with a clean SVG arrow */
.csp-filter-bar--v2 .csp-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 6,6 11,1'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 0 center !important;
    padding-right: 22px !important;
    cursor: pointer;
}

/* Vertical separators between columns */
.csp-filter-bar--v2 .csp-filter-divider {
    width: 1px;
    background: #f3f4f6;
    flex: 0 0 1px;
    align-self: stretch;
    margin: 14px 0;
}

/* Actions column at the right */
.csp-filter-bar--v2 .csp-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 10px 4px;
    flex: 0 0 auto;
}

/* Solid black SEARCH button */
.csp-filter-bar--v2 .csp-filter-search-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0f172a !important;
    border: 0 !important;
    color: #ffffff !important;
    padding: 14px 26px !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.3px !important;
    text-transform: uppercase !important;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.csp-filter-bar--v2 .csp-filter-search-btn:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}
.csp-filter-bar--v2 .csp-filter-search-btn:active {
    transform: scale(0.99);
}
.csp-filter-bar--v2 .csp-filter-search-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* Reset is a quiet link-style button, sits next to Search */
.csp-filter-bar--v2 .csp-filter-reset-btn {
    background: transparent !important;
    border: 0 !important;
    color: #6b7280 !important;
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.csp-filter-bar--v2 .csp-filter-reset-btn:hover {
    color: #111827 !important;
    background: #f9fafb !important;
}

/* ─── Tablet and below ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .csp-filter-bar--v2 .csp-filter-col {
        padding: 14px 16px;
    }
    .csp-filter-bar--v2 .csp-filter-search-btn {
        padding: 12px 20px !important;
    }
}

/* ─── Mobile — stack vertically ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .csp-filter-bar.csp-filter-bar--v2 {
        border-radius: 14px;
    }
    .csp-filter-bar--v2 .csp-filter-inner {
        flex-direction: column;
    }
    .csp-filter-bar--v2 .csp-filter-col,
    .csp-filter-bar--v2 .csp-filter-col--search {
        flex: 0 0 auto;
        width: 100%;
        padding: 12px 18px;
        border-bottom: 1px solid #f3f4f6;
    }
    .csp-filter-bar--v2 .csp-filter-divider {
        display: none;
    }
    .csp-filter-bar--v2 .csp-filter-actions {
        padding: 14px 14px;
        width: 100%;
        gap: 10px;
    }
    .csp-filter-bar--v2 .csp-filter-search-btn {
        flex: 1;
        padding: 14px !important;
    }
    .csp-filter-bar--v2 .csp-filter-reset-btn {
        flex: 0 0 auto;
        padding: 10px 14px !important;
    }
}

/* ============================================================================
 * v5.0.7 — responsive / alignment fixes per user spec
 *
 * Points addressed in this block:
 *   1.  Mobile 2-column product grid (was 1-column below 640px)
 *   3.  Center-aligned Category & Size dropdowns
 *   4.  Search bar field alignment (equal heights, single-line on mobile)
 *   5.  Price + WhatsApp button on same line (where space allows)
 *   8/9. Discount badge + striked price visibility across all listing surfaces
 *   10. Uniform card height, responsive images, compact spacing
 *   11. Touch-friendly button sizing on mobile
 *   12. Dropdown padding / arrow positioning / focus styles
 *   13. Performance: no animations on mobile, contain layout to cards
 *
 * Scoped to existing class hierarchy — no new wrapper classes needed.
 * ============================================================================ */

/* ─── Point 1: Mobile 2-column product grid ──────────────────────────── */
/* Override the base CSS that drops to 1 column at 640px. Use higher
   specificity (.csp-product-grid.ppm-cols-X) so this beats prime-pm.css
   without needing !important. */
@media (max-width: 640px) {
    .csp-product-grid.ppm-cols-2,
    .csp-product-grid.ppm-cols-3,
    .csp-product-grid.ppm-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* Tighten card body padding on tiny screens to fit 2-up cleanly */
    .csp-product-card--v2 .csp-card-body {
        padding: 10px 11px 8px;
    }
    .csp-product-card--v2 .csp-card-footer {
        padding: 0 11px 11px;
    }
    .csp-product-card--v2 .csp-card-title {
        font-size: 0.85rem;
        line-height: 1.25;
    }
    .csp-product-card--v2 .csp-card-brand-line {
        font-size: 0.62rem;
        letter-spacing: 0.6px;
    }
    .csp-product-card--v2 .csp-card-price .csp-price-now {
        font-size: 0.92rem;
    }
    .csp-product-card--v2 .csp-card-price .csp-price-mrp {
        font-size: 0.72rem;
    }
}
/* Phones below 380px — still 2 columns but tighter */
@media (max-width: 380px) {
    .csp-product-grid.ppm-cols-2,
    .csp-product-grid.ppm-cols-3,
    .csp-product-grid.ppm-cols-4 {
        gap: 8px !important;
    }
}

/* ─── Point 10: Uniform card heights (already mostly OK, ensure equal) ── */
.csp-product-grid {
    align-items: stretch;
}
.csp-product-card--v2 {
    height: 100%;
}
.csp-product-card--v2 .csp-card-body {
    flex: 1 1 auto;     /* body absorbs extra height so all cards align */
}

/* ─── Point 5: Price + WhatsApp button on same row ──────────────────── */
/* Hide the footer button on cards; price row gets an inline mini-WA button
   so they sit on the same line. */
.csp-product-card--v2 .csp-card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 0;
    flex-wrap: nowrap;
}
.csp-product-card--v2 .csp-card-price-row .csp-card-price {
    flex: 1 1 auto;
    min-width: 0;
}
.csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: #25d366;
    color: #ffffff !important;
    border: 0;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.15s;
    line-height: 1;
}
.csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline:hover {
    background: #1ebe5d;
}
.csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline svg {
    flex-shrink: 0;
}
/* When the inline button is present, hide the old footer button. PHP sets
   the .csp-has-inline-wa class on the card. */
.csp-product-card--v2.csp-has-inline-wa .csp-card-footer {
    display: none;
}
/* Mobile: stack price label above button, but keep them in the same row */
@media (max-width: 380px) {
    .csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline {
        padding: 7px 9px;
        font-size: 0.62rem;
    }
    .csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline svg {
        width: 11px;
        height: 11px;
    }
    .csp-product-card--v2 .csp-card-price-row .csp-card-wa-inline span {
        display: none;  /* on tiny screens show only the icon */
    }
}

/* ─── Points 8/9: Discount badge + crossed-out original price ────────── */
/* The image badge already shows -N% OFF in red. Strengthen the strikethrough
   on price MRP so the discount is unmistakable. */
.csp-product-card--v2 .csp-card-price .csp-price-mrp {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(107, 114, 128, 0.7);
    opacity: 0.85;
}
.csp-product-card--v2 .csp-card-price .csp-price-now {
    color: #0f172a;
}
/* On product detail page — make the discount tag more prominent */
.csp-single-wrap .info__discount-tag,
.csp-single-wrap .csp-price-off {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* ─── Points 3, 4, 12: Search bar mobile responsiveness ──────────────── */
/* On mobile the bar must stay COMPACT and SINGLE-LINE-ish.
   Strategy: a 2-row layout — input on top, [Cat][Size][🔍] on bottom row. */
@media (max-width: 768px) {
    .csp-filter-bar.csp-filter-bar--v2 {
        border-radius: 10px;
        margin-bottom: 18px;
        box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    }
    .csp-filter-bar--v2 .csp-filter-inner {
        display: grid !important;
        grid-template-columns: 1fr 1fr auto;
        grid-template-areas:
            "search search search"
            "cat    size   btn";
        gap: 0;
        padding: 0;
    }
    .csp-filter-bar--v2 .csp-filter-col {
        padding: 9px 12px !important;
        min-width: 0;
        border-bottom: 1px solid #f3f4f6;
    }
    .csp-filter-bar--v2 .csp-filter-col--search {
        grid-area: search;
        padding: 10px 14px !important;
    }
    .csp-filter-bar--v2 .csp-filter-col:nth-of-type(3) {
        grid-area: cat;
        border-right: 1px solid #f3f4f6;
        border-bottom: 0;
    }
    .csp-filter-bar--v2 .csp-filter-col:nth-of-type(5) {
        grid-area: size;
        border-bottom: 0;
    }
    /* Hide the vertical divider DIVs on mobile — grid handles separation */
    .csp-filter-bar--v2 .csp-filter-divider {
        display: none !important;
    }
    .csp-filter-bar--v2 .csp-filter-actions {
        grid-area: btn;
        padding: 7px 10px !important;
        border-bottom: 0;
        align-self: stretch;
    }
    /* Compact labels */
    .csp-filter-bar--v2 .csp-filter-col label {
        font-size: 0.58rem;
        letter-spacing: 1px;
        margin-bottom: 2px;
    }
    .csp-filter-bar--v2 .csp-filter-input,
    .csp-filter-bar--v2 .csp-filter-select {
        font-size: 0.86rem !important;
        padding: 2px 0 !important;
    }
    .csp-filter-bar--v2 .csp-filter-select {
        padding-right: 18px !important;
        background-size: 10px 7px !important;
    }
    /* Compact icon-only search button */
    .csp-filter-bar--v2 .csp-filter-search-btn {
        padding: 12px 16px !important;
        height: 100%;
        min-width: 44px;
        border-radius: 7px !important;
    }
    .csp-filter-bar--v2 .csp-filter-search-btn .csp-search-btn-label {
        display: none;       /* show only magnifying-glass on mobile */
    }
    .csp-filter-bar--v2 .csp-filter-search-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ─── Points 3 & 12: Centered dropdowns (Category & Size) ───────────── */
/* Center-align the value text inside selects so it's clearly visible.
   Search input stays left-aligned (more natural for typed text). */
.csp-filter-bar--v2 .pf-category,
.csp-filter-bar--v2 .pf-bhk {
    text-align: center;
    text-align-last: center;     /* center the currently-selected option */
    padding-right: 22px !important;
    padding-left: 8px !important;
    background-position: right 4px center !important;
}
/* The dropped-down option list — center the option text where supported */
.csp-filter-bar--v2 .pf-category option,
.csp-filter-bar--v2 .pf-bhk option {
    text-align: center;
    text-align-last: center;
}

/* Ensure dropdown values are fully visible (no clipping) on mobile */
@media (max-width: 768px) {
    .csp-filter-bar--v2 .pf-category,
    .csp-filter-bar--v2 .pf-bhk {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
}

/* ─── Point 12: Focus + hover polish ─────────────────────────────────── */
.csp-filter-bar--v2 .csp-filter-input:focus,
.csp-filter-bar--v2 .csp-filter-select:focus {
    color: #0f172a !important;
    background-color: transparent !important;
}
.csp-filter-bar--v2 .csp-filter-col:focus-within {
    background: rgba(15, 23, 42, 0.02);
}

/* ─── Point 11: Touch-friendly button sizing on mobile ───────────────── */
@media (max-width: 768px) {
    .csp-product-card--v2 .csp-card-wa-btn {
        padding: 12px 14px !important;
        font-size: 0.72rem !important;
        letter-spacing: 0.5px !important;
    }
    .csp-product-card--v2 .csp-card-wa-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ─── Point 13: Performance — contain layout / paint to each card ────── */
.csp-product-card--v2 {
    contain: layout style paint;
}
/* Disable hover-lift animation on touch devices — saves a paint */
@media (hover: none) {
    .csp-product-card--v2:hover {
        transform: none;
        box-shadow: none;
    }
    .csp-product-card--v2:hover .csp-card-img {
        transform: none;
    }
}

/* ============================================================================
 * v5.0.8 — Desktop gallery fix on single product page
 *
 * Problem: the main image had inline height:520px + object-fit:contain, which
 * "letterboxed" portrait clothing images on desktop — leaving big gray bands
 * either side because the image was constrained to 520px tall and contain-
 * fitted into whatever-wide column was actually rendered.
 *
 * Fix: use an aspect-ratio container with object-fit:cover so the image fills
 * the box at the right proportion regardless of column width. Bigger square
 * thumbnails on desktop too.
 *
 * Mobile behaviour preserved — same proportions apply but in a single column.
 * ============================================================================ */

/* Main image: 4:5 portrait container, image fills it cleanly */
.csp-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
}
/* Fallback for browsers without aspect-ratio support (older Safari < 15) */
@supports not (aspect-ratio: 4/5) {
    .csp-gallery-main {
        height: 0;
        padding-top: 125%;     /* 5/4 * 100 = 125 */
    }
    .csp-gallery-main > * {
        position: absolute;
        inset: 0;
    }
}

.csp-gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* fills box, crops slightly rather than letterboxing */
    object-position: center top;/* keep faces / top of garment visible when cropping */
    display: block;
    transition: opacity 0.15s;
}

/* When the seller uploads square images (1:1 ratio close), still works fine
   because cover handles both. For very wide images we still keep top alignment. */

/* Thumbnails: square, larger on desktop */
.csp-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
    overflow: visible;
    padding: 0;
}
.csp-gallery-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}
@supports not (aspect-ratio: 1/1) {
    .csp-gallery-thumb {
        height: 90px !important;
    }
}
.csp-gallery-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.csp-gallery-thumb.active {
    opacity: 1;
    border-color: var(--ppm-primary, #e63946);
}

/* Empty-state gallery (no images uploaded) */
.csp-gallery-empty {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #9ca3af;
    gap: 8px;
}
.csp-gallery-empty span { font-size: 4rem; }

/* Sold overlay positioning (unchanged behaviour, just make sure it still works) */
.csp-gallery-main .ppm-sold-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}
.csp-gallery-main .ppm-sold-overlay span {
    background: #ef4444;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* ─── Mobile: fewer thumb columns, slightly tighter ─────────────────── */
@media (max-width: 600px) {
    .csp-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .csp-gallery-main,
    .csp-gallery-empty {
        border-radius: 10px;
    }
}

/* Tablets — keep the 5-column thumb grid but slightly smaller image */
@media (min-width: 768px) and (max-width: 1024px) {
    .csp-gallery-thumbs {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Override the old fixed-pixel thumbnail size that prime-pm.css set
   (width:72px; height:56px). Our new grid handles sizing. */
.csp-single-wrap .csp-gallery-thumbs .ppm-gallery-thumb.csp-gallery-thumb {
    /* selector specificity beats prime-pm.css's `.ppm-gallery-thumb` rule */
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

/* ============================================================================
 * v5.0.11 — Store details feature support
 * ============================================================================ */
.csp-seller-avatar--logo {
    overflow: hidden;
    padding: 0;
}
.csp-seller-avatar--logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Seller dashboard "store edit" form spacing */
.csp-store-edit .ppm-form-group { margin-bottom: 14px; }
.csp-store-edit label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}
.csp-store-edit input[type="text"],
.csp-store-edit input[type="url"],
.csp-store-edit input[type="number"],
.csp-store-edit textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.92rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.csp-store-edit input:focus,
.csp-store-edit textarea:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* ============================================================================
 * v5.0.13 — Premium Storefront
 * Brand: deep rose #be185d, warm gold #d97706, retains WhatsApp green for buy.
 * Fonts: Fraunces (display) + Inter (body) — both already loaded by theme or
 *        gracefully degrade to Georgia + system-ui if Fraunces unavailable.
 * Scope: everything inside .csp-storefront--v2
 * ============================================================================ */

.csp-storefront--v2 {
    --csp-rose:        #be185d;
    --csp-rose-dark:   #9d174d;
    --csp-rose-soft:   #fdf2f8;
    --csp-rose-wash:   #fce7f3;
    --csp-gold:        #d97706;
    --csp-gold-soft:   #fef3c7;
    --csp-ink:         #0f172a;
    --csp-ink-soft:    #1f2937;
    --csp-muted:       #6b7280;
    --csp-grey-line:   #f3e8ee;     /* slight rose tint to dividers */
    --csp-grey-bg:     #fafafa;
    --csp-wa:          #25d366;
    --csp-wa-dark:     #1ebe5d;
    --csp-shadow-card: 0 8px 30px rgba(190, 24, 93, 0.08);
    --csp-shadow-hover:0 16px 50px rgba(190, 24, 93, 0.15);
    --csp-font-serif:  'Fraunces', Georgia, 'Times New Roman', serif;
    --csp-font-sans:   'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--csp-ink);
    font-family: var(--csp-font-sans);
}

.csp-storefront--v2 .csp-store-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

/* ─── Breadcrumb ──────────────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-crumb {
    font-size: 0.82rem;
    color: var(--csp-muted);
    padding: 0 4px;
    margin-bottom: 20px;
}
.csp-storefront--v2 .csp-store-crumb a {
    color: var(--csp-rose);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.csp-storefront--v2 .csp-store-crumb a:hover { color: var(--csp-rose-dark); }
.csp-storefront--v2 .csp-store-crumb span { color: #d1d5db; margin: 0 6px; }
.csp-storefront--v2 .csp-store-crumb .current { color: var(--csp-ink-soft); font-weight: 500; }

/* ─── HERO CARD ───────────────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-hero {
    background:
        radial-gradient(circle at 90% 10%, var(--csp-rose-wash) 0%, transparent 50%),
        linear-gradient(135deg, #ffffff 0%, var(--csp-rose-soft) 100%);
    border: 1px solid var(--csp-grey-line);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: var(--csp-shadow-card);
    overflow: hidden;
    position: relative;
}
.csp-storefront--v2 .csp-store-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.csp-storefront--v2 .csp-store-hero__inner {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    position: relative;
    z-index: 1;
}
@media (max-width: 600px) {
    .csp-storefront--v2 .csp-store-hero { padding: 22px; border-radius: 16px; }
    .csp-storefront--v2 .csp-store-hero__inner { flex-direction: column; gap: 18px; align-items: center; text-align: center; }
}
.csp-storefront--v2 .csp-store-hero__logo {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(190, 24, 93, 0.15);
    border: 1px solid var(--csp-rose-wash);
    display: flex;
    align-items: center;
    justify-content: center;
}
.csp-storefront--v2 .csp-store-hero__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.csp-storefront--v2 .csp-store-hero__monogram {
    font-family: var(--csp-font-serif);
    font-size: 3.4rem;
    font-weight: 600;
    color: var(--csp-rose);
    letter-spacing: -0.04em;
    line-height: 1;
}
.csp-storefront--v2 .csp-store-hero__body { flex: 1 1 auto; min-width: 0; }
.csp-storefront--v2 .csp-store-hero__eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--csp-rose);
    background: var(--csp-rose-soft);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 10px;
}
.csp-storefront--v2 .csp-store-hero__name {
    font-family: var(--csp-font-serif);
    font-weight: 600;
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--csp-ink);
    margin: 0 0 10px;
}
.csp-storefront--v2 .csp-store-hero__category-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--csp-rose);
    background: var(--csp-rose-soft);
    padding: 4px 12px;
    border-radius: 100px;
    margin: -2px 0 12px;
}
.csp-storefront--v2 .csp-store-hero__desc {
    color: var(--csp-ink-soft);
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0 0 18px;
    max-width: 580px;
}
.csp-storefront--v2 .csp-store-hero__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.csp-storefront--v2 .csp-store-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #ffffff;
    border: 1px solid var(--csp-grey-line);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--csp-ink-soft);
    line-height: 1;
}
.csp-storefront--v2 .csp-store-hero__chip strong { color: var(--csp-rose); font-weight: 700; }
.csp-storefront--v2 .csp-store-hero__chip--link {
    color: var(--csp-rose);
    text-decoration: none;
    border-color: var(--csp-rose-wash);
    background: var(--csp-rose-soft);
    transition: background-color 0.15s, transform 0.1s;
}
.csp-storefront--v2 .csp-store-hero__chip--link:hover { background: var(--csp-rose-wash); }

/* ─── BANNERS ─────────────────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-banners {
    margin-bottom: 28px;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--csp-rose-soft);
}
.csp-storefront--v2 .csp-store-banners__track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}
.csp-storefront--v2 .csp-store-banners--single .csp-store-banners__track { display: block; }
.csp-storefront--v2 .csp-store-banner {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 16 / 5;
    position: relative;
    overflow: hidden;
}
@supports not (aspect-ratio: 16/5) {
    .csp-storefront--v2 .csp-store-banner { height: 280px; }
}
.csp-storefront--v2 .csp-store-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.csp-storefront--v2 .csp-store-banner__link { display: block; height: 100%; }
.csp-storefront--v2 .csp-store-banner__caption {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.86rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.csp-storefront--v2 .csp-store-banners__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 10px;
    border-radius: 100px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.csp-storefront--v2 .csp-store-banners__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.csp-storefront--v2 .csp-store-banners__dot.is-active {
    background: #fff;
    transform: scale(1.3);
}
@media (max-width: 600px) {
    .csp-storefront--v2 .csp-store-banners { border-radius: 14px; }
    .csp-storefront--v2 .csp-store-banner { aspect-ratio: 4 / 3; }
    @supports not (aspect-ratio: 4/3) {
        .csp-storefront--v2 .csp-store-banner { height: 220px; }
    }
    .csp-storefront--v2 .csp-store-banner__caption {
        font-size: 0.74rem;
        padding: 6px 12px;
        bottom: 14px;
        left: 14px;
    }
}

/* ─── SEARCH BAR (sticky on mobile) ───────────────────────────────────── */
.csp-storefront--v2 .csp-store-search {
    margin-bottom: 24px;
    position: relative;
    z-index: 30;
}
.csp-storefront--v2 .csp-store-search__inner {
    position: relative;
    background: #fff;
    border: 1.5px solid var(--csp-grey-line);
    border-radius: 100px;
    padding: 0;
    box-shadow: 0 6px 20px rgba(190, 24, 93, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
}
.csp-storefront--v2 .csp-store-search__inner:focus-within {
    border-color: var(--csp-rose);
    box-shadow: 0 8px 30px rgba(190, 24, 93, 0.15);
}
.csp-storefront--v2 .csp-store-search__icon {
    flex: 0 0 auto;
    margin-left: 22px;
    color: var(--csp-rose);
}
.csp-storefront--v2 .csp-store-search__input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    padding: 18px 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--csp-ink);
    outline: none;
    min-width: 0;
    width: 100%;
}
.csp-storefront--v2 .csp-store-search__input::placeholder {
    color: var(--csp-muted);
    opacity: 1;
}
.csp-storefront--v2 .csp-store-search__clear {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    background: var(--csp-rose-soft);
    color: var(--csp-rose);
    border: 0;
    border-radius: 50%;
    margin-right: 12px;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}
.csp-storefront--v2 .csp-store-search__clear:hover { background: var(--csp-rose-wash); }
.csp-storefront--v2 .csp-store-search__inner.has-text .csp-store-search__clear { display: flex; }
.csp-storefront--v2 .csp-store-search__status {
    position: absolute;
    top: calc(100% + 8px);
    left: 22px;
    font-size: 0.78rem;
    color: var(--csp-muted);
    pointer-events: none;
}

/* Sticky on mobile */
@media (max-width: 768px) {
    .csp-storefront--v2 .csp-store-search {
        position: sticky;
        top: 8px;
        margin-bottom: 18px;
    }
    .csp-storefront--v2 .csp-store-search__inner {
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .csp-storefront--v2 .csp-store-search__icon { margin-left: 16px; }
    .csp-storefront--v2 .csp-store-search__input { padding: 14px 12px; font-size: 0.95rem; }
}

/* ─── PRODUCT GRID HEADER ─────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-products__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 14px;
}
.csp-storefront--v2 .csp-store-products__title {
    font-family: var(--csp-font-serif);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--csp-ink);
    margin: 0;
}
.csp-storefront--v2 .csp-store-products__count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--csp-rose);
    background: var(--csp-rose-soft);
    padding: 5px 12px;
    border-radius: 100px;
    letter-spacing: 0.4px;
}

/* Force 2-column on mobile (we already did this in v5.0.7 for csp-product-grid,
   here just re-state for clarity within storefront scope) */
.csp-storefront--v2 .csp-store-grid {
    gap: 20px;
}
@media (max-width: 768px) {
    .csp-storefront--v2 .csp-store-grid.ppm-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* Empty state inside the grid */
.csp-storefront--v2 .csp-store-empty {
    grid-column: 1 / -1;
    background: #fff;
    border: 1.5px dashed var(--csp-rose-wash);
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    color: var(--csp-muted);
}
.csp-storefront--v2 .csp-store-empty span {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

/* ─── VIEW STORE DETAILS ACCORDION ───────────────────────────────────── */
.csp-storefront--v2 .csp-store-details {
    margin-top: 28px;
}
.csp-storefront--v2 .csp-store-details__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--csp-rose-wash);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--csp-ink);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.csp-storefront--v2 .csp-store-details__toggle:hover {
    background: var(--csp-rose-soft);
    border-color: var(--csp-rose);
}
.csp-storefront--v2 .csp-store-details__toggle span {
    flex: 1 1 auto;
    text-align: left;
}
.csp-storefront--v2 .csp-store-details__chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}
.csp-storefront--v2 .csp-store-details__toggle.is-open .csp-store-details__chevron {
    transform: rotate(180deg);
}
.csp-storefront--v2 .csp-store-details__panel {
    margin-top: 4px;
}
.csp-storefront--v2 .csp-store-details__panel .csp-store-visit {
    margin-top: 18px;
}

/* ─── VISIT US CARDS ──────────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-visit {
    margin-top: 40px;
    margin-bottom: 28px;
}
.csp-storefront--v2 .csp-store-visit__title {
    font-family: var(--csp-font-serif);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: var(--csp-ink);
}
.csp-storefront--v2 .csp-store-visit__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.csp-storefront--v2 .csp-store-visit__card {
    background: #fff;
    border: 1px solid var(--csp-grey-line);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 4px 14px rgba(190, 24, 93, 0.04);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.csp-storefront--v2 .csp-store-visit__card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.csp-storefront--v2 .csp-store-visit__card--link:hover {
    transform: translateY(-3px);
    box-shadow: var(--csp-shadow-hover);
    border-color: var(--csp-rose-wash);
}
.csp-storefront--v2 .csp-store-visit__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--csp-rose-soft) 0%, var(--csp-rose-wash) 100%);
    color: var(--csp-rose);
    display: flex;
    align-items: center;
    justify-content: center;
}
.csp-storefront--v2 .csp-store-visit__label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--csp-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.csp-storefront--v2 .csp-store-visit__value {
    font-size: 0.95rem;
    color: var(--csp-ink);
    line-height: 1.5;
    font-weight: 500;
}

/* ─── QR + SHARE CARD ─────────────────────────────────────────────────── */
.csp-storefront--v2 .csp-store-share {
    background: linear-gradient(135deg, var(--csp-rose) 0%, var(--csp-rose-dark) 100%);
    border-radius: 20px;
    padding: 32px;
    margin-top: 14px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(190, 24, 93, 0.25);
}
.csp-storefront--v2 .csp-store-share::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.csp-storefront--v2 .csp-store-share__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 1;
}
@media (max-width: 700px) {
    .csp-storefront--v2 .csp-store-share { padding: 24px; border-radius: 16px; }
    .csp-storefront--v2 .csp-store-share__inner { flex-direction: column; text-align: center; gap: 22px; }
}
.csp-storefront--v2 .csp-store-share__inner--noqr {
    text-align: center;
}
.csp-storefront--v2 .csp-store-share__inner--noqr .csp-store-share__desc {
    margin-left: auto;
    margin-right: auto;
}
.csp-storefront--v2 .csp-store-share__inner--noqr .csp-store-share__actions {
    justify-content: center;
}
.csp-storefront--v2 .csp-store-share__qr {
    flex: 0 0 auto;
    width: 180px;
    height: 180px;
    padding: 12px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.csp-storefront--v2 .csp-store-share__qr img {
    width: 100%;
    height: 100%;
    display: block;
}
.csp-storefront--v2 .csp-store-share__body { flex: 1 1 auto; min-width: 0; }
.csp-storefront--v2 .csp-store-share__eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--csp-gold-soft);
    background: rgba(217, 119, 6, 0.25);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 10px;
}
.csp-storefront--v2 .csp-store-share__title {
    font-family: var(--csp-font-serif);
    font-weight: 600;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 8px;
}
.csp-storefront--v2 .csp-store-share__desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 18px;
}
.csp-storefront--v2 .csp-store-share__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 700px) {
    .csp-storefront--v2 .csp-store-share__actions { justify-content: center; }
}
.csp-storefront--v2 .csp-store-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s, border-color 0.15s;
}
.csp-storefront--v2 .csp-store-share__btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}
.csp-storefront--v2 .csp-store-share__btn:active { transform: scale(0.98); }
.csp-storefront--v2 .csp-store-share__btn--primary {
    background: #fff;
    color: var(--csp-rose);
    border-color: #fff;
}
.csp-storefront--v2 .csp-store-share__btn--primary:hover {
    background: var(--csp-gold-soft);
    border-color: var(--csp-gold-soft);
    color: var(--csp-rose-dark);
}
/* Web Share API support — hide button if unsupported (JS adds this class) */
.csp-storefront--v2.no-native-share .csp-store-share__btn--share { display: none; }

/* ============================================================================
 * v5.0.15 — Mobile-only size trim for hero logo + share QR
 *
 * Desktop sizes are unchanged (120px logo, 180px QR).
 * On mobile the original sizes felt visually heavy — the logo took up ~32%
 * of viewport width and the QR took ~41%. App-icon sized targets feel right.
 * ============================================================================ */

@media (max-width: 768px) {
    /* Hero logo / monogram — app-icon sized */
    .csp-storefront--v2 .csp-store-hero__logo {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(190, 24, 93, 0.18);
    }
    .csp-storefront--v2 .csp-store-hero__monogram {
        font-size: 1.6rem;
    }

    /* Switch hero to horizontal compact layout on mobile (was column-centered),
       so the small logo sits left-of-name like an app row */
    .csp-storefront--v2 .csp-store-hero__inner {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 14px;
    }
    .csp-storefront--v2 .csp-store-hero__eyebrow {
        font-size: 0.62rem;
        padding: 4px 9px;
        letter-spacing: 1.2px;
        margin-bottom: 6px;
    }
    .csp-storefront--v2 .csp-store-hero__name {
        font-size: 1.25rem;
        line-height: 1.15;
    }
    /* On very narrow viewports, description gets a lot of vertical space —
       let it wrap below the logo+name row by reflowing back to a column when
       there IS a description, but with a still-compact logo */
    .csp-storefront--v2 .csp-store-hero__desc {
        font-size: 0.86rem;
        margin: 8px 0 12px;
    }
    .csp-storefront--v2 .csp-store-hero__chip {
        font-size: 0.72rem;
        padding: 5px 9px;
    }

    /* Share QR — app-icon sized, sits alongside text rather than centered alone */
    .csp-storefront--v2 .csp-store-share { padding: 18px; }
    .csp-storefront--v2 .csp-store-share__inner {
        flex-direction: row;          /* override the 700px column rule above */
        text-align: left;
        gap: 14px;
        align-items: center;
    }
    .csp-storefront--v2 .csp-store-share__qr {
        width: 88px;
        height: 88px;
        padding: 6px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
        align-self: flex-start;       /* stay top-aligned even as text wraps */
    }
    .csp-storefront--v2 .csp-store-share__eyebrow {
        font-size: 0.6rem;
        padding: 3px 9px;
        letter-spacing: 1.2px;
        margin-bottom: 5px;
    }
    .csp-storefront--v2 .csp-store-share__title {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    .csp-storefront--v2 .csp-store-share__desc {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 12px;
    }
    .csp-storefront--v2 .csp-store-share__actions { justify-content: flex-start; gap: 6px; }
    .csp-storefront--v2 .csp-store-share__btn {
        padding: 8px 12px;
        font-size: 0.72rem;
        gap: 5px;
    }
    .csp-storefront--v2 .csp-store-share__btn svg { width: 13px; height: 13px; }
}

/* Tiny screens — drop QR a touch more so the title doesn't truncate */
@media (max-width: 380px) {
    .csp-storefront--v2 .csp-store-hero__logo {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
    .csp-storefront--v2 .csp-store-hero__monogram { font-size: 1.4rem; }
    .csp-storefront--v2 .csp-store-share__qr {
        width: 76px;
        height: 76px;
    }
    .csp-storefront--v2 .csp-store-share__title { font-size: 1rem; }
}

/* ============================================================================
 * v5.0.16 — Mobile harmony pass
 *
 * Issues addressed (from user report on /seller/1/ mobile view):
 *   1. Hero felt tiny vs the wide banner — visual mismatch
 *   2. QR section still felt big / cluttered, not premium
 *   3. Inline same-line layout for QR needed tightening
 *
 * Strategy: scale the hero up slightly so it visually pairs with the banner.
 * Slim the banner aspect on mobile so it doesn't tower. Make the QR section
 * a clean premium card with QR left, text right, icon-only secondary buttons.
 * ============================================================================ */

@media (max-width: 768px) {
    /* ─── HERO ─────────────────────────────────────────────────────── */
    /* Restore a centered vertical layout — pairs better with full-width banner */
    .csp-storefront--v2 .csp-store-hero {
        padding: 24px 22px;
        border-radius: 18px;
    }
    .csp-storefront--v2 .csp-store-hero__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }
    /* Bigger logo so hero has presence */
    .csp-storefront--v2 .csp-store-hero__logo {
        flex: 0 0 84px;
        width: 84px;
        height: 84px;
        border-radius: 18px;
    }
    .csp-storefront--v2 .csp-store-hero__monogram {
        font-size: 2.1rem;
    }
    .csp-storefront--v2 .csp-store-hero__name {
        font-size: 1.45rem;
        line-height: 1.1;
    }
    .csp-storefront--v2 .csp-store-hero__desc {
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 6px 0 12px;
    }
    .csp-storefront--v2 .csp-store-hero__meta {
        justify-content: center;
    }
    .csp-storefront--v2 .csp-store-hero__chip {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    /* ─── BANNER — slim aspect on mobile so it doesn't dominate ────── */
    .csp-storefront--v2 .csp-store-banner {
        aspect-ratio: 3 / 2;       /* was 4/3 — narrower band */
    }
    @supports not (aspect-ratio: 3/2) {
        .csp-storefront--v2 .csp-store-banner { height: 200px; }
    }

    /* ─── SHARE CARD — premium tightened layout ───────────────────── */
    .csp-storefront--v2 .csp-store-share {
        padding: 20px;
        border-radius: 18px;
    }
    /* QR + content side-by-side with vertical centering */
    .csp-storefront--v2 .csp-store-share__inner {
        flex-direction: row;
        text-align: left;
        gap: 16px;
        align-items: center;
    }
    .csp-storefront--v2 .csp-store-share__qr {
        flex: 0 0 88px;
        width: 88px;
        height: 88px;
        padding: 6px;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
        align-self: center;
    }
    .csp-storefront--v2 .csp-store-share__body {
        flex: 1 1 0;
        min-width: 0;
    }
    .csp-storefront--v2 .csp-store-share__eyebrow {
        font-size: 0.58rem;
        padding: 3px 8px;
        letter-spacing: 1.1px;
        margin-bottom: 4px;
    }
    .csp-storefront--v2 .csp-store-share__title {
        font-size: 1.05rem;
        line-height: 1.2;
        margin-bottom: 4px;
    }
    /* Hide the descriptive text on small screens — QR + buttons are
       self-explanatory and the text was cluttering the inline layout */
    .csp-storefront--v2 .csp-store-share__desc {
        display: none;
    }
    /* Tight inline action row */
    .csp-storefront--v2 .csp-store-share__actions {
        display: flex;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 10px;
        flex-wrap: nowrap;
    }
    /* Primary (Download) keeps text + icon */
    .csp-storefront--v2 .csp-store-share__btn--primary {
        padding: 8px 14px;
        font-size: 0.74rem;
        gap: 6px;
        flex: 0 0 auto;
    }
    .csp-storefront--v2 .csp-store-share__btn--primary svg {
        width: 13px;
        height: 13px;
    }
    /* Secondary buttons become icon-only round chips */
    .csp-storefront--v2 .csp-store-share__btn:not(.csp-store-share__btn--primary) {
        padding: 0;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        gap: 0;
        flex: 0 0 36px;
        justify-content: center;
    }
    .csp-storefront--v2 .csp-store-share__btn:not(.csp-store-share__btn--primary) svg {
        width: 14px;
        height: 14px;
    }
    /* Hide the text label of icon-only secondary buttons */
    .csp-storefront--v2 .csp-store-share__btn:not(.csp-store-share__btn--primary) span,
    .csp-storefront--v2 .csp-store-share__btn:not(.csp-store-share__btn--primary) > span,
    .csp-storefront--v2 .csp-store-share__btn:not(.csp-store-share__btn--primary) #csp-store-copy-link-text {
        display: none;
    }
}

/* ─── Very narrow phones — keep things tight ─────────────────────── */
@media (max-width: 380px) {
    .csp-storefront--v2 .csp-store-hero__logo {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }
    .csp-storefront--v2 .csp-store-hero__monogram { font-size: 1.85rem; }
    .csp-storefront--v2 .csp-store-hero__name { font-size: 1.3rem; }
    .csp-storefront--v2 .csp-store-share__qr {
        flex: 0 0 76px;
        width: 76px;
        height: 76px;
    }
    .csp-storefront--v2 .csp-store-share__title { font-size: 0.98rem; }
    .csp-storefront--v2 .csp-store-share__btn--primary {
        padding: 7px 11px;
        font-size: 0.68rem;
    }
}

/* ============================================================================
 * v5.0.17 — Banner display fixes + tighter hero-to-banner spacing
 *
 * Issues observed in /seller/1/ on both desktop and mobile:
 *   1. Banner uses object-fit: cover which CROPS the seller's uploaded
 *      banner — content like "PROFESSIONAL WEBSITE DEVELOPMENT SERVICES"
 *      becomes "NAL ITE OPMENT CES" with letters chopped off both sides.
 *      Fix: switch to object-fit: contain so the WHOLE banner shows.
 *   2. Large dead gap between the hero card and the banner section
 *      (28px hero margin + 28px banner margin = 56px gap visually).
 *      Fix: tighten to 18px total.
 *   3. Banner background colour was rose-soft (light pink) which leaked
 *      through with object-fit: contain on banners that don't fill the
 *      aspect ratio. Switch to soft neutral so any banner looks clean.
 *
 * Override placement — these rules live at the END of the stylesheet so
 * they win specificity ties against earlier same-class rules.
 * ============================================================================ */

/* Tighten gap between hero and banner */
.csp-storefront--v2 .csp-store-hero { margin-bottom: 18px; }
.csp-storefront--v2 .csp-store-banners { margin-bottom: 22px; }

/* Show the FULL uploaded banner without cropping. Sides fill with a
   neutral wash so the result still feels intentional even when the seller
   uploads a banner that doesn't match the container aspect ratio. */
.csp-storefront--v2 .csp-store-banners {
    background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
}
.csp-storefront--v2 .csp-store-banner img {
    object-fit: contain !important;
    object-position: center;
    background: #ffffff;
}

/* Slightly more forgiving aspect ratio on desktop — taller banners read
   better when contained rather than cover-stretched */
@media (min-width: 769px) {
    .csp-storefront--v2 .csp-store-banner {
        aspect-ratio: 21 / 8;
    }
    @supports not (aspect-ratio: 21/8) {
        .csp-storefront--v2 .csp-store-banner { height: 320px; }
    }
}

/* Mobile — use 16:9 instead of 3:2 (gives the contained image more room
   without forcing a tall column) */
@media (max-width: 768px) {
    .csp-storefront--v2 .csp-store-banner {
        aspect-ratio: 16 / 9 !important;
    }
    @supports not (aspect-ratio: 16/9) {
        .csp-storefront--v2 .csp-store-banner { height: 200px !important; }
    }
    /* Hide the rose background "bleed" — neutralise on mobile too */
    .csp-storefront--v2 .csp-store-banners {
        margin-bottom: 16px;
    }
    /* Hero gap on mobile a touch tighter */
    .csp-storefront--v2 .csp-store-hero { margin-bottom: 14px; }
}
