/* 
  Góc2ND - Premium Stylesheet
  Theme: Dark Glassmorphic with Indigo, Amber, and Emerald Accents
*/

:root {
    color-scheme: dark;
    /* Color Palette */
    --bg-main: #0B0F19;
    --bg-surface: rgba(20, 26, 45, 0.6);
    --bg-surface-opaque: #141A2D;
    --bg-surface-hover: rgba(30, 37, 62, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: #6366F1;

    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --primary-hover: #4F46E5;

    --accent: #F59E0B;
    --accent-glow: rgba(245, 158, 11, 0.2);
    --success: #10B981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --danger: #EF4444;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* Theme specific backgrounds */
    --bg-header: rgba(11, 15, 25, 0.75);
    --bg-icon-wrapper: rgba(255, 255, 255, 0.04);
    --bg-input-compact: rgba(255, 255, 255, 0.04);
    --bg-input-compact-focus: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.04);
    --slider-track-bg: rgba(255, 255, 255, 0.1);
    --bg-footer: #060911;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);
    --glass-blur: blur(16px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light-theme {
    color-scheme: light;
    --bg-main: #F8FAFC;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-opaque: #FFFFFF;
    --bg-surface-hover: rgba(241, 245, 249, 0.9);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-focus: #4F46E5;

    --primary: #4F46E5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --primary-hover: #4338CA;

    --accent: #D97706;
    --accent-glow: rgba(217, 119, 6, 0.1);
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.1);

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    /* Theme specific backgrounds */
    --bg-header: rgba(248, 250, 252, 0.75);
    --bg-icon-wrapper: rgba(15, 23, 42, 0.04);
    --bg-input-compact: rgba(15, 23, 42, 0.03);
    --bg-input-compact-focus: rgba(15, 23, 42, 0.06);
    --bg-input: rgba(15, 23, 42, 0.02);
    --slider-track-bg: rgba(15, 23, 42, 0.1);
    --bg-footer: #F1F5F9;

    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.12);
}

/* --- Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* --- Buttons & Badges --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: var(--glass-blur);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.light-theme .btn-glass {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(15, 23, 42, 0.15);
}

.light-theme .btn-glass:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(15, 23, 42, 0.25);
}

.btn-block {
    display: flex;
    width: 100%;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color-focus);
    transform: scale(1.05);
}

/* Control Sun/Moon visibility depending on theme setting */
body .moon-icon {
    display: none;
}

body .sun-icon {
    display: block;
}

/* When light-theme class is active on root html */
.light-theme body .sun-icon {
    display: none;
}

.light-theme body .moon-icon {
    display: block;
}

.light-theme .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
}

.light-theme .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.badge-accent {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.required {
    color: var(--danger);
}

/* --- Header / Navigation --- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-accent {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-item {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box-compact {
    display: flex;
    align-items: center;
    background: var(--bg-input-compact);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 6px 4px 12px;
    transition: var(--transition);
}

.search-box-compact:focus-within {
    border-color: var(--border-color-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: var(--bg-input-compact-focus);
}

.search-box-compact input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    width: 150px;
    transition: var(--transition);
}

.search-box-compact input:focus {
    width: 200px;
}

.search-box-compact .search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.search-box-compact .search-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- Mobile Drawer --- */
.mobile-nav-drawer {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-surface-opaque);
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.mobile-nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-item {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* --- Main Layout --- */
.app-main {
    margin-top: 80px;
    flex-grow: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* --- 1. HOME VIEW --- */

/* Hero Banner */
.hero-banner {
    position: relative;
    padding: 60px 0 100px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 760px;
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title-line {
    display: block;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Hero card visual */
.hero-visual {
    display: flex;
    justify-content: flex-end;
}

.hero-card-glowing {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    width: 100%;
    max-width: 360px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md), 0 0 40px rgba(99, 102, 241, 0.1);
    position: relative;
    transition: var(--transition);
}

.hero-card-glowing::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glow-inner {
    position: relative;
    border-radius: calc(var(--radius-lg) - 4px);
    overflow: hidden;
}

.hot-badge-glow {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 5;
}

.hero-product-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    transition: var(--transition);
}

.hero-card-glowing:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md), 0 0 50px rgba(99, 102, 241, 0.2);
}

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

.hero-product-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.hero-product-info .price {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.hero-product-info .old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
}

/* Categories Grid Layout */
.categories-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}

.section-header {
    margin-bottom: 40px;
    max-width: 600px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 16px;
}

.categories-section .section-header {
    text-align: center;
    margin: 0 auto 36px auto;
    max-width: 650px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 142px;
}

.category-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-icon-wrapper);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.category-card span {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    word-break: break-word;
    display: block;
    line-height: 1.35;
    text-align: center;
}

.category-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.category-card:hover .category-icon-wrapper {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.category-card:hover span {
    color: var(--text-primary);
}

/* Hot Products & General Products Grid */
.hot-products-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-header-flex .section-header {
    margin-bottom: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Loading/Empty State */
.loading-spinner {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

.no-products-found {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

/* Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.hot-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, #F59E0B, #EF4444);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.qty-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

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

.product-card-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.product-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.product-card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.btn-card-buy {
    width: 100%;
    padding: 8px 16px;
    font-size: 13.5px;
    border-radius: 8px;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-md), 0 0 25px rgba(99, 102, 241, 0.1);
}

/* Features grid block */
.features-info-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-main) 0%, rgba(99, 102, 241, 0.02) 100%);
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: var(--transition);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14.5px;
}

.feature-card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* --- 2. PRODUCTS PAGE --- */
.products-page-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
}

.filters-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-header h3 {
    font-size: 18px;
}

.btn-clear-filters {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-filters:hover {
    color: var(--primary);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select.form-control option {
    background-color: var(--bg-surface-opaque);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--border-color-focus);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.price-slider-container {
    padding-top: 8px;
}

/* Range input styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--slider-track-bg);
    border-radius: 3px;
    cursor: pointer;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--slider-track-bg);
    border-radius: 3px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: -6px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Products Main List Header */
.products-list-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.products-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-list-header h2 {
    font-size: 28px;
}

.products-count {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.search-bar-products {
    position: relative;
    width: 100%;
}

.search-bar-products input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px 12px 48px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.search-bar-products input:focus {
    border-color: var(--border-color-focus);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-glow);
}

.search-bar-products .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* --- 3. FORM PAGES (THU MUA / TRAO DOI) --- */
.form-page-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    padding-top: 40px;
    padding-bottom: 40px;
    align-items: center;
}

.form-intro {
    max-width: 500px;
}

.form-intro h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-intro .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.steps-guide {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.step-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Interactive Form Cards */
.form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md);
    position: relative;
}

.form-card-header {
    margin-bottom: 24px;
    text-align: center;
}

.form-card-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.form-card-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.interactive-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

textarea.form-control {
    resize: vertical;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* --- App Footer --- */
.app-footer {
    margin-top: auto;
    background: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0;
    color: var(--text-secondary);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 1.1fr;
    gap: 48px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col-brand {
    align-items: flex-start;
}

.footer-col-brand .logo {
    margin-bottom: 12px;
}

.footer-slogan {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-about-short {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.6;
}

.footer-col-title {
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 8px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-address-box,
.footer-phone-box {
    margin-bottom: 14px;
}

.footer-address-text,
.footer-phone-text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer-inline-icon {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-phone-link {
    color: var(--text-primary);
    font-weight: 700;
    transition: var(--transition);
}

.footer-phone-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-map-action {
    margin-top: 4px;
}

.footer-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    width: fit-content;
}

.footer-map-btn:hover {
    background: var(--bg-surface-hover);
    border-color: #EA4335;
    color: #EA4335;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(234, 67, 53, 0.15);
}

.footer-map-btn .gmap-pin-icon {
    flex-shrink: 0;
    transition: var(--transition);
}

.footer-map-btn:hover .gmap-pin-icon {
    transform: scale(1.1);
}

.footer-map-btn .external-icon {
    opacity: 0.6;
    transition: var(--transition);
}

.footer-map-btn:hover .external-icon {
    opacity: 1;
    transform: translateX(2px) translateY(-2px);
}

.footer-bank-card {
    margin-top: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bank-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bank-badge {
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-heading);
    background: #003399; /* MB Bank brand blue */
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}

.bank-holder {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.bank-card-number {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bank-num-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.bank-code {
    font-family: var(--font-heading), monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 17, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: var(--shadow-md);
    transform: translateY(24px) scale(0.97);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-large {
    width: 100%;
    max-width: 900px;
    padding: 32px;
}

.modal-small {
    width: 100%;
    max-width: 500px;
    padding: 32px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Product Detail Grid inside Modal */
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-top: 12px;
}

.detail-gallery {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
}

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

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-category {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
}

.detail-price-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-price {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
}

.detail-stock {
    font-size: 14px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.detail-description {
    margin-bottom: 32px;
    flex-grow: 1;
}

.detail-description h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.detail-description p {
    font-size: 14.5px;
    color: var(--text-secondary);
    white-space: pre-line;
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkout Header inside modal */
.checkout-header {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-header h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.checkout-header p {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.checkout-summary-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 8px;
}

.light-theme .checkout-summary-block {
    background: rgba(15, 23, 42, 0.02);
}

.checkout-summary-block span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.checkout-summary-block h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    margin: 0;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

.toast {
    background: var(--bg-surface-opaque);
    border-left: 4px solid var(--primary);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 320px;
    max-width: 450px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        justify-content: center;
    }

    .products-page-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 24px;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .form-page-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-intro {
        text-align: center;
        max-width: 100%;
        margin: 0 auto;
    }

    .steps-guide {
        align-items: center;
        max-width: 500px;
        margin: 0 auto;
    }

    .step-item {
        text-align: left;
    }

    .grid-3-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: left;
    }

    .footer-col-brand {
        align-items: flex-start;
        text-align: left;
    }

    .footer-about-short {
        margin: 0;
    }

    .footer-map-btn {
        width: 100%;
        justify-content: center;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        height: 280px;
    }
}

@media (max-width: 768px) {

    .main-nav,
    .header-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .search-box-compact {
        display: none !important;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-title-line {
        white-space: normal;
    }

    .modal-large,
    .modal-small {
        padding: 24px 16px;
    }

    .detail-actions {
        grid-template-columns: 1fr;
    }

    /* Mobile optimization for Category Grid (tablet/mobile) */
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .category-card {
        height: auto;
        min-height: 120px;
        padding: 14px 6px;
    }

    .category-icon-wrapper {
        width: 46px;
        height: 46px;
        margin-bottom: 8px;
    }

    .category-card span {
        font-size: 12px;
    }
}

/* --- Hot Products Slider --- */
.hot-products-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

#hot-products-container.products-grid {
    display: flex;
    /* Override grid with flex for smooth scrolling */
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: hidden;
    /* Hide scrollbar on desktop */
    scroll-behavior: smooth;
    gap: 24px;
    padding: 12px 4px;
}

#hot-products-container .product-card {
    flex: 0 0 calc((100% - 72px) / 4);
    /* 4 cards on desktop */
    scroll-snap-align: start;
    box-sizing: border-box;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.slider-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.slider-nav-btn.prev-btn {
    left: -24px;
}

.slider-nav-btn.next-btn {
    right: -24px;
}

@media (max-width: 1200px) {
    #hot-products-container .product-card {
        flex: 0 0 calc((100% - 48px) / 3);
        /* 3 cards */
    }

    .slider-nav-btn.prev-btn {
        left: -12px;
    }

    .slider-nav-btn.next-btn {
        right: -12px;
    }
}

@media (max-width: 768px) {
    #hot-products-container.products-grid {
        overflow-x: auto;
        /* Enable touch scroll */
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        /* Hide scrollbar in Firefox */
        gap: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    #hot-products-container.products-grid::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar in Chrome/Safari */
    }

    #hot-products-container .product-card {
        flex: 0 0 calc((100% - 16px) / 2);
        /* 2 cards */
        scroll-snap-align: center;
    }

    .hot-products-slider-wrapper .slider-nav-btn {
        display: none !important;
        /* Hide navigation buttons on touch devices */
    }
}

@media (max-width: 480px) {
    #hot-products-container .product-card {
        flex: 0 0 82%;
        /* Show 1 full card and a preview of the next one to encourage swipe */
    }
}

/* --- New Products Section --- */
.new-products-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.new-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.section-footer-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

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

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

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

@media (max-width: 768px) {

    .new-products-grid,
    #products-list-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Make cards compact in grids on mobile to fit more items */
    .new-products-grid .product-card,
    #products-list-container .product-card {
        border-radius: var(--radius-sm);
    }

    .new-products-grid .product-card-img-wrapper,
    #products-list-container .product-card-img-wrapper {
        height: 140px;
    }

    .new-products-grid .product-card-content,
    #products-list-container .product-card-content {
        padding: 12px;
    }

    .new-products-grid .product-card-title,
    #products-list-container .product-card-title {
        font-size: 14px;
        height: 38px;
        margin-bottom: 4px;
    }

    .new-products-grid .product-card-desc,
    #products-list-container .product-card-desc {
        font-size: 12px;
        height: 34px;
        margin-bottom: 12px;
    }

    .new-products-grid .product-card-price,
    #products-list-container .product-card-price {
        font-size: 15px;
    }

    .new-products-grid .btn-card-buy,
    #products-list-container .btn-card-buy {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
    }

    .new-products-grid .product-card-category,
    #products-list-container .product-card-category {
        font-size: 10px;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {

    .hero-title {
        font-size: 26px;
    }

    .new-products-grid,
    #products-list-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .new-products-grid .product-card-img-wrapper,
    #products-list-container .product-card-img-wrapper {
        height: 120px;
    }

    .new-products-grid .product-card-title,
    #products-list-container .product-card-title {
        font-size: 13px;
        height: 36px;
    }

    .new-products-grid .product-card-desc,
    #products-list-container .product-card-desc {
        display: none;
        /* Hide description on tiny mobile screens to save space and fit more items vertically */
    }

    /* Mobile optimization for Category Grid (phones) */
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        height: auto;
        min-height: 104px;
        padding: 10px 4px;
        border-radius: var(--radius-sm);
    }

    .category-icon-wrapper {
        width: 38px;
        height: 38px;
        margin-bottom: 6px;
    }

    .category-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }

    .category-card span {
        font-size: 11px;
        line-height: 1.2;
    }
}

/* --- Load More Products --- */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

/* --- SHOPPING CART STYLE SYSTEM --- */
.cart-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.cart-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

/* Light theme support */
.light-theme .cart-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
}

/* Drawer overlay sliding logic */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--bg-surface-opaque);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border-color);
}

.cart-drawer-overlay.open .cart-drawer-container {
    transform: translateX(0);
}

/* Header */
.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.cart-drawer-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.cart-drawer-close:hover {
    color: var(--text-primary);
}

/* Body */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cart Item Layout */
.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-input-compact);
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-category {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

.cart-item-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

/* Quantity Adjuster */
.cart-qty-adjuster {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-input-compact);
}

.cart-qty-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.light-theme .cart-qty-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.cart-qty-val {
    width: 32px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.cart-item-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.cart-item-remove-btn:hover {
    color: var(--danger);
}

/* Empty Cart State */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    color: var(--text-muted);
    gap: 16px;
}

.cart-empty-state svg {
    color: rgba(255, 255, 255, 0.1);
}

.light-theme .cart-empty-state svg {
    color: rgba(0, 0, 0, 0.08);
}

.cart-empty-state p {
    font-size: 15px;
}

/* Footer */
.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-opaque);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-summary span {
    font-size: 15px;
    color: var(--text-secondary);
}

.cart-summary h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}


/* --- CHECKOUT ITEMS LIST STYLE --- */
#checkout-items-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 240px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.checkout-item-summary {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.light-theme .checkout-item-summary {
    background: rgba(15, 23, 42, 0.02);
}

.checkout-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.checkout-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-item-cat {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.checkout-item-info h4 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
}

.checkout-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 12.5px;
}

.checkout-item-price {
    font-weight: 700;
    color: var(--text-primary);
}

.checkout-item-qty {
    color: var(--text-secondary);
}

/* --- DETAIL MORE LINK STYLE --- */
.detail-more-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    margin-left: 6px;
    display: inline-block;
    transition: var(--transition);
}

.detail-more-link:hover {
    color: var(--primary);
    opacity: 0.95;
    transform: translateY(-1px);
}