/* Modern Premium E-Commerce Storefront Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #006837;
    --primary-hover: #004e28;
    --primary-light: #e6f4ea;
    --secondary: #e31b23;
    --secondary-hover: #c4121a;
    --accent: #e31b23;
    --dark: #0a2e16;
    --dark-card: #0d381c;
    --light-bg: #f3f8f5;
    --card-bg: #ffffff;
    --border-color: #d0e4d7;
    --text-primary: #0e2918;
    --text-muted: #4a6e56;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 4px rgba(0,104,55,0.04);
    --shadow-md: 0 8px 24px rgba(0,104,55,0.10);
    --shadow-lg: 0 20px 40px rgba(0,104,55,0.16);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, .brand-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Header & Navbar */
.store-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    position: static;
    z-index: 1000;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e31b23 0%, #006837 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-search-form {
    position: relative;
    max-width: 480px;
    width: 100%;
}

.nav-search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.8rem;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

.nav-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Category Nav Bar */
.category-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    overflow-x: auto;
    white-space: nowrap;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.85rem;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: var(--transition);
}

.category-pill:hover, .category-pill.active {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 104, 55, 0.25);
}

/* Sidebar Category List Items */
.sidebar-category-item {
    color: #475569 !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.6rem 0.9rem;
    transition: var(--transition);
    border-radius: 8px !important;
}

.sidebar-category-item:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.sidebar-category-item.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 700;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #053b1b 0%, #006837 55%, #b8141b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    margin: 1.5rem 0 2.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(227, 27, 35, 0.30) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 104, 55, 0.3);
}

.product-thumb-wrapper {
    position: relative;
    padding-top: 82%;
    overflow: hidden;
    background: #f8fafc;
}

.product-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: var(--transition);
}

.product-card:hover .product-thumb {
    transform: scale(1.06);
}

.product-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 104, 55, 0.15);
}

.product-body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.product-title:hover {
    color: var(--primary);
}

.product-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.product-price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px dashed #f1f5f9;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
}

.product-price span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Button Add to Cart & Primary Action Buttons - Logo Crimson Red */
.btn-add-cart,
.btn-primary,
.btn-danger {
    background: #e31b23 !important;
    border-color: #e31b23 !important;
    color: #ffffff !important;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap; /* Single line */
    box-shadow: 0 4px 12px rgba(227, 27, 35, 0.25) !important;
}

.btn-add-cart:hover,
.btn-primary:hover,
.btn-danger:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #c4121a !important;
    border-color: #c4121a !important;
    color: #ffffff !important;
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(227, 27, 35, 0.35) !important;
}

.btn-outline-primary {
    color: #e31b23 !important;
    border-color: #e31b23 !important;
}

.btn-outline-primary:hover {
    background: #e31b23 !important;
    color: #ffffff !important;
}

/* Cart Badge */
.cart-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -8px;
}

/* Floating / Sidebar Cart */
.cart-drawer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.cart-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8fafc;
    padding: 0.2rem;
}

/* Footer */
.store-footer {
    background: #072512;
    color: #d1fae5 !important;
    padding: 3.5rem 0 1.5rem 0;
    margin-top: 4rem;
    border-top: 4px solid #006837;
}

.store-footer h5, .store-footer h4 {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.store-footer p, 
.store-footer li, 
.store-footer span, 
.store-footer div, 
.store-footer .text-muted {
    color: #d1fae5 !important;
}

.store-footer a {
    color: #a7f3d0 !important;
    text-decoration: none;
    transition: var(--transition);
}

.store-footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Checkout Form Card */
.checkout-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.order-summary-card {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.8rem;
}

/* Mobile Responsiveness Rules */
@media (max-width: 768px) {
    .store-header {
        padding: 0.5rem 0;
    }

    .store-header .brand-title span {
        font-size: 1.1rem;
    }

    .hero-banner {
        padding: 1.5rem 1.25rem !important;
        border-radius: 16px !important;
    }

    .hero-banner h1 {
        font-size: 1.45rem !important;
    }

    .hero-banner .lead {
        font-size: 0.95rem !important;
    }

    .category-nav {
        padding: 0.35rem 0;
    }

    .category-pill {
        font-size: 0.88rem;
        padding: 0.35rem 0.75rem;
    }

    .product-card {
        margin-bottom: 0.5rem;
    }

    .product-img-wrapper {
        height: 150px !important;
    }

    .product-card-body {
        padding: 0.85rem !important;
    }

    .product-title {
        font-size: 0.9rem !important;
        height: 2.6em !important;
    }

    .checkout-card, .order-summary-card {
        padding: 1.2rem !important;
    }

    .store-footer {
        padding: 2rem 0 1rem 0;
    }

    .store-footer .footer-social-row {
        justify-content: center !important;
    }
}

/* Sticky Header Rules */
.store-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0px !important;
    z-index: 1050 !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

.store-mobile-search {
    position: relative !important;
    background: #ffffff !important;
    z-index: 1;
}

@media (min-width: 769px) {
    .category-nav {
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .header-btn-compact {
        font-size: 0.85rem !important;
        padding: 0.35rem 0.75rem !important;
        font-weight: 600 !important;
    }
}

@media (max-width: 768px) {
    .header-btn-compact {
        font-size: 0.78rem !important;
        padding: 0.22rem 0.55rem !important;
        font-weight: 600 !important;
    }

    .product-category-badge {
        font-size: 0.60rem !important;
        padding: 0.15rem 0.45rem !important;
        top: 0.35rem !important;
        left: 0.35rem !important;
        z-index: 5 !important;
        max-width: 85% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .product-thumb {
        padding: 1.6rem 0.4rem 0.4rem 0.4rem !important;
    }

    .product-body {
        padding: 0.75rem !important;
    }

    .product-meta {
        font-size: 0.70rem !important;
        margin-bottom: 0.35rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 0.2rem !important;
    }

    .product-meta span {
        font-size: 0.70rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .product-meta .badge {
        font-size: 0.62rem !important;
        padding: 0.15rem 0.4rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .product-title {
        font-size: 0.85rem !important;
        line-height: 1.25 !important;
        height: 2.5em !important;
        margin-bottom: 0.3rem !important;
    }

    .product-price-row {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 0.35rem !important;
        padding-top: 0.4rem !important;
    }

    .product-price {
        font-size: 0.88rem !important;
        text-align: center !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: baseline !important;
        justify-content: center !important;
        gap: 0.15rem !important;
    }

    .product-price span {
        font-size: 0.68rem !important;
        white-space: nowrap !important;
    }

    .btn-add-cart {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.78rem !important;
        border-radius: 99px !important;
        white-space: nowrap !important;
    }

    .order-summary-card .btn,
    .checkout-card .btn {
        font-size: 0.82rem !important;
        padding: 0.5rem 0.75rem !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .cart-item-title {
        font-size: 0.80rem !important;
        line-height: 1.25 !important;
        max-width: 130px !important;
    }

    .cart-img {
        width: 40px !important;
        height: 40px !important;
        object-fit: contain !important;
    }
}
