/* Nity E-Commerce - Modern Customer UI Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --secondary: #2563eb;
    --accent: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-muted: #475569;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Top Notice Banner */
.top-bar {
    background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 7px 15px;
    letter-spacing: 0.3px;
}

.top-bar span {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
}

.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand-logo i {
    font-size: 1.8rem;
    color: var(--secondary);
}

.search-box {
    flex: 1;
    max-width: 550px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 18px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    background: #f1f5f9;
}

.search-box input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-muted);
    font-size: 1.1rem;
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark-muted);
    background: #f1f5f9;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link-pill:hover, .nav-link-pill.active {
    background: var(--primary);
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.header-icon-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.header-icon-btn i {
    font-size: 1.3rem;
}

.badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Category Navigation Sub-bar */
.nav-categories-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.nav-cat-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-cat-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.cat-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark-muted);
    background: #f1f5f9;
    transition: var(--transition);
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    color: #fff;
}

/* Hero Banner Animated Styling */
.hero-section {
    max-width: 1300px;
    margin: 25px auto;
    padding: 0 20px;
}

.hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
    border-radius: var(--radius-lg);
    padding: 60px 50px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(29, 78, 216, 0.22);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: heroPulseGlow 7s infinite alternate ease-in-out;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 8%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: heroPulseGlow 9s infinite alternate ease-in-out;
}

@keyframes heroPulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
    100% { transform: scale(1.25) translate(20px, -20px); opacity: 0.95; }
}

.hero-content {
    position: relative;
    z-index: 5;
}

.hero-content span.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 18px;
    display: inline-block;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 480px;
}

.hero-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    text-decoration: none;
    z-index: 1;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transition: left 0.75s ease;
}

.hero-btn:hover::before {
    left: 100%;
}

.hero-btn:hover {
    background: #ffffff;
    color: #1e40af;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 36px rgba(29, 78, 216, 0.38);
}

.hero-btn i {
    transition: transform 0.3s ease;
}

.hero-btn:hover i {
    transform: translateX(6px);
}

.hero-img {
    height: 100%;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.hero-img img {
    width: 100%;
    height: auto; /* Let the height be dynamic */
    max-height: 380px; /* Limit height so it doesn't break layout */
    object-fit: contain; /* Changed to contain to stop cropping */
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: none !important;
    background: transparent !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    animation: floatHeroImage 6s infinite ease-in-out alternate;
}

.hero-img img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

@keyframes floatHeroImage {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-12px) rotate(0.8deg); }
}

/* Entrance Stagger Animations for Slide Items */
.hero-slide-item.active .hero-content span.hero-badge {
    animation: heroFadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-slide-item.active .hero-content h1 {
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.hero-slide-item.active .hero-content p {
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

.hero-slide-item.active .hero-content .hero-btn {
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.36s forwards;
}

.hero-slide-item.active .hero-img {
    animation: heroZoomIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.18s forwards;
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroZoomIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Glassmorphism Controls */
.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-nav-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #1d4ed8;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Auto Progress Bar Line */
.hero-timer-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffffff, #60a5fa);
    width: 0%;
    z-index: 30;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Main Container & Layout */
.container {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 24px;
    background: var(--primary);
    border-radius: 4px;
}

.view-all-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(29, 78, 216, 0.3);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--dark-muted);
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.wishlist-btn:hover, .wishlist-btn.active {
    color: var(--danger);
    background: #fff;
}

.product-thumb {
    position: relative;
    padding-top: 133%; /* Changed from 75% to 133% for portrait clothing aspect ratio */
    overflow: hidden;
    background: #f8fafc;
}

.product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain so nothing gets cropped */
    transition: var(--transition);
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 14px;
}

.selling-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
}

.original-price {
    font-size: 0.9rem;
    color: var(--dark-muted);
    text-decoration: line-through;
}

.discount-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--success);
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--dark);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: var(--dark-muted);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

/* Filters Sidebar & Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.filter-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.filter-group {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--dark-muted);
    cursor: pointer;
}

.filter-item input[type="checkbox"], .filter-item input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Cart Page */
.cart-table-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 25px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cart-table th, .cart-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-table th {
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark-muted);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.qty-btn {
    width: 36px;
    height: 38px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: var(--primary);
}

.qty-btn:active:not(:disabled) {
    background: #cbd5e1;
}

.qty-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.qty-input {
    width: 50px;
    height: 38px;
    text-align: center;
    border: none;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark);
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Multi-Step Checkout */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    position: relative;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--dark-muted);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: var(--transition);
}

.step-item.active .step-number {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(29, 78, 216, 0.18);
}

.step-item.completed .step-number {
    background: var(--success);
    color: #fff;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-muted);
}

.step-item.active .step-label {
    color: var(--primary);
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 25px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 25px;
    text-align: center;
    font-size: 0.88rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--dark);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile Menu Toggle Button (hidden on desktop) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--dark);
    cursor: pointer;
}

/* Mobile Filter Toggle Button (hidden on desktop) */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .container, .header-container, .nav-cat-container { max-width: 95%; }
}

@media (max-width: 992px) {
    .hero-banner { 
        grid-template-columns: 1fr; 
        text-align: center; 
        padding: 40px 30px;
    }
    .hero-img { display: none; }
    .hero-content p { margin: 0 auto 28px; }
    
    .shop-layout { grid-template-columns: 1fr; gap: 20px; }
    .filter-sidebar { 
        display: none; 
        position: static; 
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px;
    }
    .filter-sidebar.active { display: block; }
    .mobile-filter-btn { display: flex; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; gap: 15px; position: relative; }
    .brand-logo { font-size: 1.3rem; }
    .brand-logo img { width: 45px !important; height: 45px !important; }
    
    .search-box { order: 3; flex: 100%; max-width: 100%; margin-top: 10px; }
    .mobile-menu-btn { display: block; order: 1; }
    
    /* Mobile Navigation Dropdown */
    .header-nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        background: #fff;
        padding: 15px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
        align-items: stretch;
    }
    
    .header-nav-links.active {
        display: flex;
    }
    
    .nav-link-pill {
        border-radius: var(--radius-sm);
        padding: 12px 16px;
        background: transparent;
    }
    .nav-link-pill:hover, .nav-link-pill.active {
        background: var(--primary-light);
        color: var(--primary);
    }

    .hero-content h1 { font-size: 2.2rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    
    /* Cart Table Scroll Adjustments */
    .cart-table th, .cart-table td { padding: 12px 10px; white-space: nowrap; }
    
    /* Checkout Steps Adjustments */
    .checkout-steps { flex-direction: column; gap: 20px; align-items: flex-start; }
    .step-item { display: flex; align-items: center; gap: 15px; text-align: left; }
    .step-number { margin: 0; }
}

@media (max-width: 576px) {
    .top-bar { font-size: 0.75rem; padding: 5px 10px; }
    .header-container { padding: 10px 15px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
    .product-body { padding: 12px; }
    .selling-price { font-size: 1.1rem; }
    .btn { padding: 8px 12px; font-size: 0.8rem; }
    .card-actions { grid-template-columns: 1fr; }
    
    .hero-banner { padding: 30px 20px; }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-content p { font-size: 0.95rem; }
    .section-title { font-size: 1.3rem; }
}


/* --- Responsive Inline Overrides --- */
@media (max-width: 992px) {
    /* Main Layout Grids & 2-column Grids */
    [style*='grid-template-columns:1fr 360px'],
    [style*='grid-template-columns:1fr 340px'],
    [style*='grid-template-columns:260px 1fr'],
    [style*='grid-template-columns:1fr 1fr'],
    [style*='grid-template-columns: 1fr 1fr'],
    [style*='grid-template-columns:1fr 1fr 1fr'] {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats 4-column */
    [style*='repeat(4, 1fr)'] {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    /* Stats 4-column to 1 column on very small screens */
    [style*='repeat(4, 1fr)'] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 992px) {
    .container > div[style*="grid"],
    .container > form[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* Prevent Grid Blowout */
.container > div[style*="grid"] > div,
.container > form[style*="grid"] > div {
    min-width: 0;
}

/* Bulletproof Profile Overflow Fix */
#orders, #wishlist, #profile {
    max-width: 100%;
    min-width: 0;
}

/* Custom attractive dropdown */
select.attractive-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 35px 10px 15px !important;
    font-size: 0.95rem;
    font-weight: 500 !important;
    color: var(--dark) !important;
    background-color: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
}

select.attractive-dropdown:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

select.attractive-dropdown:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

