/* style.css - Boichitro Shop BD Professional E-Commerce Stylesheet */
:root {
    --primary-color: #073477;
    --primary-hover: #052454;
    --secondary-color: #f59e0b;
    --secondary-hover: #d97706;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-page: #ffffff;
    --bg-light: #f8fafc;
    --bg-subtle: #f1f5f9;
    --card-bg: #ffffff;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(7, 52, 119, 0.08);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --header-bg: rgba(255, 255, 255, 0.98);
    --input-bg: #ffffff;
    --offers-bg: #fff9f0;
    --hero-bg: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
    --cta-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --cta-border: #93c5fd;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary-color: #fbbf24;
    --secondary-hover: #f59e0b;
    --accent-green: #34d399;
    --accent-red: #f87171;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --bg-page: #0b132b;
    --bg-light: #111d3d;
    --bg-subtle: #17254e;
    --card-bg: #111d3d;
    --white: #17254e;
    --border-color: #1e305e;
    --border-hover: #2e4480;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(11, 19, 43, 0.96);
    --input-bg: #0d1733;
    --offers-bg: #0f1936;
    --hero-bg: linear-gradient(135deg, #0d1733 0%, #152247 100%);
    --cta-bg: linear-gradient(135deg, #111d3d 0%, #172752 100%);
    --cta-border: #2c4278;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Hind Siliguri', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    scroll-margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 14px;
    border-left: 5px solid var(--primary-color);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success { border-left-color: var(--accent-green); }
.toast.warning { border-left-color: var(--secondary-color); }
.toast.error { border-left-color: var(--accent-red); }

.toast i {
    font-size: 18px;
}
.toast.success i { color: var(--accent-green); }
.toast.warning i { color: var(--secondary-color); }
.toast.error i { color: var(--accent-red); }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    gap: 16px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

/* Official image logo – height matches the 38px header buttons so header height is unchanged */
.logo a.logo-link { line-height: 0; }
.logo-img {
    display: block;
    height: 38px;
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.search-box {
    position: relative;
    flex: 0 1 280px;
}

.search-box input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-dark);
}

.search-box input:focus {
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 52, 119, 0.12);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14.5px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background: var(--bg-subtle);
}

.nav-link.highlight {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-link.highlight:hover {
    background: var(--secondary-hover);
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    color: var(--text-dark);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--bg-subtle);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.cart-icon {
    position: relative;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    transition: var(--transition);
}

.cart-icon:hover {
    background: var(--bg-subtle);
    border-color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

.mobile-toggle {
    display: none;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px 10px;
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: var(--bg-subtle);
}

/* Hero Section */
.hero-section {
    padding: 50px 0;
    background: var(--hero-bg);
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 46px;
    color: var(--primary-color);
    margin: 16px 0;
    line-height: 1.2;
    font-weight: 800;
}

.hero-text p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 14px;
    margin: 28px 0;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}
.feature-tag i { color: var(--accent-green); }

.hero-slider-box {
    position: relative;
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.slider-wrapper img {
    max-width: 100%;
    height: 300px;
    margin: 0 auto;
    object-fit: contain;
    transition: opacity 0.35s ease;
}

.product-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--secondary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

/* Standard Buttons & Badges */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14.5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary { background: var(--primary-color); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary { background: var(--card-bg); color: var(--primary-color); border: 1.5px solid var(--primary-color); }
.btn-secondary:hover { background: var(--bg-subtle); }

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 12px 28px;
    font-size: 15px;
    border-radius: var(--radius-full);
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-lg { padding: 14px 28px; font-size: 16px; }

.badge { padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; }
.badge-primary { background: var(--bg-subtle); color: var(--primary-color); border: 1px solid var(--border-color); }

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, #073477 0%, #052454 100%);
    color: #ffffff;
    padding: 45px 0;
    text-align: center;
}
[data-theme="dark"] .page-banner {
    background: linear-gradient(135deg, #101c3d 0%, #0b132b 100%);
    border-bottom: 1px solid var(--border-color);
}
.page-banner h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.page-banner p { opacity: 0.9; font-size: 16px; }

/* Products Section & Cards */
.products-section { padding: 60px 0; }
.offers-bg { background-color: var(--offers-bg); }

.section-title { text-align: center; margin-bottom: 36px; }
.sub-title { color: var(--secondary-color); font-weight: 700; letter-spacing: 1.5px; font-size: 13px; text-transform: uppercase; }
.section-title h2 { font-size: 30px; color: var(--primary-color); font-weight: 700; margin: 4px 0 8px; }
.section-title p { color: var(--text-muted); font-size: 15px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.product-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.badge-sale { background: var(--accent-red); }
.badge-mega { background: #8b5cf6; }
.badge-outofstock { background: #6b7280; }

/* Out of Stock State */
.product-card.out-of-stock .product-img img {
    opacity: 0.55;
    filter: grayscale(55%);
}
.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-add-cart:disabled:hover,
.btn-buy-now:disabled:hover {
    background: var(--bg-light);
    transform: none;
}
.cart-item-stock-warning {
    color: var(--accent-red, #ef4444);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.product-img {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

.product-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.06);
}

.product-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    margin-top: 16px;
}

.product-details h3 {
    font-size: 17px;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 700;
    min-height: 48px;
    line-height: 1.4;
}

.product-details h3:hover {
    color: var(--secondary-hover);
}

.product-details .desc {
    font-size: 13px;
    color: var(--text-muted);
    min-height: 38px;
    margin: 6px 0 10px;
    line-height: 1.5;
}

.price-box {
    margin: 8px 0 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 14px;
}

.save-badge {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-add-cart, .btn-buy-now {
    flex: 1;
    padding: 10px 10px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    font-family: inherit;
}

.btn-add-cart {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}
.btn-add-cart:hover {
    background: var(--bg-subtle);
    border-color: var(--primary-color);
}

.btn-buy-now {
    background: var(--primary-color);
    color: #ffffff;
}
.btn-buy-now:hover {
    background: var(--primary-hover);
}

.view-all-container {
    text-align: center;
    margin-top: 40px;
}

/* Filter & Sort Bar */
.filter-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: var(--bg-light);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
    font-family: inherit;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control-sm {
    padding: 7px 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    font-size: 13.5px;
    outline: none;
    background: var(--input-bg);
    color: var(--text-dark);
    font-family: inherit;
}

.no-results-msg {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 18px;
}
.no-results-msg i {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--border-hover);
    display: block;
}

/* Quick CTA Section */
.quick-cta-section { padding: 40px 0; }
.cta-card {
    background: var(--cta-bg);
    border: 2px dashed var(--cta-border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
}
.cta-card h2 { color: var(--primary-color); font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.cta-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Contact & About Sections */
.contact-section { padding: 60px 0; background: var(--bg-page); }
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    text-align: center;
    margin-top: 30px;
}
.contact-box {
    padding: 28px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.contact-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--border-hover);
}
.contact-box i { font-size: 32px; color: var(--secondary-color); margin-bottom: 14px; }
.contact-box h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary-color); font-weight: 700; }
.contact-box p { font-size: 14px; color: var(--text-muted); }
.contact-box a { color: var(--primary-color); text-decoration: none; font-weight: 600; font-size: 14px; }
.contact-box a:hover { text-decoration: underline; }

.about-section { padding: 60px 0; background: var(--bg-light); border-top: 1px solid var(--border-color); }
.about-text { max-width: 800px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 15px; }
.about-text p { margin-bottom: 16px; line-height: 1.7; }
.about-list { list-style: none; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.about-list li { background: var(--card-bg); padding: 10px 20px; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); color: var(--primary-color); font-weight: 600; font-size: 14px; border: 1px solid var(--border-color); }
.about-list i { color: #25d366; margin-right: 6px; }

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    background: var(--card-bg);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.25);
    z-index: 100000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.cart-drawer.active { right: 0; }
.cart-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    min-height: 58px;
    flex-shrink: 0;
}
.cart-header-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-header-title-box i {
    color: var(--primary-color);
    font-size: 18px;
}
.cart-header h3 {
    font-size: 17px;
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.cart-header-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}
.close-drawer {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: var(--transition);
}
.close-drawer:hover {
    background: var(--bg-subtle);
    color: var(--primary-color);
}
.cart-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.cart-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    flex-shrink: 0;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--text-dark);
    font-weight: 600;
}
.cart-total strong {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 800;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
}
.drawer-overlay.active { display: block; }

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    position: relative;
}
.cart-item-img {
    width: 58px;
    height: 58px;
    min-width: 58px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    border: 1px solid var(--border-color);
}
.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cart-item-info h4 {
    font-size: 13.5px;
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}
.cart-item-price {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 600;
}
.item-total-price {
    color: var(--primary-color);
    font-weight: 700;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}
.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    min-height: 32px;
}
.qty-btn-sm {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-dark);
    padding: 2px 6px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn-sm:hover { color: var(--primary-color); }
.qty-num {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 16px;
    text-align: center;
}
.cart-del-btn {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 13px;
}
.cart-del-btn:hover {
    background: var(--accent-red);
    color: #fff;
}
.btn-block { width: 100%; text-align: center; justify-content: center; }
.empty-cart-msg { text-align: center; color: var(--text-muted); margin-top: 40px; font-size: 15px; }
.empty-cart-msg i { font-size: 44px; color: var(--border-hover); margin-bottom: 14px; display: block; }
.empty-cart-msg a { display: inline-block; margin-top: 12px; color: var(--primary-color); font-weight: 600; }

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: #25d366;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    z-index: 999;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}
.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    background: #20ba5a;
}
.whatsapp-float i { font-size: 20px; }

/* CHECKOUT PAGE STYLES */
.checkout-page-body {
    background-color: var(--bg-page);
    min-height: 100vh;
}

.checkout-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.checkout-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.back-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.back-link:hover { color: var(--primary-color); }

.checkout-container {
    padding: 36px 20px 60px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 28px;
    align-items: start;
}

.checkout-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
}
.card-header-title h3 { font-size: 18px; font-weight: 700; }
.card-header-title i { font-size: 18px; color: var(--primary-color); }
.card-header-label { font-weight: 700; display: block; margin-bottom: 8px; color: var(--primary-color); font-size: 15px; }

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.checkout-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.checkout-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    border: 1px solid var(--border-color);
}
.checkout-item-details { flex: 1; min-width: 0; }
.checkout-item-details h4 { font-size: 14px; color: var(--primary-color); font-weight: 700; margin-bottom: 2px; }
.checkout-item-details .price { font-size: 13.5px; font-weight: 700; color: var(--text-dark); }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-group {
    margin-bottom: 16px;
    position: relative;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 6px;
    color: var(--text-dark);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-dark);
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 52, 119, 0.15);
}

.error-msg {
    color: var(--accent-red);
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.radio-label {
    flex: 1;
    min-width: 170px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--card-bg);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}
.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--bg-subtle);
    color: var(--primary-color);
}

/* Coupon inside Summary Card */
.coupon-accordion {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 18px;
}
.coupon-accordion summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--primary-color);
}
.coupon-accordion summary::-webkit-details-marker { display: none; }
.coupon-box {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.coupon-status-msg {
    font-size: 13px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

.summary-list .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14.5px;
    color: var(--text-muted);
}
.summary-list .summary-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}
.summary-list hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 12px 0;
}
.summary-list .total {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
}
.summary-list .total span:last-child {
    color: var(--primary-color);
    font-size: 20px;
}

.btn-submit-order {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 17px;
    font-weight: 700;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
    width: 100%;
}
.btn-submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
}
.btn-submit-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Empty Checkout Card View */
.checkout-empty-card {
    text-align: center;
    padding: 60px 24px;
    max-width: 600px;
    margin: 30px auto;
}
.empty-cart-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.empty-icon-circle {
    width: 84px;
    height: 84px;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.empty-icon-circle i {
    font-size: 36px;
    color: var(--primary-color);
}
.empty-cart-view h2 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
}
.empty-cart-view p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 420px;
    margin-bottom: 28px;
    line-height: 1.6;
}
.empty-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ORDER SUCCESS / CONFIRMATION STATE */
.order-success-card {
    max-width: 780px;
    margin: 30px auto;
    padding: 36px 30px;
    animation: fadeIn 0.4s ease;
}
.success-banner {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.success-icon-badge {
    width: 72px;
    height: 72px;
    background: #ecfdf5;
    color: #10b981;
    border: 2px solid #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}
[data-theme="dark"] .success-icon-badge {
    background: rgba(16, 185, 129, 0.15);
}
.success-banner h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.order-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.order-id-highlight {
    color: var(--secondary-color);
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}
.order-time-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 20px;
}

/* WhatsApp Prompt Highlight Box */
.whatsapp-prompt-box {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.08));
    border: 2px solid rgba(37, 211, 102, 0.4);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 24px;
}
.whatsapp-prompt-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.wa-icon-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.wa-prompt-text h4 {
    font-size: 16.5px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
}
[data-theme="dark"] .wa-prompt-text h4 {
    color: #4ade80;
}
.wa-prompt-text p {
    font-size: 14px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}
.btn-whatsapp-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}
.btn-whatsapp-large:hover {
    background: #20ba59;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

/* Order Receipt Box */
.order-receipt-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}
.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 16px;
}
.receipt-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-print-receipt {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-print-receipt:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}
.receipt-customer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    font-size: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-color);
}
.receipt-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.receipt-info-item.full-width {
    grid-column: span 2;
}
.info-label {
    font-size: 12.5px;
    color: var(--text-muted);
}
.info-val {
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}
.badge-cod {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
[data-theme="dark"] .badge-cod {
    background: rgba(3, 105, 161, 0.2);
    color: #38bdf8;
}
.receipt-items-table {
    margin-bottom: 18px;
}
.table-header {
    display: grid;
    grid-template-columns: 1fr 60px 90px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.receipt-item-row {
    display: grid;
    grid-template-columns: 1fr 60px 90px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
    align-items: center;
}
.receipt-item-row .col-item {
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}
.receipt-item-row .col-qty {
    text-align: center;
    color: var(--text-muted);
}
.receipt-item-row .col-price {
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
}
.receipt-totals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}
.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-dark);
}
.receipt-row.total-row {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color);
    padding-top: 10px;
    border-top: 2px solid var(--border-color);
}
.receipt-notes {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--card-bg);
    border-left: 3px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text-dark);
}
.success-footer-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media print {
    body * {
        visibility: hidden;
    }
    #orderSuccessState, #orderSuccessState * {
        visibility: visible;
    }
    #orderSuccessState {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
    }
    .whatsapp-prompt-box, .btn-print-receipt, .success-footer-actions {
        display: none !important;
    }
}

/* SINGLE PRODUCT PAGE DETAILS */
.single-product-main { padding: 40px 20px 60px; }
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-bg);
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.product-large-img {
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}
.product-large-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.product-info-col h1 {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 800;
    margin: 8px 0 10px;
    line-height: 1.3;
}
.product-info-col .desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}
.product-info-col .price-box {
    margin: 20px 0;
}
.package-info-box {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    border: 1px solid var(--border-color);
}
.package-info-box h4 {
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.package-info-box p {
    font-size: 14px;
    color: var(--text-dark);
}
.quantity-selector-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}
.quantity-selector-box label {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}
.quantity-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
}
.qty-btn {
    background: var(--bg-light);
    border: none;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}
.qty-btn:hover { background: var(--bg-subtle); }
.quantity-control input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    background: transparent;
    outline: none;
}
.detail-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: #0b132b;
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}
.footer-box h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}
.footer-box h2 span { color: var(--secondary-color); }
.footer-box h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}
.footer-box p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}
.footer-box ul { list-style: none; }
.footer-box ul li { margin-bottom: 8px; }
.footer-box a { color: #94a3b8; text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-box a:hover { color: #ffffff; padding-left: 4px; }
.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav { display: none; }

/* COMPREHENSIVE RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .checkout-grid { grid-template-columns: 1fr; gap: 20px; }
    .product-details-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 36px; }
    .hero-btns { justify-content: center; }
    .hero-features { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
    
    .container { padding: 0 14px; }
    
    .header-container {
        flex-wrap: wrap;
        padding: 8px 14px 14px;
        gap: 8px;
    }
    
    .logo a { font-size: 20px; }
    .logo-img { height: 40px; }
    
    .search-box {
        order: 3;
        flex: 1 1 100%;
        margin-top: 0;
    }
    .search-box input {
        padding: 9px 16px 9px 36px;
        font-size: 16px; /* Prevents auto-zoom on iOS */
    }
    
    .header-actions {
        gap: 8px;
    }
    .theme-toggle-btn, .cart-icon, .mobile-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .navbar {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        background: var(--card-bg);
        padding: 10px 0;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-top: 6px;
        box-shadow: var(--shadow-md);
    }
    .navbar.active { display: flex; }
    .navbar .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 0;
    }
    .navbar .nav-link.highlight {
        margin: 6px 16px;
        width: calc(100% - 32px);
        border-radius: var(--radius-full);
    }
    
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }
    
    /* CART DRAWER ON MOBILE */
    .cart-drawer {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
        height: 100%;
        height: 100dvh;
        z-index: 100000;
    }
    .cart-drawer.active { right: 0; }
    .cart-header { padding: 12px 14px; }
    .close-drawer {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 26px;
    }
    .cart-body { padding: 12px 14px 20px; }
    .cart-footer { padding: 14px 14px max(16px, env(safe-area-inset-bottom)); }
    
    /* MOBILE BOTTOM NAVIGATION */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        /* 60px bar + safe area: the inset is added to the height instead of squeezing the content area */
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        background: var(--card-bg);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
        z-index: 9000;
        justify-content: space-around;
        align-items: flex-start;
        padding: 0 2px env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        height: 59px; /* 60px bar minus 1px top border */
        min-height: 44px;
        padding: 2px 0;
        line-height: 1.2;
        font-family: inherit;
        transition: var(--transition);
        background: none;
        border: none;
        cursor: pointer;
    }
    .mobile-nav-item i { font-size: 18px; margin-bottom: 2px; }
    .mobile-nav-item.active { color: var(--primary-color); font-weight: 700; }
    
    .cart-icon-wrapper { position: relative; display: inline-block; }
    .cart-icon-wrapper .cart-badge { top: -6px; right: -10px; font-size: 10px; min-width: 16px; height: 16px; }
    
    /* WHATSAPP FLOAT ON MOBILE */
    .whatsapp-float {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        z-index: 8999;
    }
    .whatsapp-float span { display: none; }
    
    /* CHECKOUT RESPONSIVENESS */
    .checkout-container { padding: 16px 14px 100px; }
    .checkout-card { padding: 16px 14px; margin-bottom: 16px; }
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .form-control {
        font-size: 16px; /* Prevents auto-zoom on iOS */
        padding: 11px 14px;
        min-height: 46px;
    }
    .radio-label {
        flex: 1 1 100%;
        min-width: 100%;
        min-height: 48px;
        font-size: 14px;
    }
    .btn-submit-order {
        min-height: 52px;
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    /* FILTER & SORT BAR ON PRODUCTS PAGE */
    .filter-sort-bar {
        padding: 12px 14px;
        gap: 12px;
    }
    .category-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 7px 14px;
        font-size: 13px;
        min-height: 38px;
    }
    .sort-box {
        width: 100%;
        justify-content: space-between;
    }
    .sort-box .form-control-sm {
        flex: 1;
        min-height: 40px;
        font-size: 14px;
    }
    
    /* HERO SECTION ON MOBILE */
    .hero-section { padding: 14px 0 16px; }
    .hero-container { gap: 14px; }
    .hero-text h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 6px; }
    .hero-text p { font-size: 14px; line-height: 1.55; max-width: 100%; margin: 0 auto; overflow-wrap: anywhere; }
    .hero-btns { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 8px; margin: 12px 0 10px; }
    .hero-btns .btn { flex: 1 1 0; width: auto; min-width: 0; min-height: 44px; padding: 10px 8px; font-size: 13.5px; gap: 6px; white-space: nowrap; }
    .hero-features { justify-content: center; gap: 6px 12px; font-size: 12.5px; }
    .hero-slider-box { padding: 10px; }
    .slider-wrapper img { height: 170px; max-width: 100%; object-fit: contain; }
    .product-tag { top: 10px; left: 10px; }
    .products-section { padding: 28px 0; }
    .section-title { margin-bottom: 16px; }
    
    /* SINGLE PRODUCT PAGE */
    .single-product-main { padding: 20px 14px 80px; }
    .product-details-grid { padding: 18px 14px; gap: 20px; }
    .product-large-img { height: 240px; padding: 12px; }
    .product-info-col h1 { font-size: 22px; }
    .detail-actions { flex-direction: column; }
    .detail-actions .btn { width: 100%; min-height: 48px; }
    
    /* PRODUCTS GRID ON MOBILE — 2 cards per row, compact height */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card { padding: 10px; min-width: 0; }
    .product-img {
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 6px;
    }
    .product-details { margin-top: 8px; }
    .product-details h3 {
        font-size: 13px;
        min-height: unset;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .product-details .desc {
        font-size: 11.5px;
        min-height: unset;
        margin: 4px 0 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price-box { margin: 4px 0 8px; }
    .price { font-size: 16px; }
    .old-price { font-size: 11px; }
    .save-badge { font-size: 9.5px; padding: 1px 6px; }
    .card-badge { font-size: 9.5px; padding: 3px 8px; top: 8px; left: 8px; }
    .card-actions {
        gap: 6px;
        flex-direction: column;
    }
    .btn-add-cart, .btn-buy-now {
        width: 100%;
        min-height: 38px;
        font-size: 12px;
        padding: 8px 6px;
    }
    
    /* FOOTER */
    .footer { padding: 28px 0 14px; margin-top: 32px; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    /* .container's shorthand padding (above) would otherwise wipe the header's vertical padding */
    .header-container { padding: 8px 12px 14px; }
    .logo a { font-size: 18px; }
    .hero-text h1 { font-size: 26px; }
    .hero-btns .btn { font-size: 13px; padding: 10px 6px; }
    .section-title h2 { font-size: 24px; }
    .page-banner h1 { font-size: 24px; }
    .page-banner { padding: 30px 0; }
    
    .checkout-item-card {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    .checkout-item-card .checkout-top-row {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
    }
    .checkout-item-img {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .receipt-customer-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .table-header, .receipt-item-row {
        grid-template-columns: 1fr 50px 75px !important;
        font-size: 12.5px !important;
    }
}

/* ==========================================================================
   ADMIN PANEL — Boichitro Shop BD (Sidebar Dashboard, Tables, Modals, Forms)
   ========================================================================== */

:root {
    --admin-primary: var(--primary-color);
    --admin-primary-hover: var(--primary-hover);
    --admin-sidebar-bg: #0b1c3d;
    --admin-sidebar-hover: #142a54;
    --admin-bg: #f3f5f9;
    --admin-card-bg: #ffffff;
    --admin-border: #e4e8f0;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
    --admin-success: #16a34a;
    --admin-info: #2563eb;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
}

[data-theme="dark"] {
    --admin-bg: #0f172a;
    --admin-card-bg: #1a2540;
    --admin-border: #2b3a5c;
    --admin-text: #e5e9f5;
    --admin-text-muted: #94a3b8;
}

.admin-body {
    background: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
    font-family: 'Hind Siliguri', 'Poppins', sans-serif;
}

/* ---------- LOGIN PAGE ---------- */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0b1c3d 0%, #073477 100%);
}

.admin-login-card {
    background: var(--admin-card-bg);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.admin-login-card .admin-login-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--admin-primary);
    margin-bottom: 4px;
}

.admin-login-card .admin-login-logo span { color: var(--secondary-color); }

.admin-login-card p.subtitle {
    color: var(--admin-text-muted);
    font-size: 14px;
    margin-bottom: 26px;
}

.admin-login-card .form-group-admin { text-align: left; margin-bottom: 16px; }

.admin-login-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(7, 52, 119, 0.1);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 14px;
}

#loginErrorMsg {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 16px;
}

.admin-login-hint {
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--admin-text-muted);
    background: var(--admin-bg);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

/* ---------- LAYOUT: SIDEBAR + MAIN ---------- */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--admin-sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    transition: var(--transition);
}

.admin-sidebar-logo {
    padding: 22px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-logo span { color: var(--secondary-color); }
.admin-sidebar-logo small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3c4;
    margin-top: 2px;
}

.sidebar-menu {
    list-style: none;
    padding: 14px 10px;
    margin: 0;
    flex: 1;
}

.sidebar-menu li { margin-bottom: 4px; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a i { width: 18px; text-align: center; font-size: 15px; }

.sidebar-menu a:hover { background: var(--admin-sidebar-hover); color: #fff; }

.sidebar-menu a.active {
    background: var(--admin-primary);
    color: #fff;
}

.admin-sidebar-footer {
    padding: 14px 10px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-footer .btn-admin { width: 100%; justify-content: center; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
    background: var(--admin-card-bg);
    border-bottom: 1px solid var(--admin-border);
    padding: 16px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar h1 { font-size: 19px; font-weight: 700; margin: 0; }

.admin-topbar-right { display: flex; align-items: center; gap: 14px; }

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--admin-text-muted);
}

#btnMenuToggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--admin-text);
    cursor: pointer;
}

.admin-content { padding: 24px 26px 60px; }

.admin-view { display: none; }
.admin-view.active { display: block; animation: adminFadeIn 0.25s ease; }

@keyframes adminFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- CARDS & DASHBOARD METRICS ---------- */
.admin-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 22px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-card-header h3 { font-size: 16px; font-weight: 700; margin: 0; }

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.admin-metric-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    color: #fff;
}

.admin-metric-icon.mi-blue { background: var(--admin-primary); }
.admin-metric-icon.mi-orange { background: var(--secondary-color); }
.admin-metric-icon.mi-green { background: var(--admin-success); }
.admin-metric-icon.mi-purple { background: #8b5cf6; }
.admin-metric-icon.mi-red { background: var(--admin-danger); }

.admin-metric-info .metric-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.admin-metric-info .metric-label { font-size: 12.5px; color: var(--admin-text-muted); margin-top: 2px; }

/* ---------- SEARCH / FILTER BAR ---------- */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.admin-search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.admin-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-muted);
    font-size: 13px;
}

.admin-search-box input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 13.5px;
}

.admin-filter-chip {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.admin-filter-chip.active { background: var(--admin-primary); border-color: var(--admin-primary); color: #fff; }

/* ---------- TABLES ---------- */
.admin-table-wrapper { overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }

.admin-table thead th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--admin-text-muted);
    padding: 10px 12px;
    border-bottom: 2px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 13.5px;
    vertical-align: middle;
}

.admin-table tbody tr:hover { background: var(--admin-bg); }

/* ---------- STATUS BADGES ---------- */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.active, .status-badge.confirmed, .status-badge.delivered { background: rgba(22,163,74,0.12); color: var(--admin-success); }
.status-badge.inactive, .status-badge.cancelled { background: rgba(239,68,68,0.12); color: var(--admin-danger); }
.status-badge.pending { background: rgba(245,158,11,0.14); color: #b45309; }
.status-badge.shipped { background: rgba(37,99,235,0.12); color: var(--admin-info); }

/* ---------- BUTTONS ---------- */
.btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-admin-primary { background: var(--admin-primary); color: #fff; }
.btn-admin-primary:hover { background: var(--admin-primary-hover); }

.btn-admin-secondary { background: var(--admin-bg); color: var(--admin-text); border: 1px solid var(--admin-border); }
.btn-admin-secondary:hover { background: var(--admin-border); }

.btn-admin-success { background: var(--admin-success); color: #fff; }
.btn-admin-danger { background: rgba(239,68,68,0.1); color: var(--admin-danger); }
.btn-admin-danger:hover { background: var(--admin-danger); color: #fff; }

.btn-admin-sm { padding: 7px 10px; font-size: 12.5px; }
.btn-admin-block { width: 100%; }

/* ---------- FORMS ---------- */
.form-grid-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group-admin { margin-bottom: 16px; }

.form-group-admin label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--admin-text);
}

.form-control-admin {
    width: 100%;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 13.5px;
    font-family: inherit;
}

.form-control-admin:focus { outline: none; border-color: var(--admin-primary); }

.checkbox-row-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
}

.checkbox-row-admin input { width: 17px; height: 17px; accent-color: var(--admin-primary); }

.image-upload-box { display: flex; align-items: center; gap: 14px; }
.image-upload-box img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
}

/* ---------- MODALS ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--admin-card-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-box.modal-box-lg { max-width: 640px; }

.modal-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--admin-border);
    position: sticky;
    top: 0;
    background: var(--admin-card-bg);
}

.modal-box-header h3 { font-size: 16.5px; font-weight: 700; margin: 0; }

.modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--admin-text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-box-body { padding: 22px; }

.modal-box-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- ADMIN TOASTS ---------- */
.admin-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-toast {
    background: var(--admin-card-bg);
    border-left: 4px solid var(--admin-success);
    color: var(--admin-text);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    transition: all 0.3s ease;
}

.admin-toast.error { border-left-color: var(--admin-danger); }
.admin-toast.warning { border-left-color: var(--admin-warning); }
.admin-toast.info { border-left-color: var(--admin-info); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        box-shadow: var(--shadow-lg);
    }
    .admin-sidebar.mobile-open { left: 0; }
    #btnMenuToggle { display: block; }
    .admin-content { padding: 18px 14px 50px; }
    .form-grid-admin { grid-template-columns: 1fr; }
    .admin-topbar { padding: 14px 16px; }
}

/* Mobile Page Banner Adjustment */
@media (max-width: 768px) {

    .page-banner {
        padding: 18px 10px !important;
        min-height: auto !important;
    }

    .page-banner h1 {
        font-size: 22px !important;
        margin: 0 !important;
    }

    .page-banner p {
        font-size: 12px !important;
        margin: 5px 0 0 !important;
    }

}
@media (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}
