/* =========================================
   1. FONTS & VARIABLES
   ========================================= */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Asap:wght@400;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --ans-red: #D32F2F;        
    --ans-yellow: #FFC107;     
    --ans-dark-red: #B71C1C;   
    --ans-white: #FFFFFF;
    --ans-dark: #2C3E50;       
    --ans-light-gray: #F4F6F7; 
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--ans-light-gray);
    color: var(--ans-dark);
    -webkit-font-smoothing: antialiased; /* Smoother text on iOS */
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Asap', sans-serif;
    font-weight: 700;
}

/* =========================================
   2. LOGO & BRANDING
   ========================================= */
.logo-gradient {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--ans-red), var(--ans-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.15));
}
@media (max-width: 768px) {
    .logo-gradient { font-size: 1.6rem; }
}

/* Social Icons (Gradient Fill) */
.social-icons a {
    font-size: 1.2rem;
    text-decoration: none;
    background: linear-gradient(to right, var(--ans-red), var(--ans-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    transition: transform 0.2s ease;
}
.social-icons a:hover {
    transform: scale(1.2);
    filter: brightness(1.2); 
}

/* =========================================
   3. NAVBAR & NAVIGATION
   ========================================= */
.navbar {
    background-color: var(--ans-white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.nav-link {
    color: var(--ans-dark);
    font-weight: 500;
}

/* Icon Links (Stacked Logic) */
.icon-link-stacked {
    color: var(--ans-dark) !important;
    transition: all 0.2s ease;
    padding: 5px 12px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.icon-link-stacked i {
    font-size: 1.3rem; 
    color: #546e7a;
    transition: color 0.2s ease;
    margin-bottom: 2px;
}
.icon-link-stacked:hover {
    background-color: #ffebee;
}
.icon-link-stacked:hover i, 
.icon-link-stacked:hover span {
    color: var(--ans-red) !important;
}

/* =========================================
   4. SEARCH BARS
   ========================================= */
/* Mobile Search */
.mobile-search-input {
    border-radius: 20px 0 0 20px !important;
    border-right: none;
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem !important;
    height: 38px !important; 
    background-color: #f8f9fa;
    line-height: 1.5 !important;
}
.mobile-search-btn {
    border-radius: 0 20px 20px 0 !important;
    border-left: none;
    background-color: #f8f9fa;
    height: 38px !important; 
    border-color: #ced4da;
    padding-top: 5px !important;
}

/* Desktop Search */
.search-form { width: 100%; max-width: 500px; }
.search-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-radius: 50px 0 0 50px; 
    border: 1px solid #ced4da;
    padding-left: 20px;
    height: 42px !important; 
}
.search-btn {
    background: linear-gradient(45deg, #D32F2F, #ff4081) !important;
    color: white !important;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-radius: 0 50px 50px 0; 
    border: none;
    padding: 0 25px;
    height: 42px !important; 
}

/* =========================================
   5. BUTTONS & UI ELEMENTS
   ========================================= */
/* Main Action Button (Gradient) */
.btn-ans {
    background: linear-gradient(45deg, #D32F2F, #ff4081) !important;
    background-color: #D32F2F !important;
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}
.btn-ans:hover {
    transform: translateY(-2px);
    color: white !important;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5);
}

/* Small Circular Buttons (Share/Wishlist) */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #2C3E50;
    border: 1px solid #eee;
    padding: 0; 
    transition: all 0.2s;
}
.btn-icon:hover {
    background-color: #e0e0e0;
}
.btn-icon.active {
    color: #D32F2F;
    border-color: #ffcdd2;
    background-color: #ffebee;
}

/* =========================================
   6. HERO BANNER (Responsive Landscape)
   ========================================= */
.banner-img-container {
    height: 450px; /* Desktop Height */
    width: 100%;
    position: relative;
    overflow: hidden;
}
.banner-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Mobile: Force Landscape Rectangle */
@media (max-width: 768px) {
    .banner-img-container {
        height: 180px !important; 
    }
    .carousel-caption {
        display: none !important; 
    }
}

/* =========================================
   7. SECTION HEADERS (Clean Red Text)
   ========================================= */
.section-header {
    background: transparent; /* No more box background */
    padding: 10px 5px;       
    border-radius: 0;
    box-shadow: none;
    border-bottom: 2px solid #e0e0e0; /* Subtle separator line */
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700; /* Bold */
    font-size: 1.1rem; /* Desktop Size */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0 !important;
    
    /* Make the text Red */
    color: var(--ans-red); 
}

/* --- MOBILE ADJUSTMENTS FOR HEADERS --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 0.9rem !important; /* Smaller font on mobile */
    }
    .section-header {
        padding-top: 5px !important;
        padding-bottom: 2px !important; /* Less padding on bottom */
    }
}

/* Gradient Background for View All Button */
.btn-view-all {
    background: linear-gradient(45deg, var(--ans-red), var(--ans-yellow)) !important;
    color: white !important;
    border: none;
    font-size: 0.75rem;
    padding: 4px 15px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(211, 47, 47, 0.3);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.4);
    color: white !important;
}

/* =========================================
   8. PRODUCT SCROLLER & CARDS
   ========================================= */
/* The Container that scrolls horizontally */
.product-scroller {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.product-scroller::-webkit-scrollbar {
    display: none; /* Chrome */
}

/* The Individual Card Size */
.product-card-wrapper {
    min-width: 240px; /* Desktop Width */
    max-width: 240px;
    flex: 0 0 auto;
    transition: transform 0.2s;
}
.product-card-wrapper:hover {
    transform: translateY(-5px);
}

/* Mobile Card Optimization (2 per screen) */
@media (max-width: 768px) {
    .product-scroller {
        gap: 10px; 
    }
    .product-card-wrapper {
        min-width: 160px; /* Fits 2 cards (160+160+10 = 330px width) */
        max-width: 160px;
    }
    .card-img-container {
        height: 120px !important; 
    }
    .card-body {
        padding: 10px !important;
    }
    .card-title {
        font-size: 0.85rem;
    }
    .text-danger {
        font-size: 0.85rem;
    }
    .btn-ans {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* =========================================
   9. AUTH FORMS (Login/Signup Styling)
   ========================================= */
/* Force Django UserCreationForm inputs to look like Bootstrap inputs */
form input[type="text"],
form input[type="password"],
form input[type="email"] {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #f8f9fa;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

form input:focus {
    color: #212529;
    background-color: #fff;
    border-color: #ffcdd2;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25);
}

form ul.errorlist {
    list-style: none;
    padding: 0;
    color: var(--ans-red);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* =========================================
   10. PRODUCT DESCRIPTION (Rich Text Support)
   ========================================= */
/* Ensures CKEditor content (Bullets, Bold, etc) looks good */
.product-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #6c757d; /* Matches text-muted */
}
.product-description p {
    margin-bottom: 1rem;
}
.product-description ul, 
.product-description ol {
    padding-left: 20px; /* Ensure bullets aren't hidden */
    margin-bottom: 1rem;
}
.product-description li {
    margin-bottom: 5px; /* Spacing between list items */
}
.product-description strong, 
.product-description b {
    font-weight: 700;
    color: var(--ans-dark); /* Bold text stands out */
}
.product-description a {
    color: var(--ans-red);
    text-decoration: underline;
}