:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1;
}

button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

button:hover {
    filter: brightness(1.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Navigation */
header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 20px;
    /* Adjusted to fixed pixels as requested */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

header h3 {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.05em;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

header ul li a {
    text-decoration: none;
    font-weight: 600;
    color: var(--secondary-color);
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
}

header ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

header ul li a:hover {
    color: var(--primary-color);
}

header ul li a:hover::after {
    width: 100%;
}

.cart-link {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    gap: 0.5rem;
}

.cart-link:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

#cart-count {
    background: white;
    color: var(--primary-color);
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    background: white;
    width: fit-content;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: #4338ca;
}

.breadcrumbs span::before {
    content: '›';
    margin-right: 0.75rem;
    color: #cbd5e1;
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(90deg, var(--primary-color), #4f46e5);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
    padding: 11rem 5% 9rem; /* Increased padding to clear the Top Banner */
    text-align: center;
    background: radial-gradient(circle at top right, #eff6ff, transparent),
        radial-gradient(circle at bottom left, #f5f3ff, transparent);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-top: 1.5rem; /* Added margin for desktop clearance */
    margin-bottom: 1.5rem;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero p {
    color: var(--secondary-color);
    font-size: 1.35rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Products Grid */
#products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
    padding: 2rem 5% 8rem;
}

.product {
    background: var(--white);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.product::before {
    content: 'SALE';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 10;
    display: none;
}

.product.on-sale::before {
    display: block;
}

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

.product img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 1rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    background: #f8fafc;
    padding: 1rem;
}

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

.product p {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
    text-align: center;
}

.product span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.product button {
    background: var(--text-color);
    color: white;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: auto;
}

.product button:hover {
    background: var(--primary-color);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

/* Footer */
footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 6rem 20px 4rem; /* Matching expanded 20px gutter */
    position: relative;
}

/* Container for all content */
.container {
    max-width: 100%; /* Fully expanded as requested */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

footer h3,
footer h4 {
    color: white;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Cart Toast */
.cart-toast {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: #0f172a;
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modals */
.modal-overlay {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 5%;
    }

    header ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 6rem 5%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

/* Product Detail Page Styles */
.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
    padding: 2rem 0 6rem;
}

.detail-gallery {
    position: sticky;
    top: 100px;
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: center;
}

.detail-gallery img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.detail-info h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.detail-info .category-tag {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: block;
}

.detail-info .price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.detail-info .description {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.specs-box {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
}

.specs-box h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.spec-line {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.spec-line:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #64748b;
}

.spec-value {
    font-weight: 700;
    color: #1e293b;
}

@media (max-width: 991px) {
    .detail-grid { grid-template-columns: 1fr; gap: 3rem; }
    .detail-gallery { position: relative; top: 0; padding: 2rem; }
    .detail-info h1 { font-size: 2.25rem; }
}

/* Digital Invoice Styling */
.invoice-modal {
    background: white;
    width: 95%;
    max-width: 650px;
    padding: 4rem;
    border-radius: 2.5rem;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 2.5rem;
}

.invoice-brand h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.04em;
}

.invoice-details {
    text-align: right;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.invoice-table {
    width: 100%;
    margin-bottom: 3.5rem;
}

.invoice-table th {
    text-align: left;
    padding: 1rem 0;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-table td {
    padding: 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-total-row {
    display: flex;
    justify-content: flex-end;
    gap: 3rem;
    margin-top: 2rem;
}

.invoice-total-label {
    font-weight: 800;
    color: #64748b;
    font-size: 1.25rem;
}

.invoice-total-value {
    font-weight: 900;
    color: var(--primary-color);
    font-size: 2rem;
}

/* Admin Dashboard Responsive Grid */
.admin-split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 8rem;
}

@media (min-width: 1025px) {
    .admin-split-layout {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.admin-table-container {
    background: white;
    padding: 3.5rem;
    border-radius: 3rem;
    box-shadow: var(--shadow);
    margin-bottom: 0;
    overflow-x: auto;
}

/* User Profile Specifics */
.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
    padding-bottom: 8rem;
}

.profile-card {
    background: white;
    padding: 3.5rem;
    border-radius: 2.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border-radius: 50%;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
}

.profile-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    color: #0f172a;
}

.profile-info p {
    color: #64748b;
    margin-bottom: 3rem;
}

.order-history-card {
    background: white;
    padding: 3.5rem;
    border-radius: 3rem;
    box-shadow: var(--shadow);
}

.order-item {
    padding: 2rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 800;
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .profile-grid { grid-template-columns: 1fr; gap: 3rem; }
    .profile-card { max-width: 100%; }
}

/* Password Toggle Visuals */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 1.25rem;
    user-select: none;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

.auth-input-group input[type="password"],
.auth-input-group input[type="text"].password-field {
    padding-right: 3.5rem;
}

/* Admin Dashboard Specifics */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.stat-card {
    background: white;
    padding: 3rem;
    border-radius: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

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

.stat-card h4 {
    color: #64748b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.stat-card .value {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.admin-table-container {
    background: white;
    padding: 3.5rem;
    border-radius: 3rem;
    box-shadow: var(--shadow);
    margin-bottom: 8rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th {
    text-align: left;
    padding: 1.5rem;
    color: #64748b;
    font-weight: 700;
    border-bottom: 2px solid #f1f5f9;
}

.admin-table td {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.1rem;
    color: #1e293b;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-info { background: #e0f2fe; color: #0369a1; }

/* Authentication Page Styles */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 3.5rem;
    border-radius: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: center;
}

.auth-card h2 {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.auth-card p {
    color: #64748b;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.auth-form {
    display: grid;
    gap: 1.25rem;
}

.auth-input-group {
    text-align: left;
}

.auth-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.auth-input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    outline: none;
    transition: var(--transition);
}

.auth-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

.auth-toggle {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-toggle span {
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.5rem;
}

.auth-btn {
    margin-top: 1rem;
    padding: 1.1rem;
    font-size: 1.05rem;
    border-radius: 1rem;
}

/* Shopping Cart Specific Layouts */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
    padding-bottom: 8rem;
}

.cart-summary {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 150px;
    transition: var(--transition);
}

.cart-summary:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.cart-empty-state {
    text-align: center;
    padding: 10rem 40px;
    background: white;
    border-radius: 2.5rem;
    border: 2px dashed #e2e8f0;
    grid-column: 1 / -1;
    margin-bottom: 6rem;
}

.cart-empty-state h2 {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.cart-empty-state p {
    color: #64748b;
    margin-bottom: 4rem;
    font-size: 1.25rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cart-item {
    display: flex;
    gap: 3rem;
    align-items: center;
    padding: 2.5rem;
    background: white;
    border-radius: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cart-item:hover {
    transform: translateX(12px);
    box-shadow: var(--shadow-md);
    border-color: #e2e8f0;
}

.cart-item img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 1.5rem;
    transition: var(--transition);
}

.cart-item:hover img {
    transform: scale(1.05);
}

.cart-item .item-details {
    flex-grow: 1;
    text-align: left;
}

.cart-item .item-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: #0f172a;
}

.cart-item .item-price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
}

.cart-item .remove-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: auto;
}

.cart-item .remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* Specific Cart Responsive Overrides */
@media (max-width: 1150px) {
    .cart-layout { grid-template-columns: 1fr; gap: 4rem; }
    .cart-summary { position: relative; top: 0; max-width: 100%; margin: 0 auto; }
}

@media (max-width: 768px) {
    .cart-item { flex-direction: column; text-align: center; gap: 2rem; padding: 3rem 2rem; }
    .cart-item img { width: 100%; max-width: 250px; height: auto; }
    .cart-item .remove-btn { width: 100%; }
    .cart-empty-state h2 { font-size: 2.25rem; }
}