/* ═══════════════════════════════════════════════════════════════
   PakMart — Daraz Original Theme
   Palette: Orange #F85606 | Dark Orange #E04E00 | White #FFFFFF
            Light Gray #F5F5F5 | Dark Nav #1A1A2E
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* ── Root Variables ──────────────────────────────────────────── */
:root {
    --orange:         #F85606;
    --orange-dark:    #E04E00;
    --orange-light:   #FFF0E8;
    --orange-mid:     #FFD4B8;
    --white:          #FFFFFF;
    --gray-light:     #F5F5F5;
    --gray-mid:       #EDEDED;
    --nav-dark:       #1A1A2E;
    --nav-darker:     #0F0F1A;
    --text-dark:      #212121;
    --text-mid:       #555555;
    --text-light:     #999999;
    --card-shadow:    0 2px 12px rgba(248,86,6,.12);
    --hover-shadow:   0 8px 30px rgba(248,86,6,.22);
    --border-orange:  1px solid #FFD4B8;
    --radius:         8px;
    --radius-sm:      4px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--gray-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--orange-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ── Top Strip (Daraz style — dark) ─────────────────────────── */
.top-strip {
    background: var(--nav-dark);
    padding: .28rem 0;
    font-size: .73rem;
    color: rgba(255,255,255,.75);
    text-align: center;
}
.top-strip a { color: var(--orange); text-decoration: none; }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    background: var(--orange) !important;
    border-bottom: none !important;
    padding: .6rem 0;
    box-shadow: 0 2px 8px rgba(248,86,6,.35) !important;
    z-index: 1050;
}

.navbar-brand {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    color: var(--white) !important;
    text-decoration: none;
}
.navbar-brand span { color: var(--nav-dark); }

.navbar .nav-link {
    color: rgba(255,255,255,.9) !important;
    font-weight: 500;
    font-size: .88rem;
    transition: color .2s;
}
.navbar .nav-link:hover { color: var(--white) !important; text-decoration: underline; }

/* Search bar — Daraz style white search */
.navbar .form-control {
    border: none !important;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    background: var(--white) !important;
    font-size: .88rem;
    color: var(--text-dark);
    padding: .5rem 1rem;
    box-shadow: none !important;
    transition: none;
}
.navbar .form-control:focus {
    outline: none !important;
    box-shadow: none !important;
}
.navbar .btn-search {
    background: var(--nav-dark) !important;
    border: none !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    color: white !important;
    font-weight: 600;
    padding: .5rem 1.2rem;
    transition: background .2s;
}
.navbar .btn-search:hover { background: #000 !important; }

/* Cart badge */
#cart-badge {
    background: var(--nav-dark) !important;
    color: var(--white) !important;
    font-weight: 700;
    font-size: .62rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    top: 2px !important;
}

/* Auth buttons in navbar */
.btn-nav-signin {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.6);
    color: white !important;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 500;
    padding: .3rem .9rem;
    transition: all .2s;
}

    .btn-nav-signin:hover {
        background: rgba(255,255,255,.15);
        border-color: white;
    }

.btn-nav-register {
    background: var(--nav-dark);
    border: none;
    color: white !important;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem 1rem;
    transition: all .2s;
}

    .btn-nav-register:hover {
        background: #000;
    }

/* Dropdown */
.navbar .dropdown-menu {
    border: 1px solid var(--gray-mid);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    margin-top: .5rem !important;
}
.navbar .dropdown-item:hover { background: var(--orange-light); color: var(--orange); }

/* ── Category Bar (Daraz style — white with orange hover) ────── */
.category-bar {
    background: var(--white);
    border-bottom: 2px solid var(--orange);
    padding: .4rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
}
.category-bar a {
    color: var(--text-dark) !important;
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    padding: .32rem .75rem;
    border-radius: var(--radius-sm);
    transition: all .2s;
    white-space: nowrap;
}
.category-bar a:hover {
    background: var(--orange);
    color: white !important;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 500;
    border-left: 4px solid;
}
.alert-success { background: #f0faf4; color: #1a7a40; border-color: #2ecc71; }
.alert-danger  { background: #fff5f5; color: #c0392b; border-color: #e74c3c; }
.alert-info    { background: var(--orange-light); color: var(--orange-dark); border-color: var(--orange); }

/* ── Section Title ───────────────────────────────────────────── */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: .85rem;
    margin-bottom: 1rem;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background: var(--orange);
    border-radius: 2px;
}

/* ── Hero Banner ─────────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, var(--nav-dark) 0%, #2d1b4e 40%, var(--orange-dark) 80%, var(--orange) 100%);
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 500px; height: 500px;
    background: rgba(248,86,6,.1);
    border-radius: 50%;
    pointer-events: none;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Product Card ────────────────────────────────────────────── */
.product-card {
    background: var(--white);
    border: 1px solid var(--gray-mid) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    transition: all .25s ease;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow) !important;
    border-color: var(--orange-mid) !important;
}
.product-card .card-body { padding: .75rem; }
.product-card .card-title {
    font-size: .83rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.35;
    height: 2.7rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-card .product-img-wrap {
    height: 185px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--gray-mid);
}
.product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

/* Wishlist button */
.wishlist-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 30px; height: 30px;
    background: rgba(255,255,255,.92);
    border-radius: 50%;
    border: 1px solid var(--gray-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all .2s;
    z-index: 2;
}
.wishlist-btn:hover { background: #fff0e8; color: var(--orange); border-color: var(--orange-mid); }

.product-price { color: var(--orange); font-size: 1rem; font-weight: 700; }
.product-original-price { color: var(--text-light); font-size: .76rem; text-decoration: line-through; }
.product-discount { color: var(--orange); font-size: .72rem; font-weight: 600; }

/* Badges */
.badge-discount {
    background: var(--orange);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: .18rem .42rem;
    border-radius: 3px;
}
.badge-new {
    background: var(--nav-dark);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: .18rem .42rem;
    border-radius: 3px;
}
.badge-outofstock {
    background: #bbb;
    color: #fff;
    font-size: .66rem;
    padding: .18rem .42rem;
    border-radius: 3px;
}

/* Buttons */
.btn-add-cart {
    background: var(--orange) !important;
    color: #fff !important;
    border: none !important;
    font-size: .78rem;
    font-weight: 600;
    padding: .38rem .75rem;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.btn-add-cart:hover { background: var(--orange-dark) !important; }

.btn-view-details {
    background: var(--white) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--gray-mid) !important;
    font-size: .78rem;
    padding: .38rem .7rem;
    border-radius: var(--radius-sm);
    transition: all .2s;
    text-align: center;
}
.btn-view-details:hover {
    border-color: var(--orange) !important;
    color: var(--orange) !important;
}

/* ── Category Cards ──────────────────────────────────────────── */
.category-card {
    background: var(--white);
    border: 1px solid var(--gray-mid) !important;
    border-radius: var(--radius) !important;
    text-decoration: none !important;
    transition: all .22s ease;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow) !important;
    border-color: var(--orange) !important;
}
.category-card .cat-img { height: 95px; object-fit: cover; width: 100%; }
.category-card .cat-name { font-size: .82rem; font-weight: 600; color: var(--text-dark); }

/* ── Promo Banners ───────────────────────────────────────────── */
.promo-banner { border-radius: var(--radius); overflow: hidden; transition: transform .2s; }
.promo-banner:hover { transform: scale(1.01); }

/* ── Filter Drawer ───────────────────────────────────────────── */
.filter-drawer {
    background: var(--white);
    border: 1px solid var(--gray-mid);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.filter-drawer-header {
    background: var(--orange);
    color: white;
    padding: .7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.btn-filter {
    background: var(--orange) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: .82rem;
}
.btn-filter:hover { background: var(--orange-dark) !important; }

/* Form focus */
.form-control:focus, .form-select:focus {
    border-color: var(--orange) !important;
    box-shadow: 0 0 0 3px rgba(248,86,6,.12) !important;
}

/* ── Cart Page ───────────────────────────────────────────────── */
.cart-table th {
    background: var(--orange-light);
    font-weight: 600;
    font-size: .84rem;
    color: var(--text-dark);
    border: none;
}
.cart-summary-card {
    background: var(--white);
    border: 1px solid var(--gray-mid) !important;
    border-radius: var(--radius) !important;
}
.cart-summary-card .card-header {
    background: var(--orange) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.btn-checkout {
    background: var(--orange) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700;
    font-size: 1rem;
    padding: .75rem;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.btn-checkout:hover { background: var(--orange-dark) !important; }

/* ── Checkout ────────────────────────────────────────────────── */
.checkout-card .card-header {
    background: var(--orange) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ── Auth Forms ──────────────────────────────────────────────── */
.auth-card {
    border: 1px solid var(--gray-mid) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.1) !important;
}
.auth-card .card-header {
    background: var(--orange) !important;
    color: #fff !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 1.4rem;
}
.btn-auth {
    background: var(--orange) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700;
    padding: .7rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: background .2s;
}
.btn-auth:hover { background: var(--orange-dark) !important; }
.auth-link { color: var(--orange); font-weight: 600; text-decoration: none; }
.auth-link:hover { color: var(--orange-dark); text-decoration: underline; }

/* ── Trust Badges ────────────────────────────────────────────── */
.trust-badge {
    background: var(--white);
    border: 1px solid var(--gray-mid);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    font-size: .8rem;
    color: var(--text-mid);
    font-weight: 500;
    transition: all .2s;
}
.trust-badge:hover { box-shadow: var(--card-shadow); transform: translateY(-2px); }
.trust-badge i { color: var(--orange); }

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-sidebar {
    background: var(--nav-dark) !important;
    width: 235px;
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    box-shadow: 2px 0 15px rgba(0,0,0,.3);
}
.admin-sidebar .brand {
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: var(--orange);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.65) !important;
    padding: .6rem 1.4rem;
    font-size: .86rem;
    transition: all .18s;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--white) !important;
    background: rgba(248,86,6,.18);
    border-left-color: var(--orange);
}
.admin-sidebar .nav-link i { width: 20px; }

.admin-main { margin-left: 235px; }
.admin-topbar {
    background: var(--white);
    border-bottom: 2px solid var(--orange);
    padding: .8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.admin-content { padding: 1.5rem; background: var(--gray-light); min-height: calc(100vh - 60px); }

/* Admin stat cards */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-mid);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: all .22s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--hover-shadow); }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
    background: var(--nav-dark) !important;
}
.footer-link {
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .2s;
    font-size: .86rem;
}
.footer-link:hover { color: var(--orange); }
.social-btn {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2) !important;
    color: rgba(255,255,255,.55) !important;
    transition: all .2s;
}
.social-btn:hover {
    background: var(--orange) !important;
    border-color: var(--orange) !important;
    color: white !important;
}

/* ── Pagination ──────────────────────────────────────────────── */
.page-link {
    color: var(--orange);
    border-color: var(--gray-mid);
    font-size: .84rem;
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
}
.page-item.active .page-link {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}
.page-link:hover { color: var(--orange-dark); background: var(--orange-light); }

/* ── Product Detail Page ─────────────────────────────────────── */
.product-detail-img {
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-mid);
    box-shadow: var(--card-shadow);
}
.btn-add-cart-lg {
    background: var(--orange) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700;
    font-size: 1rem;
    padding: .8rem 2.2rem;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.btn-add-cart-lg:hover {
    background: var(--orange-dark) !important;
    box-shadow: 0 4px 16px rgba(248,86,6,.35);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0 !important; }
    .navbar { padding: .5rem 0; }
}
@media (max-width: 768px) {
    .hero-banner { padding: 2rem 0 !important; }
    .hero-banner h1 { font-size: 1.7rem !important; }
    .product-card .product-img-wrap { height: 150px; }
}
@media (max-width: 576px) {
    .navbar-brand { font-size: 1.2rem !important; }
}
