:root {
    --primary-color: #c94d2f;
    --secondary-color: #e67e22;
    --accent-color: #f39c12;
    --light-accent: #fff5f0;
    --dark-accent: #8b3e2f;
    --text-dark: #333;
    --text-light: #666;
    --border-radius: 15px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

/* Skip to Content (accessibility) */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
    color: #fff;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===================== Header / Navbar ===================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.cart-icon {
    position: relative;
    color: #fff;
    font-size: 1.3rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================== Hero Section ===================== */
.hero-section {
    min-height: 600px;
    background-color: #f5f5f0;
    padding: 0;
}

.hero-section .container-fluid {
    padding: 0;
}

.hero-section .row {
    margin: 0;
}

.hero-text-section {
    background: linear-gradient(135deg, #f5f5f0 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    min-height: 600px;
}

.hero-content {
    text-align: left;
    color: var(--text-dark);
    max-width: 500px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.hero-content .hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 400;
}

.hero-content .hero-attributes {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-carousel-section {
    padding: 0;
    position: relative;
    min-height: 600px;
    background-color: var(--light-accent);
}

.hero-carousel-section .carousel,
.hero-carousel-section .carousel-inner,
.hero-carousel-section .carousel-item {
    height: 100%;
}

.hero-carousel-section .carousel-background {
    width: 100%;
    height: 100%;
    min-height: 600px;
    background-color: var(--light-accent);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    display: block;
}

.hero-carousel-section .carousel-control-prev,
.hero-carousel-section .carousel-control-next {
    z-index: 3;
    width: 5%;
}

.hero-carousel-section .carousel-control-prev-icon,
.hero-carousel-section .carousel-control-next-icon {
    background-color: rgba(201, 77, 47, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.hero-carousel-section .carousel-control-prev-icon:hover,
.hero-carousel-section .carousel-control-next-icon:hover {
    background-color: rgba(201, 77, 47, 0.7);
}

.hero-carousel-section .carousel-indicators {
    z-index: 3;
    margin-bottom: 2rem;
}

.hero-carousel-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(201, 77, 47, 0.5);
    border: 2px solid rgba(201, 77, 47, 0.8);
}

.hero-carousel-section .carousel-indicators button.active {
    background-color: var(--primary-color);
}

/* ===================== Buttons ===================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--dark-accent);
    border-color: var(--dark-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 77, 47, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.btn-loading > * {
    visibility: hidden;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ===================== Product Cards ===================== */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 250px;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.product-card .card-img-top {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 15px;
    min-height: 250px;
}

.product-card .card-img-top img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-card-body {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-compare-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #6c757d;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

/* ===================== Section Styles ===================== */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ===================== Footer ===================== */
footer {
    background: var(--dark-accent);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

footer h5 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

/* ===================== Utilities ===================== */
.bg-light-green {
    background-color: var(--light-accent);
}

/* ===================== Entrance Animations ===================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for child elements */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.4s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .product-card:hover {
        transform: none;
    }
    .btn-primary:hover,
    .navbar-nav .nav-link:hover {
        transform: none;
    }
    .btn-loading::after {
        animation: none;
    }
}

/* ===================== Mobile Cart (card layout) ===================== */
.cart-item-card {
    display: none;
}

@media (max-width: 767px) {
    .cart-table-desktop {
        display: none !important;
    }
    .cart-item-card {
        display: block;
    }
    .cart-item-card .card {
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
        margin-bottom: 1rem;
    }
    .cart-item-card .cart-item-img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* ===================== Admin Sidebar Responsive ===================== */
@media (max-width: 991px) {
    .admin-sidebar {
        position: static !important;
        height: auto !important;
        width: 100% !important;
    }
    .admin-main-content {
        margin-left: 0 !important;
    }
}

/* ===================== Responsive Breakpoints ===================== */
@media (max-width: 992px) {
    .hero-text-section {
        min-height: 400px;
        padding: 40px 20px;
    }
    
    .hero-carousel-section {
        min-height: 400px;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .hero-tagline {
        font-size: 1.2rem;
    }
    
    .hero-content .hero-attributes {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-text-section {
        min-height: 350px;
        padding: 30px 20px;
    }
    
    .hero-carousel-section {
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .hero-tagline {
        font-size: 1.1rem;
    }
    
    .hero-content .hero-attributes {
        font-size: 0.95rem;
    }
    
    .hero-carousel-section .carousel-control-prev,
    .hero-carousel-section .carousel-control-next {
        width: 8%;
    }
    
    .hero-carousel-section .carousel-control-prev-icon,
    .hero-carousel-section .carousel-control-next-icon {
        width: 30px;
        height: 30px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ===================== Custom Error Pages ===================== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.error-page h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto 2rem;
}
