/* =================================
   Herb Healers Custom Styles
   ================================= */

/* Root Variables */
:root {
    --primary-green: #2d5016;
    --dark-green: #1a3d0a;
    --accent-green: #4a7c59;
    --light-green: #a8e063;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
    background-color: #476606 !important;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Header & Logo */
.header {
    position: relative;
    z-index: 100;
    background-color: #658b15 !important;
}

.logo {
    max-width: 300px;
    height: auto;
}

/* Fix for 1080p and lower resolution displays */
@media (max-width: 1920px) and (min-width: 992px) {
    /* Keep header container aligned with body content */
    .header .container {
        /* Use Bootstrap's default container max-widths */
    }

    .header .row {
        gap: 30px; /* Add gap between columns */
        margin-left: 0;
        margin-right: 0;
    }

    .logo {
        max-width: 280px;
        width: 100%;
        height: auto;
        display: block;
    }

    .header .col-lg-3 {
        flex: 0 0 auto;
        width: calc(35% - 15px); /* Account for gap */
        padding-left: 0;
        padding-right: 0;
    }

    .header .col-lg-9 {
        flex: 0 0 auto;
        width: calc(65% - 15px); /* Account for gap */
        padding-left: 0;
        padding-right: 0;
        display: flex;
        align-items: center;
    }

    /* Control the size of the right image */
    .header .col-lg-9 img {
        max-width: 250px;
        width: auto;
        height: auto;
    }

    .header .col-lg-9 .row {
        justify-content: flex-start;
        margin: 0;
    }
}

@media (max-width: 1366px) and (min-width: 992px) {
    .header .row {
        gap: 25px; /* Add gap between columns */
        margin-left: 0;
        margin-right: 0;
    }

    .logo {
        max-width: 260px;
        width: 100%;
        display: block;
    }

    .header .col-lg-3 {
        flex: 0 0 auto;
        width: calc(40% - 12.5px); /* Account for gap */
        padding-left: 0;
        padding-right: 0;
    }

    .header .col-lg-9 {
        flex: 0 0 auto;
        width: calc(60% - 12.5px); /* Account for gap */
        padding-left: 0;
        padding-right: 0;
    }

    /* Control the size of the right image */
    .header .col-lg-9 img {
        max-width: 220px;
        width: auto;
        height: auto;
    }

    .header .col-lg-9 .row {
        margin: 0;
    }
}

@media (max-width: 991px) {
    .logo {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .logo {
        max-width: none !important;
        width: 100% !important;
        height: auto !important;
    }

    .header .col-lg-3 {
        text-align: center;
    }

    .logo-link {
        display: block;
        width: 100%;
    }

    .header .col-lg-9 .row {
        justify-content: center;
    }

    .header .col-lg-9 .col-md-3,
    .header .col-lg-9 .col-6 {
        text-align: center;
        display: flex;
        justify-content: center;
    }
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #b2d557 !important;
}

.navbar-nav .nav-link {
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    color: #1a3d0a !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Cart Button Styling */
.cart-button {
    border-radius: 50px !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile cart button - round icon only */
@media (max-width: 991px) {
    .cart-button.d-lg-none {
        width: 45px;
        height: 45px;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .cart-button.d-lg-none i {
        font-size: 1.2rem;
        margin: 0 !important;
    }
}

/* Alert Banner (Newsletter & Shipping) */
.alert-banner {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    border: 3px solid var(--primary-green);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.alert-banner h2 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.alert-banner p {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Pulse Animation for Urgent Button */
.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(220, 53, 69, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.product-card .product-image img {
    transition: transform 0.4s ease;
    width: 100%;
    height: auto;
}

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

.product-card .product-title h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 10px;
    transition: color 0.3s ease;
}

.product-card:hover .product-title h6 {
    color: var(--accent-green);
}

/* Promotional Banners */
.promotional-banners a {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promotional-banners a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-widget .widget-header {
    background: var(--primary-green);
    color: white;
    padding: 15px 20px;
}

.sidebar-widget .widget-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-widget .widget-body {
    padding: 15px 20px;
}

/* Category List */
.category-list {
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list li a {
    display: block;
    padding: 10px 12px;
    color: var(--text-dark);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-radius: 4px;
}

.category-list li a:hover {
    background: white;
    border-left-color: var(--accent-green);
    color: var(--accent-green);
    padding-left: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-list li a i {
    font-size: 0.75rem;
    color: var(--accent-green);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
}

.footer h5, .footer h6 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer a {
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--light-green) !important;
    text-decoration: none;
}

.disclaimer-box {
    background: #3a3a3a !important;
    border: 1px solid #555;
}

/* Modal Customization */
.modal-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.modal-body .alert {
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .alert-banner {
        padding: 25px 20px;
    }

    .alert-banner h2 {
        font-size: 1.5rem;
    }

    .alert-banner p {
        font-size: 0.95rem;
    }

    .product-card .product-title h6 {
        font-size: 0.85rem;
    }

    .sidebar-widget {
        margin-top: 20px;
    }

    .logo {
        max-width: 200px;
    }

    /* Ensure product cards stay 2 columns on mobile */
    .products-section .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* When alert banner is moved to top level on mobile */
    .main-content .row > .alert-banner {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Center images in their columns */
    .sidebar-widget .row .col-6 {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .alert-banner h2 {
        font-size: 1.25rem;
    }

    .alert-banner p {
        font-size: 0.875rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }

    .product-card .product-title h6 {
        font-size: 0.8rem;
    }
}

/* Utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Form Inputs */
.form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.25);
}

/* Search Form in Navbar */
.navbar .form-control {
    border-radius: 20px 0 0 20px;
}

.navbar .btn {
    border-radius: 0 20px 20px 0;
}

/* Cart Badge */
.badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeIn 0.5s ease-in;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .alert-banner,
    .sidebar-widget {
        display: none;
    }
}
