:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #f43f5e;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --radius: 1rem;
    --star-gold: #fbbf24;
    --anim-duration: 0.3s;
    --anim-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

@keyframes pulse-subtle {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn var(--anim-duration) var(--anim-timing) forwards;
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

input,
button,
textarea,
select {
    font: inherit;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Containers */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

@media (max-width: 900px) {
    .container {
        padding: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 900px) {
    .container-wide {
        padding: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Core Layout Utilities */
.flex {
    display: flex;
}

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

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1 1 0%;
}

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

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

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

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-10 {
    gap: 2.5rem;
}

/* Spacing Scale */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mt-auto {
    margin-top: auto;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-10 {
    padding: 2.5rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* Inset Spacing for form children */
.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-black {
    font-weight: 900;
}

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

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.leading-none {
    line-height: 1;
}

.leading-tight {
    line-height: 1.25;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Colors & Backgrounds */
.text-white {
    color: #ffffff;
}

.text-slate-900 {
    color: #0f172a;
}

.text-slate-800 {
    color: #1e293b;
}

.text-slate-700 {
    color: #334155;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-300 {
    color: #cbd5e1;
}

.text-blue-600 {
    color: #2563eb;
}

.text-blue-400 {
    color: #60a5fa;
}

.text-red-500 {
    color: #ef4444;
}

.text-amber-400 {
    color: #fbbf24;
}

.bg-white {
    background-color: #ffffff;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-slate-900 {
    background-color: #0f172a;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-white\/80 {
    background-color: rgba(255, 255, 255, 0.8);
}

.bg-slate-900\/60 {
    background-color: rgba(15, 23, 42, 0.6);
}

/* Visuals & Effects */
.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border: 1px solid var(--border);
}

.border-none {
    border: none;
}

.border-t {
    border-top: 1px solid var(--border);
}

.border-slate-100 {
    border-color: #f1f5f9;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-slate-300 {
    border-color: #cbd5e1;
}

.border-blue-600 {
    border-color: #2563eb;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-2xl {
    box-shadow: var(--shadow-2xl);
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-20 {
    top: 5rem;
}

.top-24 {
    top: 6rem;
}

.top-3 {
    top: 0.75rem;
}

.right-3 {
    right: 0.75rem;
}

.left-3 {
    left: 0.75rem;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.z-\[2000\] {
    z-index: 2000;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.max-w-xs {
    max-width: 20rem;
}

.max-w-sm {
    max-width: 24rem;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-flex {
    display: inline-flex;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

.hover\:shadow-xl:hover {
    box-shadow: var(--shadow-xl);
}

.hover\:shadow-sm:hover {
    box-shadow: var(--shadow-sm);
}

.hover\:bg-slate-50:hover {
    background-color: #f8fafc;
}

.hover\:bg-slate-100:hover {
    background-color: #f1f5f9;
}

.hover\:bg-blue-600:hover {
    background-color: #2563eb;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:text-blue-600:hover {
    color: #2563eb;
}

.hover\:text-red-500:hover {
    color: #ef4444;
}

.hover\:underline:hover {
    text-decoration: underline;
}

.active\:scale-95:active {
    transform: scale(0.95);
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:opacity-0 {
    opacity: 0;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

/* Responsive Grid/Flex Breaks */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:w-72 {
        width: 18rem;
    }

    .lg\:py-12 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .lg\:hidden {
        display: none;
    }
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.translate-x-full {
    transform: translateX(100%);
}

.translate-x-0 {
    transform: translateX(0);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Animation Keyframes */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Scrollbar Styling */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Placeholder and Focus States */
input::placeholder {
    color: #94a3b8;
}

input:focus {
    outline: 2px solid #2563eb33;
    border-color: #2563eb;
}

/* Legacy Header/General Blocks Preservation (to be cleaned) */
.site-header {
    background: #fff;
    border-bottom: 2px solid #f1f5f9;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    flex-shrink: 0;
}

.logo img {
    height: 45px;
    /* Fixed logo height */
    width: auto;
    display: block;
}

.header-center {
    flex: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-form input {
    flex: 1;
    margin-bottom: 0;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.search-form button {
    background: var(--primary);
    color: white;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.header-right {
    flex-shrink: 0;
}

.user-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.user-nav a {
    font-weight: 600;
    color: var(--text-main);
}

.user-nav a:hover {
    color: var(--primary);
}

.cart-link {
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.hero-banner h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-banner p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

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

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #ffffff !important;
}

.no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed to contain to show full product */
    padding: 1px;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Auth Cards */
.auth-card {
    background: white;
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.form-group label {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    display: block;
}

input {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    font-size: 1rem;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Footer */
.site-footer {
    background: #1e1b4b;
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        gap: 1rem;
        align-items: stretch;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

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

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 items per row on mobile */
        gap: 1rem;
    }

    .product-card {
        border-radius: 0.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem !important;
    }

    .container {
        padding: 0 1rem;
    }
}

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

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

/* Product Detail Page */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-description {
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius);
}

.product-description h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.description-content {
    color: var(--text-muted);
    line-height: 1.8;
}

.product-features {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    width: 100%;
    justify-content: center;
}

.product-meta {
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meta-item {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-item strong {
    color: var(--text-main);
}

/* Enhanced Product Cards */
.product-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

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

.product-card .add-to-cart {
    margin: 0 1rem 1rem;
}

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

/* Responsive for Product Detail */
@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-images {
        position: static;
    }

    .product-detail-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 2rem;
    }

    .product-features {
        flex-direction: column;
        gap: 1rem;
    }
}

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

/* Modern Product Card Enhancements */
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border-color: var(--primary);
}

.product-card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card .product-img-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.product-card .product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-card .product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.product-card .product-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.product-card .product-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    padding-top: 0.5rem;
}

.product-card .add-to-cart {
    margin: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
}

.product-card .add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(79 70 229 / 0.3);
}

/* Category Link Hover */
.category-link:hover {
    background: var(--bg-main);
    color: var(--primary) !important;
    transform: translateX(4px);
}

.category-link:hover i {
    color: var(--primary);
}

/* Admin Specific Styles - Isolated with Classes */
.admin-body {
    background: #f1f5f9 !important;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
}

.admin-layout {
    display: flex !important;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 280px !important;
    background: #1e293b !important;
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0;
    height: 100vh;
    z-index: 1200 !important;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    padding: 2rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary) !important;
    margin: 0 !important;
}

.admin-nav {
    flex: 1;
    padding: 0 1rem;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

.admin-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0.85rem 1rem !important;
    border-radius: 0.5rem;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.admin-nav a.active {
    background: var(--primary) !important;
}

.nav-divider {
    height: 1px;
    background: #334155;
    margin: 1.5rem 1rem;
}

.sidebar a i {
    width: 20px;
    flex-shrink: 0;
}

.main-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f1f5f9;
    padding: 0.5rem 0.5rem !important;
}

.admin-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2.5rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    box-shadow: none !important;
    top: auto !important;
}

.admin-user-info {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px !important;
    }

    .sidebar-logo,
    .admin-nav a span {
        display: none !important;
    }

    .admin-nav a {
        justify-content: center !important;
    }
}

/* Homepage Layout & Slider */
.home-top-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .home-top-grid {
        grid-template-columns: 1fr;
    }

    .home-categories {
        display: none;
    }
}

.home-cat-list a:hover {
    color: var(--primary) !important;
    padding-left: 5px !important;
}

.home-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #f1f5f9;
}

.slide-item {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.slide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
}

.slide-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.slide-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Sections */
.home-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    position: relative;
    padding-left: 1rem;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

/* Global Resets */
ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

body {
    overflow-x: hidden;
}

/* --- Professional E-Commerce Utility & Form System --- */

/* --- Premium Mobile-First Aesthetic --- */

:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    background-color: #f1f5f9;
    /* Slightly darker than white for glass contrast */
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Premium Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    /* Increased opacity for cleaner look */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    /* Softer shadow */
}

/* Sidebar Specific Overrides */
.sidebar {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.sidebar h3 {
    margin-bottom: 12px;
    padding-left: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mega Menu Styles */
.home-categories {
    position: relative;
    z-index: 50;
}

.sidebar-box {
    position: relative;
    /* Allow overflow: visible for mega menu */
    overflow: visible !important;
}

.category-item {
    position: relative;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 600px;
    min-height: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 16px 16px 16px;
    box-shadow: 10px 0 30px -5px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-left: 10px;
    z-index: 100;
    flex-direction: row;
    gap: 24px;
}

.category-item:hover .mega-menu {
    display: flex;
    animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.mega-menu-content {
    flex: 2;
}

.mega-menu-feature {
    flex: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

/* Premium Text Effects */
.text-shadow-premium {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-gradient {
    background: linear-gradient(to right, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Force Clean Sidebar Styles */
.sidebar {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Clean Sidebar (e-bayi style) */
.clean-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #334155;
    /* Ensure text is dark */
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-filters {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
}

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

.accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.accordion-trigger:hover {
    color: var(--primary);
}

.accordion-content {
    display: block;
    /* Default open */
}

.accordion-content.collapsed {
    display: none;
}

/* Internal Search */
.filter-search {
    position: relative;
    margin-bottom: 12px;
}

.filter-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.filter-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 14px;
    height: 14px;
}

/* Custom Checkbox (Square) */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
    transition: color 0.2s;
    user-select: none;
}

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

/* Hide default checkbox but keep it accessible */
.custom-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.custom-checkbox-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Scrollable List */
.filter-list-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Clean Sidebar (e-bayi style) */
.clean-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-filters {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
}

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

.accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.accordion-trigger:hover {
    color: var(--primary);
}

.accordion-content {
    display: block;
    /* Default open */
}

.accordion-content.collapsed {
    display: none;
}

/* Internal Search */
.filter-search {
    position: relative;
    margin-bottom: 12px;
}

.filter-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.filter-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 14px;
    height: 14px;
}

/* Custom Checkbox (Square) */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
    transition: color 0.2s;
    user-select: none;
}

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

/* Hide default checkbox but keep it accessible */
.custom-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.custom-checkbox-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Scrollable List */
.filter-list-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Mobile-First Grid System */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Default to 2 cols on mobile */
    gap: 12px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Apple-Style Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.6);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

.product-img-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    padding: 5px;
    background: linear-gradient(to bottom, #fff, #f8fafc);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

/* Horizontal Scroll Container (Stories Style) */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 4px 16px 4px;
    /* Bottom padding for scrollbar/shadow */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.story-item {
    flex: 0 0 auto;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.story-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 2px solid transparent;
    /* Gradient border trick backing */
    background-clip: padding-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.story-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    z-index: -1;
}

.story-item:hover .story-circle {
    transform: scale(1.05);
}

.story-circle.active::before {
    background: var(--primary-gradient);
}

.story-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile Sidebar Refinement */
.mobile-sidesheet {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Utility Overrides for Clean Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 24px;
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s;
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* Layout & Flex */
.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.flex-1 {
    flex: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

/* Spacing (8px System) */
.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.py-4 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mt-4 {
    margin-top: 16px;
}

/* Typography */
.text-xs {
    font-size: 11px;
}

.text-sm {
    font-size: 13px;
}

.text-base {
    font-size: 15px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

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

.text-muted {
    color: #64748b;
}

.text-primary {
    color: var(--primary);
}

.text-white {
    color: #ffffff;
}

/* Backgrounds & Borders */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f8fafc;
}

.bg-gray-100 {
    background-color: #f1f5f9;
}

.border-b {
    border-bottom: 1px solid #e2e8f0;
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-xl {
    border-radius: 12px;
}

.rounded-2xl {
    border-radius: 16px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Standard E-Commerce Sidebar & Filters */
.sidebar-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

/* Professional Radio Button / Brand List */
.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s;
}

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

.filter-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}

.filter-item input[type="radio"]:checked {
    border-color: var(--primary);
}

.filter-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    top: 2px;
    left: 2px;
}

/* Professional Stock Toggle (Switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(18px);
}

/* Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky {
    position: sticky;
}

.top-24 {
    top: 96px;
}

.hidden {
    display: none;
}

/* Mobile Sidebar Fixes */
.mobile-sidesheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: #fff;
    z-index: 2000;
    padding: 24px;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.05);
}

/* Hover Utilities */
.hover-bg-primary:hover {
    background-color: var(--primary);
}

.hover-text-white:hover {
    color: #ffffff;
}

.hover-shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

@media (max-width: 1024px) {
    .category-layout {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }
}

/* Responsive Grid Utilities (Tailwind-like) */
@media (min-width: 1024px) {
    .lg\:grid {
        display: grid;
    }

    .lg\:grid-cols-\[280px_1fr\] {
        grid-template-columns: 280px 1fr;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:block {
        display: block;
    }

    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:w-80 {
        width: 20rem;
    }
}

/* Premium Text Effects */
.text-shadow-premium {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-gradient {
    background: linear-gradient(to right, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Force Clean Sidebar Styles */
.sidebar {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Clean Sidebar (e-bayi style) */
.clean-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #334155;
    /* Ensure text is dark */
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-filters {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
}

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

.accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.accordion-trigger:hover {
    color: var(--primary);
}

.accordion-content {
    display: block;
    /* Default open */
}

.accordion-content.collapsed {
    display: none;
}

/* Internal Search */
.filter-search {
    position: relative;
    margin-bottom: 12px;
}

.filter-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.filter-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 14px;
    height: 14px;
}

/* Custom Checkbox (Square) */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
    transition: color 0.2s;
    user-select: none;
}

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

/* Hide default checkbox but keep it accessible */
.custom-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.custom-checkbox-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Scrollable List */
.filter-list-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.filter-list-scroll::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}


/* Homepage Slider Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* Custom Scrollbar for Sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Cart Page Styles */
.cart-container {
    padding: 3rem 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.cart-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
}

@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

.cart-list-card {
    background: white;
    border-radius: 2rem;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart-list-header {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-weight: 800;
    color: var(--secondary);
}

.cart-item {
    display: flex;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: #fdfdfd;
}

.cart-item-thumb {
    width: 120px;
    height: 120px;
    background: white;
    border: 1px solid #eee;
    border-radius: 1rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
}

.cart-item-price-unit {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.cart-item-actions {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-item-price-total {
    text-align: right;
    min-width: 120px;
}

.cart-total-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

/* Quantity Picker Redesign */
.modern-qty-picker {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.25rem;
    width: fit-content;
}

.modern-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.modern-qty-btn:hover {
    background: var(--primary);
    color: white;
}

.modern-qty-val {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    background: transparent;
}

/* Summary Card */
.cart-summary {
    background: white;
    border-radius: 2rem;
    border: 1px solid var(--border);
    padding: 2rem;
    position: sticky;
    top: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.summary-row.total {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--secondary);
}

.summary-total-val {
    font-size: 1.875rem;
    font-weight: 950;
    color: var(--primary);
}

.checkout-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1.25rem;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

/* Toast Styles Refresh */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast {
    min-width: 360px;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-icon {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    background: #f0fdf4;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
    display: block;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.toast-actions {
    display: flex;
    gap: 0.75rem;
}

.toast-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.toast-btn-primary {
    background: var(--primary);
    color: white;
}

.toast-btn-secondary {
    background: #f1f5f9;
    color: var(--secondary);
}

/* Flying Animation */
.flying-product {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.pulse-cart {
    animation: cart-pulse 0.5s ease;
}

@keyframes cart-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Cart Popup Styles */
#cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#cart-popup.show {
    opacity: 1;
    pointer-events: all;
}

.cart-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cart-popup-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cart-popup.show .cart-popup-content {
    transform: scale(1) translateY(0);
}

.cart-popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.cart-popup-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.cart-popup-text {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cart-popup-actions {
    display: flex;
    gap: 1rem;
}

.cart-popup-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.cart-popup-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
}

.cart-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.cart-popup-btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.cart-popup-btn-secondary:hover {
    background: var(--bg-main);
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@media (max-width: 640px) {
    .cart-popup-content {
        padding: 2rem 1.5rem;
    }

    .cart-popup-actions {
        flex-direction: column;
    }
}

/* ==========================================================================
   NUCLEAR MOBILE ZERO-GAP OVERRIDE - v4 (Final)
   Forces absolutely zero left/right space for all containers on mobile.
   These rules load last and override everything else.
   ========================================================================== */
@media (max-width: 1024px) {

    html,
    body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .container,
    .container-wide,
    .container-fluid,
    .page-inner,
    .page-wrapper,
    .main-wrapper,
    .content-wrapper,
    .main-container,
    .section-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100vw !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-grid,
    .product-list,
    .products-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    section,
    article,
    aside {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Slider & section wrappers - zero side gap */
    .slider-wrapper,
    .products-section,
    .hero-section,
    .deal-area,
    .main-home-container,
    .section-header,
    .slider-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100vw !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* === Restoration: Product Detail Page ===
       The nuclear override above strips ALL container padding.
       Restore side padding for the product detail page here. */
    .product-detail-container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .product-detail-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .gallery-column,
    .info-column {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
}