/* ============================================================
   BargainBottles — Custom CSS (Tailwind companion)
   Bootstrap removed. Only non-Tailwind utilities here.
   ============================================================ */

/* ── Variables ─────────────────────────── */
:root {
    --primary:      #fac805;
    --primary-dark: #d4a90a;
    --brand:        #181818;
    --brand-light:  #2a2a2a;
    --success:      #16a34a;
    --danger:       #dc2626;
    --radius:       1rem;
}

/* ── Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}
body {
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}
img  { max-width: 100%; height: auto; }

/* ── Scroll to Top ─────────────────────── */
#scrollTop.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* ── Toast Notifications ───────────────── */
.bb-toast {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-radius: 1rem;
    font-size: .875rem;
    font-weight: 600;
    min-width: 240px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    pointer-events: auto;
    animation: toastIn .35s cubic-bezier(.34,1.56,.64,1) forwards;
    transition: opacity .3s, transform .3s;
}
.bb-toast.hide { opacity: 0; transform: translateX(50px); }
.bb-toast.success { background: #181818; color: #fff; border-left: 4px solid #fac805; }
.bb-toast.error   { background: #181818; color: #fff; border-left: 4px solid #dc2626; }
.bb-toast.info    { background: #181818; color: #fff; border-left: 4px solid #3b82f6; }
.bb-toast-icon { font-size: 1.1rem; flex-shrink: 0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px) scale(.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Hero Slider ───────────────────────── */
.hero-slider { position: relative; overflow: hidden; }
.slider-track {
    display: flex;
    transition: transform 1.2s cubic-bezier(0.77,0,0.175,1);
    will-change: transform;
}
.slider-slide { min-width: 100%; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.hero-slider .slider-slide img { object-fit: contain; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
    z-index: 20;
    font-size: 1.25rem;
}
.slider-prev:hover,
.slider-next:hover { background: rgba(250,200,5,.85); color: #181818; }
.slider-prev { left: 1.25rem; }
.slider-next { right: 1.25rem; }
.slider-dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.35);
    cursor: pointer;
    border: none;
    transition: background .3s, width .3s;
}
.slider-dot.active { background: #fac805; width: 24px; }

/* ── Hero Swiper (fullscreen) ───────────── */
.hero-fullscreen { width: 100%; height: 100vh; min-height: 400px; }
.hero-swiper-wrap { position: relative; overflow: hidden; }
.heroSwiper { width: 100%; height: 100%; }
.heroSwiper .swiper-slide { height: 100%; }
.heroSwiper .swiper-slide-inner,
.hero-fullscreen-inner { position: relative; width: 100%; height: 100%; }
.heroSwiper .swiper-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Mobile: height auto, width 100% */
@media (max-width: 1023px) {
    .hero-fullscreen {
        height: auto;
        min-height: 0;
    }
    .heroSwiper,
    .heroSwiper .swiper-wrapper,
    .heroSwiper .swiper-slide,
    .heroSwiper .swiper-slide-inner { height: auto !important; }
    .heroSwiper .swiper-slide img {
        position: relative;
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }
}
.heroSwiper .swiper-button-prev,
.heroSwiper .swiper-button-next { color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); width: 48px; height: 48px; border-radius: 50%; }
.heroSwiper .swiper-button-prev:after,
.heroSwiper .swiper-button-next:after { font-size: 1.25rem; font-weight: bold; }
.heroSwiper .swiper-button-prev:hover,
.heroSwiper .swiper-button-next:hover { background: rgba(250,200,5,.85); color: #181818; }
.heroSwiper .swiper-pagination-bullet { background: rgba(255,255,255,.35); opacity: 1; }
.heroSwiper .swiper-pagination-bullet-active { background: #fac805; }

/* ── Product Card ──────────────────────── */
.product-card {
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.06);
    transition: box-shadow .3s, transform .3s;
}
.product-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.product-card-img {
    position: relative;
    background: #f8f8f8;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex; align-items: center; justify-content: center;
}
.product-card-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: .75rem;
    transition: transform .5s cubic-bezier(.34,1.2,.64,1);
}
.product-card:hover .product-card-img img { transform: scale(1.07); }

/* ── Image Skeleton / Loader ───────────── */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
.img-skeleton {
    position: absolute;
    inset: 0;
    border-radius: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
/* Show skeleton only while parent has .img-loading class */
.img-loading .img-skeleton {
    opacity: 1;
}
/* Hide the real image while skeleton is showing */
.img-loading img.lazy-img {
    opacity: 0;
    transition: opacity .35s ease;
}
/* Fade in once loaded (onload removes .img-loading) */
.img-loading-wrap:not(.img-loading) img.lazy-img {
    opacity: 1;
    transition: opacity .35s ease;
}
.product-badge-wrap { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .25rem; z-index: 5; }
.badge-deal { background: #ef4444; color: #fff; font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: .5rem; letter-spacing: .02em; }
.badge-new  { background: var(--primary); color: var(--brand); font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: .5rem; }
.badge-flash { background: var(--primary); color: var(--brand); font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: .5rem; }
.product-wishlist-btn {
    position: absolute; top: .6rem; right: .6rem; z-index: 5;
    background: rgba(255,255,255,.85);
    border: none; border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s, opacity .2s;
    opacity: 0; font-size: .85rem; color: #555;
}
.product-card:hover .product-wishlist-btn { opacity: 1; }
.product-wishlist-btn:hover { background: #fff; transform: scale(1.1); color: #ef4444; }
.product-wishlist-btn.active { opacity: 1; color: #ef4444; }

.btn-add-cart {
    width: 100%;
    background: var(--primary);
    color: var(--brand);
    font-size: .8rem; font-weight: 800;
    padding: .65rem 1rem;
    border-radius: .85rem;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: background .2s, transform .15s;
    letter-spacing: .01em;
}
.btn-add-cart:hover  { background: var(--primary-dark); }
.btn-add-cart:active { transform: scale(.97); }
.btn-add-cart:disabled { opacity: .65; cursor: not-allowed; }

/* ── Category Image Cards ──────────────── */
.cat-img-card {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: box-shadow .3s, transform .3s;
}
.cat-img-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
    transform: translateY(-5px);
}
.cat-no-img {
    background: linear-gradient(135deg,#181818,#2a2a2a) !important;
}

/* ── Section Helpers ───────────────────── */
.section-label {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(250,200,5,.12); color: var(--primary-dark);
    font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    padding: .3rem .8rem; border-radius: 999px;
}

/* ── Breadcrumb ────────────────────────── */
.bb-breadcrumb { background: #fff; border-bottom: 1px solid #f0f0f0; }
.bb-breadcrumb a { color: #9ca3af; font-size: .8rem; text-decoration: none; transition: color .2s; }
.bb-breadcrumb a:hover { color: var(--primary-dark); }
.bb-breadcrumb span { color: #374151; font-size: .8rem; font-weight: 600; }

/* ── Deal Timer ────────────────────────── */
.deal-timer { display: flex; gap: .75rem; }
.timer-unit { text-align: center; }
.timer-num {
    display: block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-weight: 900; font-size: 1.75rem; line-height: 1;
    width: 60px; height: 60px;
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    font-variant-numeric: tabular-nums;
}
.timer-label { color: rgba(255,255,255,.5); font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: .35rem; }
.deal-timer--large { gap: 1rem; }
.deal-timer--large .timer-num { width: 72px; height: 72px; font-size: 2rem; border-radius: 1rem; }
.deal-timer--large .timer-label { font-size: .65rem; margin-top: .5rem; }

/* ── Auth Pages ────────────────────────── */
.auth-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #181818 0%, #2a2a2a 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%; max-width: 440px;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
.auth-card-site {
    box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.auth-card-site:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.06);
}

/* ── Form Controls ─────────────────────── */
.bb-input {
    width: 100%;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-radius: .75rem;
    padding: .7rem 1rem;
    font-size: .875rem;
    color: #111;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.bb-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(250,200,5,.15); }
.bb-label { display: block; font-size: .8rem; font-weight: 700; color: #374151; margin-bottom: .4rem; }
.bb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem; border-radius: .85rem; font-weight: 800; font-size: .875rem;
    cursor: pointer; border: none; transition: background .2s, transform .15s;
    text-decoration: none; white-space: nowrap;
}
.bb-btn:active { transform: scale(.97); }
.bb-btn-primary  { background: var(--primary);  color: var(--brand); }
.bb-btn-primary:hover { background: var(--primary-dark); }
.bb-btn-dark     { background: var(--brand); color: #fff; }
.bb-btn-dark:hover { background: var(--brand-light); }
.bb-btn-outline  { background: transparent; border: 2px solid var(--brand); color: var(--brand); }
.bb-btn-outline:hover { background: var(--brand); color: #fff; }
.bb-btn-sm { padding: .45rem 1rem; font-size: .78rem; border-radius: .6rem; }

/* ── Qty Control ───────────────────────── */
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.qty-btn-ctrl { background: none; border: none; cursor: pointer; padding: .5rem .8rem; font-size: 1.1rem; color: #555; transition: background .15s, color .15s; }
.qty-btn-ctrl:hover { background: var(--primary); color: var(--brand); }
.qty-input-ctrl { width: 48px; text-align: center; border: none; outline: none; font-weight: 700; font-size: .95rem; color: #111; background: transparent; }

/* ── Checkout Delivery Option ──────────── */
.delivery-opt {
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.delivery-opt.active { border-color: var(--primary); background: rgba(250,200,5,.06); }

/* ── Progress Bar ──────────────────────── */
.bb-progress { background: #e5e7eb; border-radius: 999px; overflow: hidden; height: 8px; }
.bb-progress-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width .6s ease; }

/* ── Cart Table ────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #f0f0f0; }
.cart-table td { padding: .85rem 1rem; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }

/* ── Scrollbar (Webkit) ────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Animations ────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeUp { animation: fadeUp .55s ease both; }
.anim-delay-1 { animation-delay: .1s; }
.anim-delay-2 { animation-delay: .2s; }
.anim-delay-3 { animation-delay: .3s; }

/* ── Line Clamp ────────────────────────── */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Responsive tweaks ─────────────────── */
@media (max-width: 640px) {
    .slider-prev { left: .5rem; }
    .slider-next { right: .5rem; }
    .slider-prev, .slider-next { width: 38px; height: 38px; font-size: 1rem; }
    .deal-timer { gap: .5rem; }
    .timer-num { width: 50px; height: 50px; font-size: 1.4rem; }
}
