:root,
html[data-theme="dark"] {
    --at-bg: #0b0c0e;
    --at-surface: #131519;
    --at-surface-2: #1c1f26;
    --at-glass: rgba(11, 12, 14, 0.82);
    --at-text: #f4f5f7;
    --at-text-muted: #9ca3af;
    --at-border: rgba(255, 255, 255, 0.08);
    --at-lime-start: #c8fb67;
    --at-lime-end: #6a9b00;
    --at-accent-text: #c8fb67;
    --at-gradient: linear-gradient(135deg, #c8fb67 0%, #6a9b00 100%);
    --at-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --at-glow: 0 0 22px rgba(200, 251, 103, 0.25);
}

html[data-theme="light"] {
    --at-bg: #f7f8fa;
    --at-surface: #ffffff;
    --at-surface-2: #eef0f4;
    --at-glass: rgba(255, 255, 255, 0.88);
    --at-text: #111315;
    --at-text-muted: #525866;
    --at-border: rgba(0, 0, 0, 0.08);
    --at-lime-start: #c8fb67;
    --at-lime-end: #6a9b00;
    --at-accent-text: #4d7300;
    --at-gradient: linear-gradient(135deg, #c8fb67 0%, #6a9b00 100%);
    --at-shadow: 0 10px 28px rgba(17, 19, 21, 0.07);
    --at-glow: 0 4px 16px rgba(106, 155, 0, 0.22);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--at-bg) !important;
    color: var(--at-text) !important;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--at-text);
    font-family: 'Alexandria', sans-serif;
}

a {
    color: var(--at-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--at-accent-text);
}

.at-header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    background: var(--at-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--at-border);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.at-header-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.at-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.at-brand img {
    height: 34px;
    width: auto;
    display: block;
}

html[data-theme="dark"] .at-logo-light {
    display: none;
}

html[data-theme="light"] .at-logo-dark {
    display: none;
}

.at-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.at-nav a {
    font-size: 15px;
    font-weight: 600;
    color: var(--at-text);
    position: relative;
    padding: 6px 0;
}

.at-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--at-gradient);
    transition: width 0.25s ease;
}

.at-nav a:hover::after {
    width: 100%;
}

.at-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.at-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--at-border);
    background: var(--at-surface);
    color: var(--at-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    padding: 0;
}

.at-icon-btn:hover {
    border-color: var(--at-lime-end);
    transform: translateY(-1px);
}

.at-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme="dark"] .at-icon-moon {
    display: none;
}

html[data-theme="light"] .at-icon-sun {
    display: none;
}

.at-cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--at-gradient);
    color: #0b0c0e;
    font-size: 11px;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.at-custom-btn {
    background: var(--at-gradient);
    color: #0b0c0e !important;
    font-family: 'Alexandria', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: var(--at-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.at-custom-btn:hover {
    transform: translateY(-1px);
    color: #0b0c0e !important;
}

@media (max-width: 768px) {
    .at-nav {
        display: none;
    }
    .at-header-inner {
        height: 64px;
        padding: 0 14px;
    }
    .at-brand img {
        height: 28px;
    }
    .at-custom-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}