/* =========================================
   Store Page Styles
   ========================================= */

.store-body {
    background: var(--bg-light);
}

/* Cart count badge in nav */
.cart-count {
    background: white;
    color: var(--primary-blue);
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

/* =========================================
   Promo Hero Carousel
   ========================================= */
.promo-hero {
    padding: 100px 24px 32px;
}

.promo-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.promo-carousel {
    position: relative;
    height: 420px;
}

.promo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 64px;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s var(--ease-out-expo);
    color: white;
    overflow: hidden;
}

.promo-slide.active {
    opacity: 1;
    pointer-events: all;
}

.promo-slide[data-bg="cycling"] {
    background: linear-gradient(135deg, #0066FF 0%, #003D99 100%);
}

.promo-slide[data-bg="padel"] {
    background: linear-gradient(135deg, #0052cc 0%, #0066FF 100%);
}

.promo-slide[data-bg="gear"] {
    background: linear-gradient(135deg, #EA580C 0%, #DC2626 100%);
}

.promo-slide::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.promo-slide::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.promo-content {
    flex: 1;
    max-width: 560px;
    z-index: 2;
}

.promo-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.promo-badge-green { background: rgba(34, 197, 94, 0.25); border-color: rgba(34, 197, 94, 0.4); }
.promo-badge-orange { background: rgba(249, 115, 22, 0.25); border-color: rgba(249, 115, 22, 0.4); }

.promo-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.promo-highlight {
    background: linear-gradient(120deg, #FCD34D 0%, #FBBF24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.promo-content p {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    line-height: 1.5;
    max-width: 480px;
}

.promo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.promo-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    opacity: 0.9;
    font-weight: 500;
}

.promo-meta strong {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.promo-visual {
    flex-shrink: 0;
    width: 320px;
    z-index: 2;
}

.promo-visual img {
    width: 100%;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

/* Carousel controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--ease-out-expo);
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    color: var(--text-dark);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal);
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Navbar dropdown styles are defined globally in styles.css and are
   intentionally NOT duplicated here so the store page gets the same
   hover-bridge + wide-variant behavior as every other page. */

/* =========================================
   Unified Store Category Bar
   ========================================= */
.store-cat-bar {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 6px;
    margin-bottom: 24px;
    position: relative; /* needed so sub-panel can break out via fixed pos */
    overflow: visible;  /* allow sub-dropdowns to overflow */
}

.store-cat-scroll {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Vertical padding gives the active button's drop shadow room to render.
       overflow-x:auto forces the y-axis to clip at the padding box, so this
       buffer keeps the glow from being cut off by the scroll container. */
    padding: 8px 2px;
}

.store-cat-scroll::-webkit-scrollbar { display: none; }

.store-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--duration-normal) var(--ease-out-expo);
    flex-shrink: 0;
}

.store-cat-btn i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Custom SVG icons in store category bar */
.store-cat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* When button is active (blue bg), invert the SVG so it shows white */
.store-cat-btn.active .store-cat-icon {
    filter: brightness(0) invert(1);
}

/* Promo button — keep icon red-tinted, invert on active */
.store-cat-btn--promo .store-cat-icon {
    filter: invert(20%) sepia(90%) saturate(700%) hue-rotate(340deg) brightness(90%);
}
.store-cat-btn--promo.active .store-cat-icon {
    filter: brightness(0) invert(1);
}

/* New button — keep icon green-tinted, invert on active */
.store-cat-btn--new .store-cat-icon {
    filter: invert(35%) sepia(60%) saturate(500%) hue-rotate(100deg) brightness(90%);
}
.store-cat-btn--new.active .store-cat-icon {
    filter: brightness(0) invert(1);
}

.store-cat-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.store-cat-btn.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: var(--shadow-blue);
}

.store-cat-btn--promo {
    color: #DC2626;
}
.store-cat-btn--promo:hover {
    background: #FEF2F2;
    color: #DC2626;
}
.store-cat-btn--promo.active {
    background: #DC2626;
    color: white;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.store-cat-btn--new {
    color: #16A34A;
}
.store-cat-btn--new:hover {
    background: #F0FDF4;
    color: #16A34A;
}
.store-cat-btn--new.active {
    background: #16A34A;
    color: white;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.store-cat-btn--rent {
    color: var(--primary-blue);
}
.store-cat-btn--rent:hover {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}
.store-cat-btn--rent.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: var(--shadow-blue);
}

/* Padel context banner — surfaced when browsing padel category */
.padel-rent-hint {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, #FFF7ED 0%, #FFFBF5 100%);
    border: 1px solid rgba(217, 119, 6, 0.25);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s;
}

.padel-rent-hint[hidden] { display: none; }

.padel-rent-hint:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.18);
}

.padel-rent-hint .hint-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.padel-rent-hint .hint-icon i {
    width: 18px;
    height: 18px;
}

.padel-rent-hint .hint-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.padel-rent-hint .hint-text strong {
    display: block;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1px;
}

.padel-rent-hint .hint-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #D97706;
}

.padel-rent-hint .hint-cta i {
    width: 14px;
    height: 14px;
    transition: transform 0.2s var(--ease-out-expo);
}

.padel-rent-hint:hover .hint-cta i {
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .padel-rent-hint {
        flex-wrap: wrap;
        gap: 10px;
    }
    .padel-rent-hint .hint-text { flex-basis: 100%; order: 2; }
    .padel-rent-hint .hint-cta { margin-left: auto; }
}

.store-cat-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
    flex-shrink: 0;
    margin: 0 4px;
}

/* =========================================
   Category Sub-Dropdowns (Apparel / Helmet / Parts)
   Linear-inspired dark multi-column panel
   ========================================= */
.cat-sub-dropdown {
    position: relative;
    flex-shrink: 0;
}

.cat-sub-trigger {
    /* inherits .store-cat-btn styles */
}

.cat-sub-chevron {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
    transition: transform 200ms var(--ease-out-expo);
    opacity: 0.6;
}

.cat-sub-dropdown.open .cat-sub-chevron,
.cat-sub-dropdown:hover .cat-sub-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* The dark floating panel — uses fixed positioning to escape overflow containers */
.cat-sub-panel {
    position: fixed;
    top: 0; /* set dynamically by JS */
    left: 0; /* set dynamically by JS */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    min-width: 380px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
        opacity 200ms var(--ease-out-expo),
        transform 200ms var(--ease-out-expo);
    z-index: 999;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

/* Wide variant for Parts (4 columns) */
.cat-sub-panel--wide {
    grid-template-columns: repeat(4, 1fr);
    min-width: 580px;
}

.cat-sub-dropdown:hover .cat-sub-panel,
.cat-sub-dropdown.open .cat-sub-panel {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.cat-sub-col {
    padding: 4px 14px;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-sub-col:first-child { padding-left: 4px; }
.cat-sub-col:last-child {
    padding-right: 4px;
    border-right: none;
}

.cat-sub-heading {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--primary-blue);
    margin-bottom: 6px;
    padding: 0 6px 4px;
    border-bottom: 1px solid var(--border-light);
}

.cat-sub-item {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-body);
    padding: 5px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
    white-space: nowrap;
}

.cat-sub-item:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    transform: translateX(3px);
}

.cat-sub-item.active {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 600;
}

.cat-sub-item--rent {
    color: var(--primary-blue);
}
.cat-sub-item--rent:hover {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.cat-sub-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

/* =========================================
   Store Main Layout
   -----------------------------------------
   The 12-col grid system (columns, gutter,
   margin, sidebar/content spans, products
   per row) is defined in grid-config.css.
   Edit that file to tune the layout.
   ========================================= */
.store-main {
    padding: 32px 0 80px;
}

/* Store Layout Grid — engine lives in grid-config.css */

/* =========================================
   Sidebar Filter
   ========================================= */
.store-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.store-sidebar::-webkit-scrollbar { width: 6px; }
.store-sidebar::-webkit-scrollbar-track { background: transparent; }
.store-sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h3 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.filter-reset {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    font-family: var(--font-main);
}

.filter-reset:hover { text-decoration: underline; }

.filter-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.filter-group:last-child { border-bottom: none; }

.filter-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search input */
.search-input {
    position: relative;
}

.search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-faint);
}

.search-input input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-main);
    transition: border-color var(--duration-normal);
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Price range */
.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.price-field label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.price-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: var(--font-main);
}

.price-field input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.price-presets button {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-normal);
    font-family: var(--font-main);
}

.price-presets button:hover {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* Checkbox filters */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-body);
    font-weight: 500;
    transition: color var(--duration-fast);
}

.filter-check:hover { color: var(--primary-blue); }

.filter-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all var(--duration-fast);
}

.filter-check input[type="checkbox"]:checked {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.filter-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* =========================================
   Products Section
   ========================================= */
.store-products {
    min-width: 0;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.toolbar-left strong { color: var(--text-dark); font-weight: 700; }

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-mobile-btn {
    display: none;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    align-items: center;
    gap: 6px;
    font-family: var(--font-main);
}

.sort-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.sort-wrapper select {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    background: white;
}

.sort-wrapper select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* =========================================
   Product Cards
   ========================================= */
/* Products grid — engine (columns-per-row + gutter) lives in grid-config.css */

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.product-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-light);
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.06);
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.product-badge {
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-discount { background: #EF4444; color: white; }
.badge-new { background: #22C55E; color: white; }
.badge-bundle { background: #F59E0B; color: white; }
.badge-rent { background: var(--primary-blue); color: white; }

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--duration-normal);
    z-index: 2;
}

.wishlist-btn:hover {
    background: white;
    color: #EF4444;
}

.wishlist-btn.active {
    color: #EF4444;
}

.wishlist-btn.active i { fill: currentColor; }

.product-content {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Brand hidden in compact card — keeps visual focus on name + price */
.product-brand {
    display: none;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Removed min-height so short names don't add empty space */
    margin-bottom: 2px;
}

.product-sold {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-sold::before {
    content: '★';
    color: #F59E0B;
    font-size: 0.8rem;
    line-height: 1;
}

.product-pricing {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.product-price-original {
    font-size: 0.7rem;
    color: var(--text-faint);
    text-decoration: line-through;
}

.product-discount {
    background: #FEE2E2;
    color: #DC2626;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-rent-note {
    font-size: 0.7rem;
    color: var(--primary-blue);
    font-weight: 600;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 102, 255, 0.08);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    align-self: flex-start;   /* don't stretch full-width */
    margin-top: 2px;
}

.product-rent-note i {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* Rent-mode variant: lead with the rate, hint at savings tier */
.product-rent-note--lead {
    color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.08);
    font-weight: 500;
    padding: 4px 10px;
}

.product-price-unit {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Rent-mode card accent — keep brand blue, rely on icon + label for differentiation */
.product-card--rent .product-price {
    color: var(--primary-blue);
}
.product-card--rent .badge-discount,
.product-card--rent .badge-bundle {
    display: none;
}

/* Sold/availability row also carries an icon when in rent mode */
.product-card--rent .product-sold i {
    width: 12px;
    height: 12px;
    margin-right: 3px;
    vertical-align: -2px;
}

/* Product action buttons */
.product-actions {
    display: flex;
    gap: 6px;
    padding: 0 14px 14px;
}

.product-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--duration-normal) var(--ease-out-expo);
    font-family: var(--font-main);
}

.product-btn i { width: 14px; height: 14px; }

.product-btn.btn-buy {
    background: var(--primary-blue);
    color: white;
}

.product-btn.btn-buy:hover {
    background: var(--primary-blue-hover);
}

.product-btn.btn-rent {
    background: white;
    color: var(--primary-blue);
    border: 1.5px solid var(--primary-blue);
}

.product-btn.btn-rent:hover {
    background: var(--primary-blue);
    color: white;
}

.product-btn.btn-full {
    width: 100%;
}

.product-btn:active { transform: scale(0.97); }

/* Stock indicator — compact, only shown for low/out states */
.product-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #16A34A;
    font-weight: 600;
    line-height: 1.2;
}

.product-stock.low { color: #F59E0B; }
.product-stock.out { color: #EF4444; }

/* Hide "in stock" label — implicit when card is shown, saves vertical space */
.product-stock:not(.low):not(.out) {
    display: none;
}

.product-stock::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* =========================================
   Pagination
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-body);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    transition: all var(--duration-normal);
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.page-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
}

/* =========================================
   Trust Bar
   ========================================= */
.trust-bar {
    background: white;
    padding: 48px 0;
    border-top: 1px solid var(--border-light);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trust-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trust-icon i { width: 22px; height: 22px; }

.trust-item h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.trust-item p {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* =========================================
   Rent Modal
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal);
}

.modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: background var(--duration-normal);
}

.modal-close:hover { background: var(--border-light); }

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-dark);
    margin-top: 12px;
    letter-spacing: -0.01em;
}

.rent-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.rent-option {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--duration-normal);
    font-family: var(--font-main);
    text-align: left;
}

.rent-option:hover {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.04);
}

.rent-option.active {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 255, 0.08);
}

.rent-days strong {
    display: block;
    font-size: var(--text-base);
    color: var(--text-dark);
    font-weight: 700;
}

.rent-days span {
    font-size: var(--text-xs);
    color: #16A34A;
    font-weight: 600;
}

.rent-price {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--primary-blue);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
    background: var(--primary-blue);
}

.modal-actions .btn:hover {
    background: var(--primary-blue-hover);
}

/* =========================================
   Toast
   ========================================= */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: var(--text-dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-xl);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: var(--text-sm);
    z-index: 400;
    transition: transform var(--duration-normal) var(--ease-out-back);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    width: 18px;
    height: 18px;
    color: #22C55E;
}

/* =========================================
   Responsive
   ========================================= */
/* Tablet — grid breakpoint handled in grid-config.css */
@media (max-width: 1024px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Nav dropdown hidden on mobile — menu-toggle takes over */
    .nav-dropdown-menu { display: none; }
}

@media (max-width: 768px) {
    .promo-hero { padding: 88px 16px 16px; }
    .promo-carousel { height: auto; min-height: 460px; }
    .promo-slide {
        flex-direction: column;
        padding: 40px 24px;
        text-align: center;
        gap: 24px;
    }
    .promo-content { text-align: center; }
    .promo-actions { justify-content: center; }
    .promo-visual { width: 200px; order: -1; }
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }

    /* Category bar on tablet/mobile: wrap into pill rows, keep labels visible */
    .store-cat-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 6px;
        padding-bottom: 2px;
    }
    .store-cat-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
        gap: 5px;
        flex-shrink: 1;
    }
    .store-cat-btn span { display: inline; }
    .store-cat-btn i { width: 15px; height: 15px; }

    /* Divider becomes a full-width row break so Promo/Baru/Sewa Padel
       land on their own row cleanly instead of leaving a floating sliver */
    .store-cat-divider {
        width: 100%;
        height: 1px;
        margin: 4px 0;
        flex-basis: 100%;
    }

    .store-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 150;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform var(--duration-normal) var(--ease-out-expo);
    }
    .store-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 140;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--duration-normal);
    }

    .sidebar-backdrop.open {
        opacity: 1;
        pointer-events: all;
    }

    .filter-mobile-btn { display: inline-flex; }

    .trust-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Product card is now clickable */
.product-card {
    cursor: pointer;
}

/* =========================================
   Product Detail Modal
   ========================================= */
.modal-detail {
    max-width: 720px;
    padding: 0;
    overflow: hidden;
}

#detail-modal-body {
    display: flex;
    flex-direction: row;
}

.detail-image {
    position: relative;
    width: 45%;
    min-height: 360px;
    background: var(--bg-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-image .product-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

.detail-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    max-height: 80vh;
}

.detail-name {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-meta i {
    width: 14px;
    height: 14px;
}

.detail-rating i {
    color: #F59E0B;
    fill: #F59E0B;
}

.detail-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-price {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-dark);
}

.detail-original {
    font-size: var(--text-base);
    color: var(--text-faint);
    text-decoration: line-through;
}

.detail-discount {
    background: #FEE2E2;
    color: #DC2626;
    font-size: var(--text-xs);
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.detail-rent-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--primary-blue);
    font-weight: 600;
    background: rgba(0, 102, 255, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    width: fit-content;
}

.detail-rent-note i {
    width: 14px;
    height: 14px;
}

.detail-rent-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.detail-rent-section h4 {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.detail-actions .product-btn {
    flex: 1;
    padding: 14px;
    font-size: var(--text-base);
}

@media (max-width: 768px) {
    .modal-detail {
        max-width: calc(100% - 24px);
        max-height: 90vh;
    }

    #detail-modal-body {
        flex-direction: column;
    }

    .detail-image {
        width: 100%;
        min-height: 240px;
        max-height: 280px;
    }

    .detail-info {
        padding: 24px;
        max-height: none;
    }

    .detail-name {
        font-size: var(--text-xl);
    }

    .detail-price {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 480px) {
    .quick-cats-grid { grid-template-columns: repeat(3, 1fr); }
    .promo-content h1 { font-size: 1.75rem; }
    /* Small-phone gutter tightening handled in grid-config.css */

    .detail-info {
        padding: 20px;
    }

    .detail-actions {
        flex-direction: column;
    }
}
