/* Basic Reset and Variables */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F5F5F0; /* Warm Off-White/Cream */
    color: #1E1E1E; /* Deep Charcoal/Black */
    /* Use a column flex layout so footer can sit at viewport bottom when content is short */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px; /* Account for fixed header */
}

/* Header Styling */
header {
    background-color: #1E1E1E; /* Deep Charcoal/Black */
    color: white;
    /* center logo vertically: give header a min-height and center items */
    min-height: 70px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* stick header to top when scrolling */
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-bottom: 1px solid #AAAAAA;
}

.logo {
    font-size: 2em;
    font-weight: bold;
    /* absolutely center the logo horizontally within the header */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform-origin: center;
    transform: translateX(-50%) translateY(-50%);
    margin: 0;
    text-align: center;
    width: auto;
}

/* Logo image styling */
.logo img {
    height: 50px;
    width: auto;
    display: block;
    margin: 0;
}
.logo svg {
    height: 96px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
    display: inline-block;
}
.logo .logo-text {
    vertical-align: middle;
    display: inline-block;
}

/* Responsive logo sizing */
@media (max-width: 600px) {
    /* smaller header on narrow screens but keep logo centered */
    header { min-height: 60px }
    .logo img, .logo svg { height: 44px; margin-right:8px }
    .logo .logo-text { font-size: 1.2em }
    .nav-drawer-toggle { top: 30px; }
}

@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
    /* Increase default size slightly on high-DPI displays */
    .logo img, .logo svg { height: 128px }
}
nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: all 0.2s ease;
}

nav a:hover {
    text-decoration: underline;
}

/* Position header navigation at the top-right corner */
header nav {
    position: absolute;
    right: 20px;
    top: 12px;
    display: flex;
    gap: 12px;
}

/* Main Content Styling */
main {
    padding: 20px;
    text-align: center;
    /* Allow main to grow so footer is pushed to the bottom when content is short */
    flex: 1 0 auto;
}

/* Product Card Styling */
.featured-products {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.product-card {
    background-color: white;
    border: 1px solid #AAAAAA; /* Soft Taupe/Gray */
    padding: 20px;
    width: 250px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.featured-card:hover {
    transform: none;
    box-shadow: none;
}

/* Cart list styling */
.cart-item {
    background: #fff;
    border: 1px solid #e2e2e2;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-item-title { font-weight: bold }
.cart-item-meta { color: #555; margin-left: 12px }
.cart-item-actions button { margin-left: 8px }

/* Footer Styling */
footer {
    background-color: #1E1E1E; /* Deep Charcoal/Black */
    color: white;
    text-align: center;
    padding: 20px 0;
    /* make footer flow with content so it appears below main */
    position: static;
    margin-top: 30px;
    border-top: 1px solid #AAAAAA;
}

/* Navigation Drawer Styling */
.nav-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: #1E1E1E; /* Deep Charcoal/Black */
    color: white;
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 60px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.nav-drawer.open {
    left: 0;
}

.nav-drawer a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    border-bottom: 1px solid #AAAAAA;
    transition: background-color 0.2s;
}

.nav-drawer a:hover {
    background-color: #B89357; /* Muted Gold/Brass */
}

.nav-drawer-toggle {
    position: fixed;
    top: 35px;
    transform: translateY(-50%);
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: #1E1E1E; /* Deep Charcoal/Black */
    color: white;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1001;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-drawer-toggle:hover {
    background-color: #B89357; /* Muted Gold/Brass */
}

#featured-carousel {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}

#featured-carousel .product-card {
    flex: 0 0 100%;
    transition: none;
}

.nav-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.nav-drawer-overlay.open {
    display: block;
}