/* ==========================================================================
   1. GLOBAL LAYOUT CORE RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff;
    color: #1d1d1f;
    overflow-x: hidden;
}

a {
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.bg-coral {
    background-color: #ff6f61 !important;
    color: #ffffff !important;
}

.text-coral {
    color: #ff6f61 !important;
}

/* ==========================================================================
   2. GLOBAL HEADER & NAVBAR STYLING
   ========================================================================== */
#masterGlobalHeader {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1050 !important;
}

.brand-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: #1d1d1f;
}

.brand-logo span {
    color: #ff6f61;
}

/* Round Action Utility Buttons */
.btn-action-circle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    border: none;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-action-circle:hover {
    background-color: #edf2f7 !important;
    color: #1a202c;
}

/* 🎯 LIVE SEARCH DROPDOWN ARCHITECTURE (INTEGRATED) */
.search-wrapper-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 2000;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 5px;
    border: 1px solid rgba(0,0,0,0.08);
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #1d1d1f;
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f5f7;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f5f5f7;
}

.suggestion-icon {
    width: 30px;
    text-align: center;
    color: #ff6f61;
}

.suggestion-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 12px;
    border: 1px solid #edf2f7;
    background: #fdfdfd;
}

.suggestion-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.suggestion-tag {
    font-size: 10px;
    background: #edf2f7;
    color: #718096;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   3. CATEGORY SCROLL STRIP BAR
   ========================================================================== */
.premium-slim-category-strip {
    background-color: #ffffff;
    border-bottom: 1px solid #edf2f7;
}

.container-category-scroll {
    display: flex;
    gap: 10px;
    width: 100%;
}

.category-pill {
    padding: 6px 16px;
    background: #f5f5f7;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    display: inline-block;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover, 
.category-pill.active {
    background: #ff6f61;
    color: #ffffff !important;
}

/* ==========================================================================
   4. DRAWER SIDEBAR (MOBILE VIEW ONLY)
   ========================================================================== */
.mobile-left-category-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 2050;
    box-shadow: 5px 0 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease-in-out;
}

.mobile-left-category-drawer.drawer-open {
    transform: translateX(300px);
}

.drawer-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2040;
    display: none;
}

/* ==========================================================================
   5. RESPONSIVE SLIM BANNER SLIDER SYSTEM
   ========================================================================== */
.banner-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.carousel-indicators [data-bs-target] {
    background-color: #ff6f61;
}

/* ==========================================================================
   6. PREMIUM PRODUCT GRID CARDS (AMAZON/FLIPKART FORMAT OVERHAUL)
   ========================================================================== */
.product-item-card-wrapper .card {
    background: #ffffff;
    border: 1px solid #e5e9f0 !important;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.product-item-card-wrapper .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* Strict Image Wrapper Box */
.product-item-card-wrapper .card-img-top-box {
    position: relative;
    width: 100%;
    height: 190px;
    background-color: #f8f9fa;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-item-card-wrapper .card-img-top-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-item-card-wrapper .card:hover .card-img-top-box img {
    transform: scale(1.05);
}

/* 🏷️ FIXED CORNER FLOATING BADGE */
.product-item-card-wrapper .badge-discount-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6f61;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* Content Area */
.product-item-card-wrapper .card-body-custom {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-item-card-wrapper .product-main-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.4;
    margin-bottom: 8px;
    height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item-card-wrapper .price-section-grid {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.product-item-card-wrapper .selling-price {
    font-size: 17px;
    font-weight: 800;
    color: #1d1d1f;
}

.product-item-card-wrapper .mrp-slashed-price {
    font-size: 12px;
    color: #86868b;
    text-decoration: line-through;
}

.product-item-card-wrapper .cta-buy-btn {
    width: 100%;
    background-color: #ff6f61;
    color: #ffffff;
    border: none;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.product-item-card-wrapper .cta-buy-btn:hover {
    background-color: #e55b4f;
    color: #ffffff;
}

/* 🏷️ CATEGORY SECTION HEADERS STYLING */
.category-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.category-block-title {
    font-size: 18px;
    font-weight: 800;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-see-more-btn {
    font-size: 13px;
    font-weight: 700;
    color: #ff6f61;
    text-decoration: none;
    transition: color 0.2s;
}

.category-see-more-btn:hover {
    color: #e55b4f;
    text-decoration: underline;
}

/* ==========================================================================
   7. CORPORATE FOOTER AREA
   ========================================================================== */
footer {
    background-color: #1a202c !important;
}

footer h5, footer h6 {
    letter-spacing: 0.5px;
}

footer a:hover {
    color: #ff6f61 !important;
    padding-left: 5px;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES BREAKPOINTS
   ========================================================================== */

/* MOBILE VIEW BREAKPOINT OVERRIDES (Screens smaller than 992px) */
@media (max-width: 991.98px) {
    .container-category-scroll {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    
    .container-category-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .desktop-hq-search-wrapper {
        display: none !important;
    }
    
    #mobileSearchWrapper {
        display: block; /* Forced to display standard on mobile wrapper stack */
        background: #ffffff;
        border-bottom: 1px solid #edf2f7;
    }

    /* 📱 Responsive Adjustments for Mobile Cards */
    .product-item-card-wrapper .card-img-top-box {
         height: 113px;
        padding: 0px;
        background: transparent;

    }
    
    .product-item-card-wrapper .product-main-title {
        font-size: 12px;
        height: 18px;
    }
    
    .product-item-card-wrapper .selling-price {
        font-size: 14px;
    }
    
    .product-item-card-wrapper .cta-buy-btn {
        padding: 6px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .product-item-card-wrapper .badge-discount-ribbon {
        font-size: 9px;
        padding: 2px 6px;
        top: 6px;
        left: 6px;
    }

    .category-block-title {
        font-size: 15px;
    }

    .category-see-more-btn {
        font-size: 12px;
    }
}

/* DESKTOP VIEW BREAKPOINT OVERRIDES (Screens 992px and larger) */
@media (min-width: 992px) {
    .container-category-scroll {
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow: visible;
    }
    
    .desktop-hq-search-wrapper {
        display: block !important;
    }
    
    #mobileSearchWrapper {
        display: none !important;
    }
    
    #mobileSearchTriggerBtn {
        display: none !important;
    }
}

/* DYNAMIC HEIGHT SPECIFICATION FOR RESPONSIVE SLIDER IMAGES */
@media (min-width: 768px) {
    .banner-img {
        height: 380px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

@media (max-width: 767.98px) {
    .banner-img {
        height: 140px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* Footer Visibility Override Patch */
footer .text-muted, 
footer p.text-muted, 
footer ul li a.text-muted {
    color: #cbd5e1 !important;
}
footer a:hover {
    color: #ff6f61 !important;
}


/* ==========================================================================
   AUTH MODAL SYSTEM STYLING
   ========================================================================== */

/* Modal Box Enhancement */
.auth-modal-box .modal-body {
    padding: 20px 28px 28px;
    min-height: 200px;
}

.auth-primary-btn {
    background-color: #ff6f61 !important;
    border-color: #ff6f61 !important;
    transition: all 0.25s ease;
}
.auth-primary-btn:hover {
    background-color: #e85d50 !important;
    border-color: #e85d50 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 111, 97, 0.35);
}
.auth-primary-btn:disabled {
    background-color: #a0aec0 !important;
    border-color: #a0aec0 !important;
    transform: none;
    box-shadow: none;
}

/* Step Transition Animation */
.auth-step-view {
    animation: authStepFadeIn 0.3s ease forwards;
}
@keyframes authStepFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-step-enter {
    animation: authStepFadeIn 0.3s ease forwards;
}

/* OTP Icon Wrapper */
.auth-otp-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 111, 97, 0.1);
    color: #ff6f61;
}

/* OTP Timer Bar */
.auth-timer-bar {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
}
.auth-timer-track {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.auth-timer-fill {
    height: 100%;
    background: #48bb78;
    border-radius: 4px;
    transition: width 1s linear;
    width: 100%;
}

/* OTP Input Styling */
#otpCodeInput, #forgotOtpCode {
    letter-spacing: 10px;
    font-size: 28px !important;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s ease;
}
#otpCodeInput:focus, #forgotOtpCode:focus {
    border-color: #ff6f61;
    box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.15);
}

/* Password Toggle Button */
#loginPasswordToggle, #signupPasswordToggle, 
#signupConfirmToggle, #forgotNewPasswordToggle, #forgotConfirmToggle {
    border-left: none;
}

/* Input Focus Glow */
.auth-modal-box .form-control:focus {
    border-color: #ff6f61;
    box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.1);
}

/* Alert Animation */
#modalAuthAlert {
    animation: authAlertPop 0.25s ease;
}
@keyframes authAlertPop {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .auth-modal-box .modal-body {
        padding: 16px 18px 22px;
    }
    .auth-modal-box .modal-content {
        margin: 10px;
        border-radius: 16px !important;
    }
    #otpCodeInput, #forgotOtpCode {
        letter-spacing: 8px;
        font-size: 22px !important;
    }
}
