/* =========================================
   0. GLOBAL BACKGROUND & WATERMARK
   ========================================= */
body {
    /* Set DEFAULT values here */
    --page-watermark: url('../images/watermark.png');
    --watermark-size: 90%; 
    
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    /* Use the variables! */
    background-image: var(--page-watermark);
    background-size: var(--watermark-size);
    
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25; /* Your preferred opacity */
    z-index: -999;
    pointer-events: none;
}

/* =========================================
   1. NAVBAR & NAVIGATION (Matches your image)
   ========================================= */
nav {
    background-color: #212529; /* Dark background */
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { color: white; font-weight: bold; text-decoration: none; font-size: 1.2rem; }
.nav-link-seeds { color: #28a745; text-decoration: none; margin: 0 10px; font-weight: 500; }
.nav-link-medicinal { color: #6f42c1; text-decoration: none; margin: 0 10px; font-weight: 500; }

/* Centered Pill Search Bar */
.search-container { flex-grow: 1; max-width: 450px; margin: 0 40px; }
.nav-search-input { 
    width: 100%; border-radius: 25px; padding: 6px 20px; border: none; outline: none;
    background-color: white;
}

.nav-right { display: flex; align-items: center; gap: 20px; color: white; }
.nav-right a { color: white; text-decoration: none; font-size: 0.9rem; }

/* =========================================
   2. HERO BANNER (Centered & Full Image)
   ========================================= */
.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;  
    width: 96%;         
    margin: 20px auto;  
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
}

/* =========================================
   2. HERO BANNER (Centered & Full Image)
   ========================================= */
.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;  
    width: 96%;         
    margin: 20px auto;  
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
}

.hero-banner {
    position: relative; 
    width: 100%;        
    height: 420px;      
    background: url("../images/banner.png") no-repeat center center;
    background-size: 100% 100%; 
    border-radius: 25px;
    border: 5px solid #28a745;
    box-sizing: border-box; 
}

/* Glassmorphism Effect - Refined for Bottom Left */
.banner-text-box {
    position: absolute;
    bottom: 25px;       /* Anchors to bottom */
    left: 25px;         /* Anchors to left */
    
    background: rgba(0, 0, 0, 0.5); /* Slightly darker for better text contrast */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    max-width: 320px;   /* Prevents the box from growing too wide */
    z-index: 10;
}

/* Scaled down text to prevent hiding the illustration words */
.banner-text-box h1 {
    font-size: 1.4rem;
    color: white;
    margin: 0;
    font-weight: bold;
}

.banner-text-box p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
}


/* =========================================
   3. PRODUCT BUTTONS (Preserving your code)
   ========================================= */
.add-to-barrow-btn {
    background: #28a745; color: white; border: none; padding: 10px;
    width: 100%; border-radius: 8px; font-weight: bold;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.3s ease;
}
.add-to-barrow-btn:hover { background: #218838; }

/* Spinning Wheel Animation */
.add-to-barrow-btn:hover .wheel {
    animation: spin 1s linear infinite;
    transform-origin: center;
    transform-box: fill-box; 
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =========================================
   4. ICONS & QUANTITY (Wheelbarrow Version)
   ========================================= */

/* The Little Purple/Green Bubble Circle */
.barrow-badge {
    position: absolute;
    top: -8px;    /* Moved up slightly for the bigger icon */
    right: -12px; /* Moved right slightly */
    background-color: #6f42c1;
    color: white;
    font-size: 0.75rem; /* Made the font a tiny bit bigger too */
    padding: 2px 7px;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    border: 1.5px solid #212529;
    z-index: 5;
}

/* =========================================
   5. RESPONSIVE ADJUSTMENTS (Mobile & Tablet)
   ========================================= */
@media (max-width: 768px) {
    body {
        /* Makes the watermark larger on mobile screens so it's visible */
        background-size: 70%; 
    }
}

/* Color toggle for the SVG itself */
.text-success { color: #28a745 !important; } /* Green when empty */
.text-purple { color: #6f42c1 !important; }  /* Purple when filled */

/* Animation for the SVG Wheel */
.wheelbarrow-svg .wheel {
    transform-origin: 32px 50px; /* This is the center of the wheel in your SVG */
    transition: transform 0.3s ease;
}

/* When you hover the link, make the wheel spin */
#barrow-link:hover .wheel {
    animation: rotate-wheel 0.8s linear infinite;
}

@keyframes rotate-wheel {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* General Hover Scale for the whole icon */
#barrow-link:hover .wheelbarrow-svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Styling for the Checkout Button on the cart page */
.btn-checkout-green {
    background-color: #28a745;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    display: block;
    width: 100%;
    transition: background 0.3s ease;
}

.btn-checkout-green:hover {
    background-color: #218838;
}
