/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Metropolis:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap');

.font-fancy {
    font-family: 'Kaushan Script', cursive;
}

/* Assuming Gotham-Bold is not available on Google Fonts freely, we fallback to a similar bold sans-serif or system font, 
   but define the family as requested. In a real app, we'd include the font files. */
@font-face {
    font-family: 'Gotham-Bold';
    src: local('Gotham Bold'), local('Gotham-Bold'), url('https://fonts.cdnfonts.com/s/138/Gotham-Bold.woff') format('woff');
    font-display: swap;
}

:root {
    --primary-color: #27AAE1;
    --secondary-color: #2B3990;
    --font-primary: 'Gotham-Bold', sans-serif;
    --font-secondary: 'Metropolis', sans-serif;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.object-fit-cover {
    object-fit: cover;
}

body {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    min-height: 100vh;
    font-family: var(--font-secondary);
    padding-top: 96px;
    /* Offset for Top Bar + Navbar */
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Login Page Specifics */
.login-page {
    padding-top: 0 !important;
    background: #fff;
    /* Reset gradient */
}

.login-container {
    min-height: 100vh;
    background: #fff;
    overflow: hidden;
}

.login-left {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right {
    background: #2B3990;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    padding: 3rem;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/pattern-overlay.png');
    /* Optional pattern */
    opacity: 0.1;
}

.login-promo-img {
    max-width: 80%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    margin-bottom: 2rem;
    z-index: 1;
}

.login-promo-text {
    z-index: 1;
    text-align: center;
}

.login-promo-text h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.login-promo-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.login-header h2 {
    font-family: var(--font-primary);
    color: #333;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subheader {
    color: #aeaeae;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-control-custom {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 0.75rem 0 0.75rem 2.5rem;
    background: transparent;
    transition: all 0.3s;
}

.form-control-custom:focus {
    box-shadow: none;
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #aeaeae;
    transition: color 0.3s;
}

.form-control-custom:focus+.input-icon,
.form-control-custom:focus~.input-icon {
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.btn-login {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    letter-spacing: 1px;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 170, 225, 0.4);
    color: white;
}

.form-label {
    display: none;
    /* Hiding labels for cleaner look, relying on placeholders */
}

/* Animations */
.animate-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card Styles - Restored */
.product-item {
    margin-bottom: 2rem;
}

.product-img-container {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    padding: 1rem;
}

.product-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.glass-card:hover .product-img-container img {
    transform: scale(1.05);
}

.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 2;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-wishlist:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-family: var(--font-primary);
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.mrp-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.nav-link-custom {
    text-decoration: none;
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    background: rgba(39, 170, 225, 0.1);
    color: var(--primary-color);
}

/* Logo Spinner */
.logo-spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-spinner-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    z-index: 10;
}

.logo-spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(13, 110, 253, 0.2);
    /* Light blue track */
    border-top: 4px solid var(--primary-color);
    /* Blue spinner */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Slideshow Image Optimization */
.slideshow-img {
    width: 100%;
    height: calc(100vh - 100px);
    /* Fill screen minus header */
    min-height: 500px;
    object-fit: cover;
    /* Fill bleed */
    object-position: center;
}

@media (max-width: 768px) {
    .slideshow-img {
        height: 400px;
        min-height: unset;
        object-fit: cover;
        /* Fill letterboxing */
        background-color: #000;
        border-radius: 0;
        border-bottom: 4px solid #00e5ff;
        /* Cyan line */
    }
}

/* Fullscreen Slide Feature */
.btn-fullscreen-slide {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.btn-fullscreen-slide:hover {
    background: white;
    transform: scale(1.1);
    color: var(--primary-color);
}

.fullscreen-slide-overlay {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.fullscreen-slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.fullscreen-slide-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, max-width 0.3s ease, max-height 0.3s ease;
    cursor: zoom-in;
}

.fullscreen-slide-content img.zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

.close-slide-overlay {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
    z-index: 100001;
    transition: transform 0.2s;
}

.top-bar {
    z-index: 1060;
    /* Higher than navbar 1030/1040 */
}

.close-slide-overlay:hover {
    transform: scale(1.2);
}

/* === Custom Navbar & Search === */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* === Mega Menu Drawer (Pop-in) === */
.mega-menu-drawer,
.search-overlay {
    position: fixed;
    top: 100px;
    /* Navbar (60ish) + Top Bar (36) */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 1040;
    /* Below search overlay (1050), above content */
    padding: 20px 0;
    transform: translateY(-150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important;
    /* Override d-none for animation handling */
    visibility: hidden;
    /* Not full screen */
    border-radius: 0 0 30px 30px;
    /* Distinctive curved bottom */
    margin: 0 15px;
    /* Slight offset from edges to look like a floating panel */
    width: calc(100% - 30px);
}

.mega-menu-drawer.active,
.search-overlay.active {
    transform: translateY(0);
    visibility: visible;
}

/* Specific Search Overlay adjustments */
.search-overlay {
    z-index: 1050;
    /* Slightly higher priority */
    background: white;
    /* Clean white for search */
}

.search-overlay .form-control {
    color: #333;
    /* Dark text for white bg */
}

.search-overlay .form-control::placeholder {
    color: #999;
}

.search-overlay .input-group-text {
    color: var(--primary-color);
}

/* Navbar Link Hover */
.nav-link-custom {
    position: relative;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link-custom:hover::after {
    width: 100%;
}

/* Mobile Visibility Override REMOVED */

/* Sidebar Grid (Mobile Menu) */
.sidebar-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    justify-items: center;
}

/* Home Page Horizontal Scroll (Desktop Only) */
.home-category-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2rem;
    gap: 1rem;
    justify-content: flex-start;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

/* Hide Home Page Categories on Mobile (Moved to Sidebar) */
@media (max-width: 768px) {
    .home-category-container {
        display: none !important;
    }
}

.mobile-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    /* Pointer only strictly needed for Desktop or large touch */
    width: 100%;
    position: relative;
    /* For Home Page tooltips */
}

/* Adjust item sizing for Home vs Sidebar context if needed */
.home-category-container .mobile-grid-item {
    flex-shrink: 0;
    min-width: 90px;
    max-width: 100px;
}

.mobile-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    width: 100%;
}

.mobile-grid-item img,
.mobile-grid-item .rounded-circle {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    transition: transform 0.2s;
    background: white;
}

.mobile-grid-item:active img {
    transform: scale(0.95);
}

.sidebar-header-custom {
    background-color: black;
    color: white;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
    position: relative;
}

.sidebar-header-custom .btn-close {
    filter: invert(1);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Offer Zone Specifics */
.offer-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 1rem; /* Adjusted for mobile */
}

@media (min-width: 768px) {
    .offer-page-header {
        padding: 4rem 2rem;
    }
}
