/* Global styles */
:root {
    --primary: #4A3428;
    --secondary: #8B5E3C;
    --accent: #D4A574;
    --light: #F5E6D3;
    --dark: #2C1810;
    --white: #FFFFFF;
    --gray: #666666;
    --success: #28A745;
    --error: #DC3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
}

/* Header styles */
.header {
    background-color: var(--primary);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(74, 52, 40, 0.95);
    padding: 0.8rem 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--accent);
}

.logo img {
    width: 40px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

/* Hero section with slider */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 48px;
    padding: 20px 0;
}

.hero-content p {
    font-size: 18px;
    padding-bottom: 50px;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.5s ease-in-out;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.slide.showing {
    opacity: 1;
    transform: scale(1);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Button styles */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--dark);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Products section */
.products {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--dark);
    font-size: 2.5rem;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 1rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-info {
    padding: 2rem;
}

.product-title {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.product-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.buy-button {
    width: 100%;
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-button:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* Cart styles */
.cart-icon {
    position: relative;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent);
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Cart modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cart-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
}

.cart-close:hover {
    color: var(--dark);
    transform: rotate(90deg);
}

.cart-modal-content h2 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.cart-items {
    margin-bottom: 2rem;
}

.empty-cart-message {
    text-align: center;
    color: var(--gray);
    font-size: 1.2rem;
    padding: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-title {
    font-size: 1.2rem;
    color: var(--dark);
    font-weight: 600;
}

.cart-item-price {
    color: var(--secondary);
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.quantity-btn {
    background-color: var(--light);
    color: var(--dark);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--accent);
    color: var(--white);
}

.cart-item-total {
    text-align: right;
    font-weight: bold;
    color: var(--primary);
}

.cart-total {
    text-align: right;
    padding: 1.5rem;
    font-size: 1.3rem;
    color: var(--dark);
    border-top: 2px solid var(--light);
}

.cart-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.cart-buttons .btn {
    flex: 1;
    text-align: center;
}

/* Footer styles */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 5rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent);
}

.footer-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Notification styles */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
}

.notification {
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background-color: var(--success);
}

.notification-error {
    background-color: var(--error);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cart-item-total {
        text-align: center;
    }

    .cart-buttons {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .products {
        padding: 6rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cart-modal-content {
        padding: 1.5rem;
    }

    .notification {
        width: 90%;
        margin: 0.5rem auto;
        right: 50%;
        transform: translateX(50%);
    }

    .footer {
        padding: 3rem 1rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h3:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }
}

/* Mobile menu styles */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem;
        text-align: center;
        gap: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Loading animation for images */
.product-image {
    position: relative;
}

.product-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--light) 0%, var(--white) 50%, var(--light) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Print styles */
@media print {

    .header,
    .hero,
    .cart-icon,
    .buy-button,
    .footer {
        display: none;
    }

    .products {
        padding: 1rem;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --secondary: #333333;
        --accent: #FFFFFF;
        --light: #FFFFFF;
        --dark: #000000;
        --gray: #666666;
    }

    .product-card {
        border: 2px solid var(--dark);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}