/* ============================================================
   APPLE DESIGN SYSTEM
   Inspired by Apple's Human Interface Guidelines
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ FONT AWESOME ICONS ============ */
/* Ensure Font Awesome icons display properly with correct font families */
i[class*="fa"] {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
    vertical-align: -0.125em;
}

.fas {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.fab {
    font-family: 'Font Awesome 6 Brands';
    font-weight: 400;
}

.far {
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
}

/* Icon in buttons/links */
button i,
a i,
span i {
    font-weight: inherit;
    font-size: inherit;
}

/* Ensure filter toggle icons display */
.filter-toggle i {
    font-size: 16px;
}

/* Ensure wishlist toggle icons display */
.wishlist-toggle i,
.comparison-toggle i {
    font-size: 18px;
}

/* Search icon styling */
.search-icon {
    font-size: 16px;
}

/* Detail item icons */
.detail-item i {
    font-size: 14px;
    min-width: 16px;
    text-align: center;
}

/* ============ ACCESSIBILITY ============ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--apple-blue);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 999;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============ HIGH CONTRAST MODE ============ */
@media (prefers-contrast: more) {
    :root {
        --separator-opaque: #808080;
        --gray-1: #000000;
        --gray-2: #1a1a1a;
    }
}

/* Apple System Colors */
:root {
    /* Base */
    --apple-blue: #007AFF;
    --apple-green: #34C759;
    --apple-red: #FF3B30;
    --apple-orange: #FF9500;
    --apple-purple: #AF52DE;
    --apple-teal: #5AC8FA;

    /* Grays (iOS system grays) */
    --gray-1: #8E8E93;
    --gray-2: #AEAEB2;
    --gray-3: #C7C7CC;
    --gray-4: #D1D1D6;
    --gray-5: #E5E5EA;
    --gray-6: #F2F2F7;

    /* Backgrounds */
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-grouped: #F2F2F7;

    /* Labels */
    --label-primary: #1D1D1F;
    --label-secondary: #6E6E73;
    --label-tertiary: #3C3C4399;
    --label-quaternary: #3C3C432E;

    /* Separator */
    --separator: rgba(60, 60, 67, 0.12);
    --separator-opaque: #E5E5EA;

    /* Fill */
    --fill-primary: rgba(120, 120, 128, 0.2);
    --fill-secondary: rgba(120, 120, 128, 0.16);
    --fill-tertiary: rgba(118, 118, 128, 0.12);

    /* White */
    --white: #FFFFFF;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    /* Shadow */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-elevated: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============ BASE ============ */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
        'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.9), rgba(239,244,250,0.9) 35%),
        linear-gradient(180deg, #f7f9fc 0%, #eef4fb 100%);
    color: var(--label-primary);
    line-height: 1.5;
    font-size: 15px;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ IMAGE OPTIMIZATION ============ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.product-img {
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    transition: opacity 0.3s ease;
}

.product-img.loaded {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

/* ============ HEADER / SHOP CARD ============ */
.shop-header {
    background: linear-gradient(180deg, #f7f9fc 0%, #eef4fb 100%);
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 55vh;
}

.shop-card {
    max-width: 640px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(31, 45, 66, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 42px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.shop-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    filter: blur(16px);
    opacity: 0.45;
    pointer-events: none;
}

.shop-card-top {
    margin-bottom: 32px;
}

.shop-name {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.05;
}

.shop-tagline {
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.4;
}

.shop-details {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.04);
}

.detail-item i {
    font-size: 18px;
    color: #2563eb;
    min-width: 44px;
    text-align: center;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-text {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-title,
.detail-subtitle {
    display: block;
}

.detail-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.detail-title a {
    color: inherit;
    text-decoration: none;
}

.detail-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.social-links {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 4px;
}

.social-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #2563eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    background-color: #2563eb;
    color: #ffffff;
}

@media (max-width: 768px) {
    .shop-card {
        padding: 32px 22px;
    }

    .shop-name {
        font-size: 32px;
    }

    .shop-tagline {
        font-size: 16px;
    }

    .detail-item {
        padding: 16px 18px;
    }

    .detail-item i {
        width: 40px;
        height: 40px;
    }
}

/* ============ SEARCH BAR ============ */
.search-container {
    flex: 1 1 0;
    width: 100%;
    max-width: none;
    margin: 24px 0 0;
    padding: 0 0 0 0;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f2f2f7;
    border-radius: 14px;
    padding: 0 14px;
    height: 48px;
    transition: 0.2s;
}

.search-bar:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,122,255,0.15);
}

.search-icon {
    color: #8e8e93;
    font-size: 15px;
    margin-right: 8px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--gray-1);
}

.clear-search {
    background: none;
    border: none;
    color: var(--gray-2);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    display: none;
    /* Hidden by default */
}

.clear-search:hover {
    color: var(--gray-1);
}

/* ============ SEARCH & FILTER WRAPPER ============ */
.search-filter-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Mobile */
@media (max-width: 768px) {
    .search-filter-wrapper {
        flex-direction: column;
    }
}

/* ============ SORT & CONTROLS ============ */
.controls-wrapper {
    display: flex;
    gap: 10px;
}

.sort-select,
.filter-toggle,
.wishlist-toggle,
.comparison-toggle {
    height: 48px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fff;
    padding: 0 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sort-select {
    min-width: 100px;
}

.control-label {
    display: none;
}

.filter-toggle:focus,
.wishlist-toggle:focus,
.comparison-toggle:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sort-select:active,
.filter-toggle:active,
.wishlist-toggle:active,
.comparison-toggle:active {
    transform: translateY(-1px) scale(0.97);
}

.wishlist-count,
.comparison-count {
    background: var(--apple-blue);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
}

/* ============ FILTER PANEL ============ */
.filter-panel {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    background: var(--white);
    border: 1px solid var(--separator-opaque);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 100;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-panel.active {
    display: flex;
    flex-direction: column;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--separator-opaque);
    flex-shrink: 0;
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--label-primary);
    margin: 0;
}

.filter-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-1);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: var(--radius-md);
}

.filter-close:hover {
    color: var(--label-primary);
    background-color: var(--fill-tertiary);
}

.filter-group {
    padding: 20px 24px;
    border-bottom: 1px solid var(--separator-opaque);
}

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

.filter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--label-primary);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Price Range Slider */
.price-range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-slider {
    width: 100%;
    height: 5px;
    border-radius: 4px;
    background: var(--gray-5);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--apple-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s ease;
}

.price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--apple-blue);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s ease;
}

.price-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.price-display {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--apple-blue);
    padding: 8px;
    background: rgba(0, 122, 255, 0.06);
    border-radius: var(--radius-sm);
}

/* Price Presets */
.price-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.preset-btn {
    padding: 10px 12px;
    border: 1.5px solid var(--gray-3);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--label-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.preset-btn:hover {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
    color: var(--apple-blue);
}

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

/* Price Inputs */
.price-inputs-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.price-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--label-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-with-symbol {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--gray-3);
    border-radius: var(--radius-md);
    background: var(--white);
    padding: 0 10px;
    transition: border-color 0.2s ease;
}

.input-with-symbol:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.input-with-symbol span {
    font-weight: 600;
    color: var(--label-secondary);
    font-size: 14px;
}

.price-input-group input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 10px 6px;
    color: var(--label-primary);
    font-weight: 500;
}

.price-input-group input::placeholder {
    color: var(--gray-2);
}

.price-separator {
    font-size: 13px;
    color: var(--gray-1);
    font-weight: 500;
    margin-bottom: 10px;
}

/* Filter Options (Checkboxes) */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--label-secondary);
    user-select: none;
    transition: color 0.2s ease;
}

.filter-checkbox:hover {
    color: var(--label-primary);
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--apple-blue);
    flex-shrink: 0;
}

.filter-checkbox span {
    flex: 1;
}

/* Filter Reset Button */
.filter-reset {
    background: var(--fill-tertiary);
    border: none;
    padding: 10px 16px;
    margin: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--label-secondary);
    transition: all 0.22s ease;
    font-family: inherit;
}

.filter-reset:hover {
    background: var(--fill-secondary);
    color: var(--label-primary);
}

.filter-reset:active {
    background: var(--apple-blue);
    color: var(--white);
}

/* ============ CATEGORIES SECTION ============ */
.categories-section {
    padding: 24px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.categories-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 16px 20px;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-grid::-webkit-scrollbar {
    display: none;
}

.category-item {
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--gray-6);
    color: var(--label-secondary);
    letter-spacing: -0.1px;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-item:hover {
    background-color: var(--gray-5);
    color: var(--label-primary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.category-item.active {
    background: #005BD3;
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 91, 211, 0.25);
    transform: scale(0.98);
}
/* ============ PRODUCTS SECTION ============ */
.products-section {
    padding: 40px 20px 80px;
    background: transparent;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
/* ============ PRODUCT CARD ============ */
.product-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.product-image {
    width: 100%;
    height: 320px;
    background-color: var(--gray-6);
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
    background-color: #f2f2f7;
}

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

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.price-text {
    display: block;
}

.discount-text {
    background-color: var(--apple-red);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 50px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge {
    background: linear-gradient(135deg, var(--apple-blue), #0066E5);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25);
}

.badge-new {
    background: linear-gradient(135deg, var(--apple-green), #2AB745);
}

.badge-popular {
    background: linear-gradient(135deg, var(--apple-orange), #FF8C00);
}

/* Stock Status Badge */
.stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 59, 48, 0.9);
    color: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.out-of-stock-badge {
    background-color: rgba(255, 59, 48, 0.85);
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--gray-1);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.wishlist-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.wishlist-btn:hover {
    background-color: var(--white);
    color: var(--apple-red);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.wishlist-btn.active {
    background-color: var(--apple-red);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

/* Comparison Checkbox */
.comparison-checkbox {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.comparison-checkbox input {
    cursor: pointer;
    accent-color: var(--apple-blue);
    width: 16px;
    height: 16px;
}

.comparison-checkbox label {
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--label-secondary);
    white-space: nowrap;
}

/* Out of Stock State */
.product-card.out-of-stock {
    opacity: 0.65;
    pointer-events: none;
}

.product-card.out-of-stock .product-card:hover {
    transform: none;
}

/* Product Info */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 11px;
    color: var(--gray-1);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    font-weight: 600;
}

.product-code {
    font-size: 12px;
    color: var(--apple-blue);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--label-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.product-description {
    font-size: 13px;
    color: var(--gray-1);
    margin-bottom: 14px;
    flex-grow: 1;
    line-height: 1.5;
}

/* Price Display */
.price-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--apple-green);
    letter-spacing: -0.3px;
}

.original-price {
    font-size: 14px;
    color: var(--gray-1);
    text-decoration: line-through;
}

/* Product Tags */
.product-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tag {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 12px;
    border-top: 0.5px solid var(--separator-opaque);
}

.button-group {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS (Apple-style) ============ */
.btn-preview,
.btn-material,
.btn-buy-whatsapp {
    flex: 1;
    min-width: 80px;
    padding: 9px 12px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    letter-spacing: -0.1px;
    font-family: inherit;
}

.btn-preview:disabled,
.btn-material:disabled,
.btn-buy-whatsapp:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-preview:disabled:hover,
.btn-buy-whatsapp:disabled:hover {
    transform: none;
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
}

/* View — Apple Blue tinted */
.btn-preview {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
}

.btn-preview:hover {
    background-color: var(--apple-blue);
    color: var(--white);
    transform: scale(1.02);
}

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

/* Details — neutral fill */
.btn-material {
    background-color: var(--fill-tertiary);
    color: var(--label-secondary);
}

.btn-material:hover {
    background-color: var(--fill-primary);
    color: var(--label-primary);
    transform: scale(1.02);
}

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

/* Buy / WhatsApp — Apple Green */
.btn-buy-whatsapp {
    background-color: rgba(52, 199, 89, 0.12);
    color: var(--apple-green);
}

.btn-buy-whatsapp:hover {
    background-color: var(--apple-green);
    color: var(--white);
    transform: scale(1.02);
}

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

/* No Results Message */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.no-results i {
    font-size: 48px;
    color: var(--gray-3);
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--label-primary);
    margin-bottom: 8px;
    margin: 0;
}

.no-results p {
    font-size: 14px;
    color: var(--gray-1);
    margin: 0;
}

/* ============ MODAL (Apple Sheet) ============ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content-detailed {
    background-color: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: sheetUp 0.36s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-modal);
    border: 0.5px solid var(--separator-opaque);
}

@keyframes sheetUp {
    from {
        transform: translateY(28px) scale(0.97);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.modal-image-section {
    position: relative;
    background-color: var(--gray-6);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.price-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.modal-details-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 28px 28px;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-scroll-content {
    flex: 1;
}

.modal-scroll-content::-webkit-scrollbar {
    width: 0;
}

.modal-header-info {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.modal-category {
    font-size: 11px;
    color: var(--gray-1);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    background: var(--gray-6);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.modal-code {
    font-size: 11px;
    color: var(--apple-blue);
    font-weight: 700;
    background: rgba(0, 122, 255, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.modal-product-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--label-primary);
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -0.6px;
}

.modal-description {
    font-size: 15px;
    color: var(--gray-1);
    line-height: 1.6;
    margin-bottom: 22px;
}

.specifications-section {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 0.5px solid var(--separator-opaque);
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-1);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 12px;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background-color: var(--gray-6);
    border-radius: var(--radius-md);
}

.spec-item .spec-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-1);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.spec-item .spec-label i {
    color: var(--apple-blue);
    font-size: 12px;
}

.spec-item .spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--label-primary);
    letter-spacing: -0.2px;
}

.spec-item .price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--apple-green);
}

.details-section {
    margin-bottom: 20px;
}

.details-text {
    font-size: 14px;
    color: var(--label-secondary);
    line-height: 1.7;
    background-color: var(--gray-6);
    padding: 14px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--apple-blue);
    letter-spacing: -0.1px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background-color: rgba(118, 118, 128, 0.25);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    color: var(--label-secondary);
    line-height: 1;
    font-family: inherit;
}

.modal-close:hover {
    background-color: rgba(118, 118, 128, 0.35);
    transform: scale(1.08);
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding-top: 18px;
    border-top: 0.5px solid var(--separator-opaque);
    margin-top: 4px;
}

.btn-details-close {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    letter-spacing: -0.2px;
    background-color: var(--fill-tertiary);
    color: var(--label-secondary);
}

.btn-details-close:hover {
    background-color: var(--fill-primary);
    color: var(--label-primary);
}

/* ============ IMAGE LIGHTBOX (View Button) ============ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeIn 0.22s ease;
    cursor: zoom-out;
}

.lightbox-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxZoom 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.88);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(118, 118, 128, 0.35);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.18s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(118, 118, 128, 0.6);
    transform: scale(1.1);
}

.lightbox-image-wrap {
    max-width: 88vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.lightbox-image-wrap img {
    max-width: 88vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 14px;
}

.lightbox-caption {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

#lightboxName {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

#lightboxCode {
    background: rgba(0, 122, 255, 0.3);
    color: #5AC8FA;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.3px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image-section {
        min-height: 240px;
    }

    .modal-product-image {
        min-height: 240px;
    }

    .modal-details-section {
        padding: 24px 20px 20px;
    }

    .modal-product-name {
        font-size: 22px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .modal-content-detailed {
        border-radius: 16px;
        max-height: 95vh;
    }

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .categories-grid {
        gap: 8px;
        padding: 6px 0;
    }

    .category-item {
        padding: 6px 12px;
        font-size: 13px;
    }

    .search-filter-wrapper {
        flex-direction: column;
        max-width: 100%;
        gap: 10px;
    }

    .controls-wrapper {
        display: grid;
        width: 100%;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .sort-select,
    .wishlist-toggle,
    .comparison-toggle,
    .filter-toggle {
        width: 100%;
        justify-content: center;
    }

    .control-label {
        display: inline-block;
    }

    .filter-panel {
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid var(--separator-opaque);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-header {
        padding: 40px 16px;
        min-height: auto;
        background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    }

    .shop-card {
        padding: 32px 20px;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    }

    .shop-name {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .shop-tagline {
        font-size: 12px;
    }

    .shop-card-top {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .shop-details {
        margin-bottom: 12px;
        gap: 7px;
    }

    .detail-item {
        gap: 8px;
        font-size: 12px;
    }

    .detail-item i {
        font-size: 13px;
    }

    .social-links {
        gap: 8px;
    }

    .social-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .products-section {
        padding: 24px 12px 40px;
    }

    .categories-section {
        padding: 10px 12px 14px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lightbox-image-wrap img {
        max-width: 96vw;
        max-height: 68vh;
    }

    .button-group {
        gap: 6px;
    }

    .btn-preview,
    .btn-material,
    .btn-buy-whatsapp {
        font-size: 12px;
        padding: 8px 10px;
    }

    .categories-grid {
        gap: 6px;
        padding: 4px 0;
    }

    .category-item {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 20px;
    }

    .container {
        padding: 0 16px;
    }

    .search-filter-wrapper {
        flex-direction: column;
        max-width: 100%;
        gap: 8px;
        margin: 12px auto 0;
    }

    .search-container {
        width: 100%;
    }

    .controls-wrapper {
        display: grid;
        width: 100%;
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .sort-select,
    .wishlist-toggle,
    .comparison-toggle,
    .filter-toggle {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 6px 10px;
    }

    .filter-panel {
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid var(--separator-opaque);
    }

    .filter-header {
        padding: 14px 16px;
    }

    .filter-group {
        padding: 12px 16px;
    }

    .filter-reset {
        margin: 12px 16px;
    }
}

/* ============ WISHLIST & COMPARISON ============ */
.wishlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wishlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--gray-6);
    border-radius: var(--radius-md);
}

.wishlist-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.wishlist-item-info {
    flex: 1;
}

.wishlist-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--label-primary);
    margin-bottom: 4px;
}

.wishlist-item-info p {
    font-size: 13px;
    color: var(--apple-green);
    font-weight: 600;
}

.wishlist-item-actions {
    display: flex;
    gap: 8px;
}

.btn-remove {
    background-color: var(--fill-tertiary);
    border: none;
    color: var(--label-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background-color: var(--apple-red);
    color: var(--white);
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 0.5px solid var(--separator-opaque);
}

.comparison-table th {
    background-color: var(--gray-6);
    font-weight: 600;
    color: var(--label-primary);
    font-size: 13px;
}

.comparison-table td {
    font-size: 13px;
    color: var(--label-secondary);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: none;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 18px;
}

.toast-success i {
    color: var(--apple-green);
}

.toast-info i {
    color: var(--apple-blue);
}

.toast-message {
    color: var(--label-primary);
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 20px;
        left: 20px;
        right: 20px;
        align-items: center;
    }
    .toast {
        width: 100%;
        transform: translateY(120%);
    }
    .toast.show {
        transform: translateY(0);
    }
}

/* ============ EMPTY STATES ============ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-3);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--label-secondary);
    font-size: 15px;
    font-weight: 500;
}

/* ============ FOOTER ============ */
.footer {
    background-color: var(--label-primary);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 60px;
    border-top: 0.5px solid var(--separator-opaque);
}

.footer-content {
    display: flex;
    justify-content: center;
    max-width: 100%;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-section {
    flex: 0 1 600px;
    text-align: center;
}

.footer-section h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: var(--white);
}

.footer-section p {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.footer-section p i {
    margin-right: 8px;
    color: var(--apple-blue);
}

.footer-bottom {
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    word-wrap: break-word;
}

.footer-bottom a {
    color: var(--apple-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--apple-green);
}

/* ============ FOOTER MOBILE ============ */
@media (max-width: 768px) {
    .footer {
        padding: 32px 16px 16px;
        margin-top: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    .footer-section {
        flex: 1 1 auto;
    }

    .footer-section h2 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .footer-section p {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .footer-bottom {
        padding-top: 16px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 24px 12px 12px;
        margin-top: 32px;
    }

    .footer-content {
        gap: 12px;
        margin-bottom: 12px;
    }

    .footer-section h2 {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .footer-section p {
        font-size: 11px;
        margin-bottom: 4px;
        line-height: 1.5;
    }

    .footer-bottom {
        padding-top: 12px;
        font-size: 10px;
        line-height: 1.4;
    }
}