:root {
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #333;
    font-family: Arial, sans-serif;
}

/* Header */
.site-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #2A2A2A; /* Changed to black */
    color: #ffffff; /* Added white text */
    border-bottom: 1px solid #333; /* Changed border color */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: background-color 0.3s ease; /* Added smooth transition */
}

.home .site-header {
    background: #2A2A2A;
    color: #ffffff;
    border-bottom: none;
}


.site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%; 
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* space between nav links and cart */
}

.site-header .brand img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.site-header .brand-name {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.cart-container {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.cart-icon {
    text-decoration: none;
    color: #fff;           /* or your header text color */
    font-size: 24px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: white; /* match your header color */
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
}

.home .hero-section {
    margin-top: 0; 
}

/* Keep margin for other pages */
body:not(.home) .hero-section {
    margin-top: var(--header-height);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.site-nav a:hover {
    border: 2px solid #ffffff;
}

.site-nav a[aria-current="page"] {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

.home .site-nav a[aria-current="page"] {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

.nav-toggle {
    display: none;
    background: transparent;
    color: inherit;
    border: none;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
    display: block;
    background: currentColor;
    height: 2px;
    width: 22px;
    border-radius: 2px;
    position: relative;
}

.nav-toggle span:before,
.nav-toggle span:after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle span:before {
    top: -6px;
}

.nav-toggle span:after {
    top: 6px;
}


@media (max-width: 768px) {
    .site-header { padding: 0 12px; }

    .site-nav {
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        background: #2A2A2A;
        color:#fff;
        z-index: 999;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px 16px 16px;
        border-bottom: 1px solid #eee;
        display: none;
        box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    }

    .home .site-nav {
        background: rgba(0, 0, 0, 0.92);
        color: #ffffff;
    }

    .site-header.open .site-nav {
        display: flex;
    }

    .site-nav a {
        display: block;
        width: 100%;
        padding: 10px 8px;
        border-radius: 6px;
    }

    .home .site-nav a { color: #ffffff; }

    .nav-toggle {
        display: flex;
    }
}

/* Footer */
.site-footer {
    margin-top: 0px;
    background: #111111;
    color: #dddddd;
    padding: 15px 16px;
}

.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.site-footer a {
    color: #dddddd;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .site-footer .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        margin-right: -20px;
    }
}

@media (max-width: 768px) {
    .header-right {
        gap: 6px;
    }
}

/* ========== Cart Sidebar Styles ========== */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.cart-sidebar.open {
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar.open .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-sidebar.open .cart-sidebar-panel {
    transform: translateX(0);
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cart-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.cart-close:hover {
    color: #000;
}

.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.cart-empty-state svg {
    margin-bottom: 16px;
}

.cart-empty-state p {
    font-size: 16px;
    margin: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.cart-item-price {
    font-size: 13px;
    color: #666;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.qty-btn {
    background: #f0f0f0;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.cart-item-quantity span {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-total {
    font-size: 16px;
    font-weight: 700;
    color: #2A2A2A;
}

.cart-item-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #d32f2f;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #b71c1c;
}

.cart-sidebar-footer {
    border-top: 1px solid #e0e0e0;
    padding: 20px;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.cart-checkout-btn {
    width: 100%;
    background: #2A2A2A;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.cart-checkout-btn:hover {
    background: #000;
}

.cart-continue-btn {
    width: 100%;
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-continue-btn:hover {
    border-color: #2A2A2A;
    color: #2A2A2A;
}

.cart-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
}

@media (max-width: 480px) {
    .cart-sidebar-panel {
        width: 100%;
    }
}

.cart-item-option {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}