@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('cart_style.css');
@import url('checkout_style.css');
@import url('header_style.css');
@import url('shop_style.css');

:root {
    --primary: #0f172a;
    /* Dark Blue / Black */
    --secondary: #10b981;
    /* Success Green */
    --accent: #f59e0b;
    /* Warning/Promo Orange */
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Transitions */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container img {
    height: 35px !important;
    width: auto !important;
    object-fit: contain;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    position: relative;
}

.logo-text::first-letter {
    color: var(--secondary);
    font-size: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: 0.3s;
}

.nav-links a:hover {
    background: var(--background);
    color: var(--secondary);
}

/* --- New Premium Header --- */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 20px;
}

.header-search {
    flex: 1;
    max-width: 600px;
    display: flex;
    background: #f1f3f6;
    border-radius: 50px;
    padding: 4px;
    border: 2px solid transparent;
    transition: 0.3s;
}

.header-search:focus-within {
    background: white;
    border-color: var(--secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-search input {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}

.header-search button {
    background: var(--secondary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    transition: 0.3s;
}

.mobile-search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.mobile-search-bar.active {
    max-height: 80px;
    padding: 10px 0 15px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-search-bar form {
    display: flex;
    background: #f1f3f6;
    border-radius: 50px;
    padding: 4px;
}

.mobile-search-bar input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
}

.mobile-search-bar button {
    background: none;
    border: none;
    padding: 10px;
    color: var(--primary);
}

.horizontal-nav {
    border-top: 1px solid #f8fafc;
    padding: 8px 0;
    background: white;
}

.nav-scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.nav-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-scroll-container a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 15px;
    border-radius: 12px;
    transition: 0.3s;
}

.nav-scroll-container a i {
    font-size: 16px;
}

.nav-scroll-container a.active {
    background: #f0fdf4;
    color: var(--secondary);
}

.sell-btn {
    background: #f8fafc;
    color: var(--secondary);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sell-btn:hover {
    background: #f0fdf4;
    border-color: var(--secondary);
}

/* Special styling for dropshipper login button */
.reseller-btn {
    background: var(--secondary);
    color: #ffffff;
    border-color: var(--secondary);
}

.reseller-btn:hover {
    background: #059669;
    border-color: #059669;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #f85606;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid white;
}

/* Product View Layout (Daraz Style) */
.product-view-container {
    display: grid;
    grid-template-columns: 450px 1fr 280px;
    gap: 25px;
}

.product-delivery-panel {
    background: #fdfdfd;
    border: 1px solid #efefef;
    padding: 20px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
    align-self: start;
}

.delivery-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.delivery-item:last-child {
    border-bottom: none;
}

.delivery-item i {
    font-size: 20px;
    color: #9e9e9e;
    margin-top: 3px;
}

.delivery-item h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #212121;
}

.delivery-item p {
    font-size: 12px;
    color: #757575;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .product-view-container {
        grid-template-columns: 400px 1fr;
    }

    .product-delivery-panel {
        grid-column: span 2;
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 900px) {
    .product-view-container {
        grid-template-columns: 1fr;
    }

    .product-delivery-panel {
        grid-column: span 1;
    }

    .hide-mobile {
        display: none;
    }

    .search-form {
        margin: 10px 0;
        max-width: 100%;
        order: 3;
        width: 100%;
    }

    .header-content {
        flex-wrap: wrap;
    }
}

/* Hero Section */
.hero-v2 {
    background: var(--primary);
    color: white;
    padding: 100px 0;
    border-radius: 0 0 40px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

.hero-v2 h1 {
    font-size: 56px;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-v2 p {
    font-size: 18px;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* Shop Layout Styles */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

.filter-toggle {
    margin-bottom: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

@media (max-width: 991px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-toggle {
        display: none;
        /* Hide the title/toggle on mobile for cleaner look */
    }

    .filter-options {
        display: flex !important;
        /* Always show horizontal bar */
        overflow-x: auto;
        padding: 5px 0 15px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .filter-options::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .filter-options a {
        flex: 0 0 auto;
        /* Prevent shrinking */
        white-space: nowrap;
        padding: 10px 20px !important;
        font-size: 13px !important;
    }

    .sidebar-filters {
        background: transparent;
        padding: 0;
        border: none;
        margin-bottom: 0;
    }
}

/* Trust Badges */
.trust-bar {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: -40px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    /* Ensure it wraps if columns aren't used */
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 150px;
    /* Reduced to prevent overflow on very small devices */
}

.trust-badge i {
    color: var(--secondary);
    font-size: 24px;
}

.trust-badge span {
    font-weight: 600;
    font-size: 14px;
}

/* Product Cards */
/* Product Cards (Premium Style) */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.product-img-container {
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.product-img-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}



.product-card:hover .product-img-container img {
    transform: translate(-50%, -50%) scale(1.05);
}

.product-info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 15px;
    line-height: 1.5;
    height: 45px;
    margin: 4px 0 8px;
    font-weight: 600;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.product-price-row {
    margin-top: auto;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #f85606;
    /* Daraz Orange */
}

.product-old-price {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 5px;
    font-weight: 500;
}

.product-discount {
    font-size: 12px;
    color: #212121;
    margin-left: 5px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-size: 12px;
    color: #ffc107;
}

.product-rating-count {
    color: #9e9e9e;
    font-size: 11px;
}

.badge-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #effaf3;
    color: #1aae6f;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
}

.share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    z-index: 2;
    border: none;
    color: #666;
}

.share-btn:hover {
    background: #f85606;
    color: white;
}

/* Footer v2 */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 0 20px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 18px;
}

.footer-col p,
.footer-col li {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: white;
    color: var(--primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    border-left: 5px solid var(--secondary);
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hide mobile footer nav on desktop */
.mobile-bottom-nav {
    display: none;
}

/* Mobile Optimization Meta Styles */
@media (max-width: 768px) {
    :root {
        --radius-lg: 16px;
    }

    .container {
        padding: 0 15px;
    }

    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    /* Hide desktop nav */
    .nav-links {
        display: none !important;
    }

    header {
        padding: 10px 0;
    }

    .logo-text {
        font-size: 24px;
    }

    .search-form {
        display: none !important;
        /* Managed by toggle now */
    }

    .hero-v2 {
        padding: 60px 0;
        border-radius: 0 0 24px 24px;
    }

    .hero-v2 h1 {
        font-size: 32px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-name {
        font-size: 13px;
        height: 36px;
    }

    .product-price {
        font-size: 16px;
    }

    /* Sticky Bottom Nav Styles */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid var(--border);
        z-index: 2000;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 700;
        transition: 0.3s;
        gap: 4px;
    }

    .nav-item i {
        font-size: 20px;
    }

    .nav-item.active {
        color: var(--secondary);
    }

    .search-overlay.active {
        transform: translateY(0);
    }
}

/* --- Global Overlays (Hidden by Default) --- */

/* Menu Drawer Premium */
.menu-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 3001;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.15);
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    visibility: hidden;
    overflow-y: auto;
}

.menu-drawer.active {
    left: 0;
    visibility: visible;
}

.drawer-user-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
    padding: 50px 25px 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.drawer-user-section::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
}

.drawer-user-avatar {
    width: auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 28px;
    color: white;
    margin-bottom: 15px;
    font-weight: 800;
}

.drawer-user-avatar img {
    max-width: 150px;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Makes logo white to match dark theme */
}

.drawer-user-info h3 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

.drawer-user-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 4px;
}

.drawer-close-btn {
    position: absolute;
    top: 25px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.drawer-content {
    padding: 20px;
    flex: 1;
}

.drawer-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 1.5px;
    margin: 20px 0 10px 15px;
}

.menu-drawer a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    border-radius: 15px;
    transition: 0.3s;
    margin-bottom: 5px;
}

.menu-drawer a i {
    width: 25px;
    font-size: 18px;
    color: var(--text-muted);
    transition: 0.3s;
}

.menu-drawer a:hover {
    background: #f1f5f9;
    color: var(--secondary);
}

.menu-drawer a:hover i {
    color: var(--secondary);
    transform: translateX(3px);
}

.drawer-footer {
    padding: 25px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
}

.drawer-social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.drawer-social-links a {
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
}

.drawer-social-links a:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: #f0fdf4;
}

.drawer-app-version {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    opacity: 0.5;
}

/* Drawer Overlay (Dark Background) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Scroll Hide Helper */
.header-hidden {
    transform: translateY(-100%);
}

header {
    transition: transform 0.3s ease;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.product-card {
    animation: slideUp 0.4s ease-out;
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {

    /* Product Detail Compact */
    .product-view-container {
        display: block !important;
        padding: 0 !important;
    }

    .product-gallery {
        padding: 0 !important;
        margin-bottom: 15px !important;
    }

    .product-gallery>div:first-child {
        height: 350px !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .product-info-panel {
        padding: 15px 15px 100px 15px !important;
        /* Bottom padding for sticky button */
    }

    .product-info-panel h1 {
        font-size: 24px !important;
    }

    .product-delivery-panel {
        padding: 20px 15px !important;
        margin-top: 15px !important;
    }

    /* Sticky Add to Bag for Mobile */
    .buy-actions-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 20px;
        display: flex;
        gap: 10px;
        z-index: 1001;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.checkout-fields {
    order: 1;
}

.checkout-summary div {
    position: static !important;
    padding: 25px !important;
}

/* Product Page Fixes */
.product-view-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
}

.product-gallery {
    height: auto !important;
}

.product-gallery div:first-child {
    height: 350px !important;
    /* Smaller height for mobile */
}

.product-info-panel h1 {
    font-size: 24px !important;
}

.product-delivery-panel {
    grid-column: span 1 !important;
}

/* Global Container Padding */
.container {
    padding: 0 15px !important;
}

/* Prevent auto-zoom on form inputs */
input,
select,
textarea,
button {
    font-size: 16px !important;
}

/* Stacking Utilities */
.mobile-stack,
.grid-2 {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
}

/* Form Grid Fixes */
.checkout-fields .input-row,
.checkout-fields div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
}

/* Fix for large elements */
img,
video,
iframe {
    max-width: 100% !important;
    height: auto !important;
}

.product-info-panel div[style*="display: flex"],
.product-info-panel div[style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.product-gallery div:first-child img {
    max-height: 100%;
    width: auto !important;
    object-fit: contain;
}

/* Restoring Deleted Responsive Styles for Layout */
.footer-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 30px !important;
    padding-top: 50px !important;
    padding-bottom: 30px !important;
}

.footer-col {
    width: 100% !important;
    margin-bottom: 20px !important;
    padding: 0 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.footer-col ul {
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}

.footer-col h4 {
    margin-bottom: 15px !important;
    font-size: 18px !important;
}

.checkout-fields .input-row,
.checkout-fields div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
}


/* Touch targets */
@media (pointer: coarse) {

    .btn-primary,
    .btn-outline,
    .nav-item,
    .cart-icon {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* --- Desktop vs Mobile Visibility Fixes --- */

/* 1. Global Hiding (Defensive) */
.mobile-bottom-nav,
.search-overlay,
.menu-drawer,
.drawer-overlay,
.mobile-only {
    display: none;
}

/* 2. Desktop Specifics (Screen > 768px) */
@media (min-width: 769px) {

    .mobile-bottom-nav,
    .mobile-only {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Support Drawer/Search on Desktop if explicitly active */
    .search-overlay.active,
    .menu-drawer.active,
    .drawer-overlay.active {
        display: block !important;
    }

    /* Desktop par Header hamesha dikhna chahiye */
    .header-hidden {
        transform: translateY(0) !important;
    }

    /* Desktop dashboard fixes */
    body {
        padding-bottom: 0 !important;
    }
}

/* 3. Mobile Specifics (Screen <= 768px) */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    /* Hide by default on mobile until active */
    .search-overlay,
    .menu-drawer,
    .drawer-overlay {
        display: none;
    }

    .search-overlay.active {
        display: block !important;
        transform: translateY(0) !important;
    }

    .menu-drawer.active {
        display: block !important;
        left: 0 !important;
        visibility: visible !important;
    }

    .drawer-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}