/* RESET & BASICS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* html,body {
    height: 100%; 
    margin: 0;
} */

html {
    /* Allow html to grow with content */
    height: auto; 
    min-height: 100%;
}

body{
    
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;

    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Minimum height = 100% of Viewport Height */

     margin: 0;
}

.page-content{
    flex: 1;
    width: 100%;
}

a {
    text-decoration: none;
    color: #2c3e50;
}

ul {
    list-style: none;
}

/* LAYOUT CONTAINERS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Image Specifics */
.hero-banner {
    width: 100%;
    height: auto;
    display: block; /* Removes bottom whitespace */
    border-radius: 8px; /* Matches your card style */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Slight lift */
    margin-bottom: 30px;
}

.hero-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 40px; /* Spacing before the product grid */
    background-color: #f4f6f8; /* Placeholder color while loading */
    
}

.hero-img {
    width: 100%;
    /*height: auto;       /* Fixed height for a consistent "Banner" look */
    height: 700px;       /* Fixed height for a consistent "Banner" look */
    object-fit: cover;   /* This crops the image intelligently so it doesn't stretch/distort */
    object-position: center; /* Focuses on the center of the image */
    display: block;      /* Removes default inline image spacing */
    
}


@media (max-width: 650px) {
.hero-img {
    height: 400px;
}

}



.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

/* CARDS (Used for Dashboard, Products, etc) */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

/* FORMS */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border-left: 5px solid #3498db;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.category-grid {
    display: grid;
    /* This forces exactly 4 columns. 
       minmax(0, 1fr) prevents items from overflowing if images are huge */
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
    gap: 30px; /* Space between cards */
    margin-bottom: 50px;
}

.category-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 10px; /* Softer corners */
    overflow: hidden;
    text-decoration: none; /* Remove blue link underline */
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%; /* Stretches to fill grid row height */
}

.category-card:hover {
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #3498db;
}

/* IMAGE CONTROLS */
.category-image-wrapper {
    width: 100%;
    height: 200px; /* FIXED HEIGHT - Essential for alignment */
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    /* 'cover' zooms in to fill the square (no whitespace).
       'contain' shows the whole image (may have whitespace). 
       Change to 'contain' if you want to see the full logo/item. */
    object-fit: cover; 
    transition: transform 0.3s ease;
}

.category-card:hover .category-image-wrapper img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.category-info {
    padding: 15px;
    text-align: center;
    background-color: #fff;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* RESPONSIVENESS */
/* On Tablets (width < 1024px) -> 3 Columns */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* On Mobile (width < 768px) -> 2 Columns */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .category-image-wrapper {
        height: 150px; /* Smaller height on mobile */
    }
}




/* =========================================
   PRODUCT GRID (For category.php)
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    position: relative; /* For badge positioning */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Product Image */
.product-image-wrapper {
    width: 100%;
    height: 250px; /* Taller than categories */
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
}

.product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Show full product */
}

/* Badges (Sale / Out of Stock) */
.badge {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}
.badge-sale { background-color: #e74c3c; left: 10px; }
/* .badge-out { background-color: #c0392b; right: 10px; } */
.badge-out { background-color: #7f8c8d; right: 10px; }

/* Product Info */
.product-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Price Area */
.price-wrapper {
    margin-top: auto; /* Pushes price/button to bottom */
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 8px;
}

.current-price {
    color: #2c3e50;
    font-weight: bold;
}

.sale-text { color: #e74c3c; } /* Red for sale price */

/* Buttons */
.btn-cart {
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cart:hover { background-color: #2980b9; }

.btn-disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}
.btn-disabled:hover { background-color: #bdc3c7; }

/* Responsive */
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }

.separator-img {
    width: 100%;
    height: 600px;       /* Shorter than the main hero (700px) */
    object-fit: cover;   /* Ensures image covers area without stretching */
    object-position: center;
    display: block;
}


/* =========================================
   CAROUSEL SECTIONS (Netflix Style)
   ========================================= */

.carousel-section {
    margin-bottom: 40px;
    position: relative;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.carousel-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.view-all-link {
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 600;
    transition: color 0.2s;
}
.view-all-link:hover { color: #2980b9; }

/* Wrapper handles the relative positioning for buttons */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* The Scrollable Area */
.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px; /* Padding for shadow clearance */
    width: 100%;
    
    /* Hide Scrollbar (Chrome, Safari, Opera) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */

    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
}

/* Hide Scrollbar Standard */
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Navigation Buttons */
.carousel-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.prev-btn { left: -20px; }
.next-btn { right: -20px; }

/* The Product Card in Carousel */
.carousel-card {
    flex: 0 0 200px; /* Fixed width for cards */
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;

    scroll-snap-align: start; 
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.carousel-card-img {
    width: 100%;
    height: 180px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.carousel-card-img img {
    width: 100%;
    height: 100%;
    /* object-fit: cover;  */
    object-fit: contain; /* CHANGED: Shows full image without cropping */
    padding: 10px;       /* OPTIONAL: Adds breathing room around the product */
    transition: transform 0.3s ease;
}

.carousel-card-info {
    padding: 12px;
    text-align: left;
}

.carousel-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if name is too long */
}

.carousel-card-price {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 700;
}

.sale-price { color: #e74c3c; margin-right: 5px; }
.old-price-sm { text-decoration: line-through; color: #999; font-size: 0.8rem; }

/* Mobile Responsiveness for Buttons */
@media (max-width: 768px) {
    .prev-btn, .next-btn {
        display: none; /* Hide buttons on mobile, allow swipe */
    }
    .carousel-track {
        padding-right: 20px; /* Peek effect */
    }
}


/* =========================================
   BOTTOM WARNING MARQUEE
   ========================================= */
.warning-marquee {
    background-color: #f1c40f; /* Amber/Yellow for attention */
    color: #2c3e50;            /* Dark text for contrast */
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    font-weight: 800;          /* Extra Bold */
    font-size: 1.2rem;         /* Slightly larger text */
    border-top: 1px solid #e67e22;
    border-bottom: 1px solid #e67e22;
    margin-top: 0px;           /* Connected to the section above, or add margin if preferred */
}

.warning-track {
    display: inline-block;
    animation: warning-scroll 30s linear infinite; /* Adjust speed: Lower number = Faster */
    padding-left: 100%; /* Starts off-screen */
}

.warning-item {
    display: inline-block;
    margin-right: 100px; /* Space between the repeated sentences */
}

/* Define the scrolling animation */
@keyframes warning-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Pause on hover so users can read if they want */
.warning-marquee:hover .warning-track {
    animation-play-state: paused;
}

/* =========================================
   BRAND MISSION QUOTE SECTION
   ========================================= */
.brand-mission-section {
    background-color: #ffffff;
    padding: 20px 20px; 
    text-align: center;
    border-bottom: 1px solid #f0f0f0; 
}

.quote-content {
    max-width: 900px; 
    margin: 0 auto;   
}

.mission-text {
    font-size: 1.5rem;    
    line-height: 1.6;
    color: #555;          
    font-weight: 300;     
    font-style: italic;   
    margin: 0;            /* Removed top/bottom margin */
}

/* UPDATED ICON STYLES */
.quote-icon {
    font-size: 1.2rem;       /* Slightly smaller to fit inline, or try 1.5rem */
    color: #3498db;          /* Brand Blue */
    opacity: 0.6;            /* Transparent effect */
    display: inline-block;   /* Keeps them with the text */
    vertical-align: text-top; /* Aligns them nicely with the font height */
}

/* Specific spacing */
.fa-quote-left {
    margin-right: 10px;      /* Space between quote and first word */
    transform: translateY(-5px); /* Slight lift for visual balance */
}

.fa-quote-right {
    margin-left: 10px;       /* Space between last word and quote */
    transform: translateY(-5px); /* Slight lift */
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .mission-text {
        font-size: 1.2rem; 
    }
    .quote-icon {
        font-size: 1rem;
    }
}