/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
   :root {
    /* Colors - Derived from logo and requirements */
    --color-primary: #f26522; /* Energic Orange */
    --color-primary-dark: #d9561b;
    --color-text: #1f2937;
    --color-text-light: #4b5563;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-bg-alt: #f3f4f6;
    --color-border: #e5e7eb;
    --color-danger: #ef4444;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fca5a5;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* ==========================================================================
   Typography & Buttons
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 4.5vw, 4.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 45px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--color-text);
    font-weight: 500;
}

.nav a:hover {
    color: var(--color-primary);
}

.cart-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.cart-toggle:hover {
    color: var(--color-primary);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.15) 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
    text-align: left;
    margin-left: 0;
}

.hero-content h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.01em;
}

.btn-hero {
    background-color: var(--color-primary);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-hero:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* ==========================================================================
   Main Layout & Products
   ========================================================================== */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
    position: relative;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    color: var(--color-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.product-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.product-card.bestseller {
    border-width: 2px;
    border-color: var(--color-primary);
}

.badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}

.product-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    margin-bottom: 0.5rem;
}

.product-info .desc {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.price-row {
    margin-bottom: 1.5rem;
}

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

.price small {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.action-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.qty-btn {
    background: var(--color-bg-alt);
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--color-border);
}

.qty-input {
    width: 40px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-family: var(--font-main);
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    flex: 1;
}

/* ==========================================================================
   Features & Shipping
   ========================================================================== */
.features-section, .shipping-info-section {
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-primary);
    margin: 0 auto 1rem;
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    background: var(--color-primary);
    color: white;
}

.shipping-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.shipping-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.shipping-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.shipping-card.highlight {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.shipping-card.highlight p {
    color: rgba(255,255,255,0.8);
}

.shipping-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.shipping-card.highlight .icon {
    color: white;
}

.shipping-price {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* ==========================================================================
   Sidebar Cart & Form
   ========================================================================== */
.cart-sidebar {
    width: 100%;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cart-sidebar-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-header h3 {
    margin: 0;
}

.close-cart-btn {
    display: none; /* Only visible on mobile overlay */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.empty-cart-msg {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-text-light);
}

.empty-cart-msg i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-info h4 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.cart-qty-btn {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--color-text);
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--color-border);
    color: var(--color-primary);
}

.cart-qty-text {
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-price-col {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.cart-item-price-col small {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.remove-item-btn:hover {
    transform: scale(1.1);
}

.cart-form-wrapper {
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.payment-warning {
    background-color: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.payment-warning i {
    font-size: 1.5rem;
    color: var(--color-danger);
}

/* Forms */
.order-form .form-group {
    margin-bottom: 1rem;
}

.order-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.order-form input,
.order-form select,
.order-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-size: 0.875rem;
    transition: var(--transition);
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.cart-summary {
    background: var(--color-bg-alt);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.summary-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-primary);
}

.form-disclaimer {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 1rem;
}

/* ==========================================================================
   Bottom Sections (Gallery & Reviews)
   ========================================================================== */
.bottom-section {
    padding: 4rem 0;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.mini-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mini-gallery img {
    border-radius: var(--border-radius);
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.reviews {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.stars {
    color: #fbbf24;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.reviewer {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #111827;
    color: #d1d5db;
    padding: 4rem 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer p i {
    color: var(--color-primary);
}

.footer-bottom {
    background: #030712;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
}

.footer-bottom p {
    justify-content: center;
    margin-bottom: 0;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (min-width: 992px) {
    .layout-wrapper {
        flex-direction: row;
    }
    
    .cart-sidebar {
        width: 400px;
        flex-shrink: 0;
        align-self: flex-start;
        position: sticky;
        top: 100px; /* offset from sticky header */
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .cart-toggle {
        display: none; /* Hide cart toggle on desktop, sidebar is always visible */
    }
    
    .two-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991px) {
    .cart-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        max-width: 450px;
        z-index: 1001;
        border-radius: 0;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
    
    .cart-sidebar-inner {
        height: auto;
        min-height: 100%;
    }
    
    .cart-items {
        max-height: none;
        overflow-y: visible;
    }
    
    .close-cart-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .nav a {
        display: none; /* Hide standard nav links on mobile for simplicity, keep cart */
    }
    
    .hero {
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
    }
}
