/* =========================================================
   MPRA Store - Storefront styles
   Modern, clean, fully responsive (mobile-first).
   ========================================================= */
:root {
    --brand-1: #5b3df5;
    --brand-2: #8b5cf6;
    --brand-grad: linear-gradient(135deg, #5b3df5 0%, #8b5cf6 100%);
    --ink: #1e2235;
    --muted: #6b7280;
    --line: #ececf3;
    --soft: #f6f7fb;
    --soft-bg: #f6f7fb;
    --radius: 16px;
    --shadow-sm: 0 2px 10px rgba(20, 20, 60, .06);
    --shadow: 0 10px 30px rgba(20, 20, 60, .08);
    --shadow-lg: 0 18px 48px rgba(91, 61, 245, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
img { max-width: 100%; }

.brand-gradient {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--brand-grad); border: none; box-shadow: 0 6px 16px rgba(91, 61, 245, .25); }
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(91, 61, 245, .35); }
.btn-outline-primary { color: var(--brand-1); border-color: #d9d2ff; }
.btn-outline-primary:hover { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }
.btn-light { background: #fff; border: 1px solid var(--line); }
.text-primary { color: var(--brand-1) !important; }
.bg-primary { background: var(--brand-1) !important; }

/* ---------- Header / Navbar ---------- */
.site-header {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    z-index: 1030;
}
.navbar { padding-top: .65rem; padding-bottom: .65rem; }
.navbar-brand { font-weight: 800; font-size: 1.35rem; color: var(--ink); }
.navbar .nav-link { font-weight: 500; color: #444a5e; padding: .5rem .9rem; border-radius: 8px; }
.navbar .nav-link:hover { color: var(--brand-1); background: var(--soft); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--brand-grad);
    color: #fff;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 240px at 85% 10%, rgba(255, 255, 255, .18), transparent 60%),
        radial-gradient(500px 220px at 0% 90%, rgba(255, 255, 255, .12), transparent 60%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff; font-size: .82rem; font-weight: 600;
    padding: .35rem .85rem; border-radius: 50px; margin-bottom: 1rem;
}
.hero-title { font-weight: 800; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.12; margin-bottom: 1rem; }
.hero-subtitle { font-size: clamp(.98rem, 2vw, 1.15rem); opacity: .92; margin-bottom: 1.5rem; max-width: 540px; }
.hero .btn-light { color: var(--brand-1); }
.hero-search .input-group { box-shadow: 0 14px 40px rgba(0, 0, 0, .18); border-radius: 12px; overflow: hidden; max-width: 540px; }
.hero-search .form-control, .hero-search .input-group-text { border: none; padding-top: .8rem; padding-bottom: .8rem; }
.hero-search .form-control:focus { box-shadow: none; }

/* Floating glass cards in hero */
.hero-visual { position: relative; height: 320px; }
.hero-card {
    position: absolute;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    color: #fff;
    display: flex; flex-direction: column; gap: .35rem; align-items: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    animation: floaty 5s ease-in-out infinite;
}
.hero-card i { font-size: 1.8rem; }
.hero-card span { font-size: .85rem; font-weight: 600; }
.hero-card-1 { top: 10%; left: 8%; }
.hero-card-2 { top: 4%; right: 12%; animation-delay: .6s; }
.hero-card-3 { bottom: 14%; left: 20%; animation-delay: 1.2s; }
.hero-card-4 { bottom: 6%; right: 8%; animation-delay: 1.8s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Sections ---------- */
.bg-soft { background: var(--soft); }
.section { padding: 3.5rem 0; }
.section-soft { background: var(--soft-bg); }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem;
}
.section-head h2 { font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.85rem); margin: 0; }
.see-all { color: var(--brand-1); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }

/* ---------- Trust badges ---------- */
.trust-section { padding: 2rem 0; }
.trust-badge {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem .75rem; height: 100%;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.trust-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.trust-badge i { font-size: 1.6rem; color: var(--brand-1); }
.trust-badge span { font-weight: 600; font-size: .9rem; }

/* ---------- Category cards ---------- */
.category-card {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem 1rem; text-align: center; color: var(--ink);
    box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; height: 100%;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #e3dcff; color: var(--brand-1); }
.category-card i {
    font-size: 1.7rem; color: var(--brand-1);
    width: 56px; height: 56px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(91, 61, 245, .1), rgba(139, 92, 246, .12));
    border-radius: 14px; margin-bottom: .35rem;
}
.category-card .cat-name { font-weight: 700; font-size: .95rem; color: var(--ink); }
.category-card .cat-count { font-size: .78rem; color: var(--muted); }

/* ---------- Product card ---------- */
.product-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #e3dcff; }

.product-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--soft);
    display: block;
}
.product-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    border: none;
    transition: transform .35s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.05); }
.product-thumb .badge {
    position: absolute; font-size: .7rem; font-weight: 700;
    padding: .35em .6em; border-radius: 50px;
}
.badge-discount { top: .6rem; left: .6rem; background: #ef4444 !important; color: #fff; }
.badge-stock { top: .6rem; right: .6rem; }

.product-card .card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.product-category {
    display: inline-block; font-size: .72rem; font-weight: 600;
    color: var(--brand-1); background: rgba(91, 61, 245, .08);
    padding: .15rem .55rem; border-radius: 50px; margin-bottom: .45rem;
    align-self: flex-start;
}
.product-title { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0 0 .35rem; }
.product-title a {
    color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.6em;
}
.product-title a:hover { color: var(--brand-1); }
.product-desc {
    font-size: .83rem; color: var(--muted); margin-bottom: .5rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.4em;
}
.product-rating { display: flex; align-items: center; gap: .3rem; font-size: .8rem; }
.product-rating .text-muted { font-size: .72rem; }

.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.price-now { font-size: 1.15rem; font-weight: 800; color: var(--brand-1); }
.price-old { font-size: .85rem; color: var(--muted); text-decoration: line-through; }
.product-card .btn-primary { box-shadow: none; }
.product-card .btn-sm { font-size: .82rem; }

/* ---------- Testimonials ---------- */
.testi-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; height: 100%; box-shadow: var(--shadow-sm);
}
.testi-card p { color: #404659; font-size: .95rem; }
.testi-card .stars { color: #f59e0b; }
.testi-author strong { font-weight: 700; }

/* ---------- Accordion / FAQ ---------- */
.accordion-item { border: 1px solid var(--line); border-radius: 12px !important; margin-bottom: .65rem; overflow: hidden; }
.accordion-button { font-weight: 600; border-radius: 0 !important; }
.accordion-button:not(.collapsed) { background: rgba(91, 61, 245, .07); color: var(--brand-1); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: var(--line); }

/* ---------- Page header (listing) ---------- */
.page-header { background: var(--soft); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.page-header h1 { font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: .25rem; }

/* ---------- Filter bar ---------- */
.filter-bar {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.filter-bar .form-label { font-weight: 600; color: #555c70; margin-bottom: .25rem; }
.form-control, .form-select { border-radius: 10px; border-color: #e2e2ec; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-1); box-shadow: 0 0 0 .2rem rgba(91, 61, 245, .12); }

.empty-state i { opacity: .5; }

/* ---------- Cart ---------- */
.cart-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item > img {
    width: 64px; height: 64px; border-radius: 12px;
    object-fit: cover; background: var(--soft); flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info a { color: var(--ink); display: block; }
.cart-item-info a:hover { color: var(--brand-1); }
.cart-item-qty { width: 80px; flex-shrink: 0; }
.cart-item-qty input { text-align: center; }
.cart-item-total { width: 110px; text-align: right; flex-shrink: 0; }
.cart-item-remove { flex-shrink: 0; font-size: 1.1rem; padding: .25rem .4rem; }
.summary-card { position: sticky; top: 90px; }

@media (max-width: 575.98px) {
    .cart-item { flex-wrap: wrap; gap: .65rem; position: relative; }
    .cart-item > img { width: 52px; height: 52px; }
    .cart-item-info { flex: 1 1 60%; }
    .cart-item-total { width: auto; flex: 1 1 100%; text-align: left; order: 5; }
    .cart-item-remove { position: absolute; top: .5rem; right: .25rem; }
}

/* Pagination */
.pagination .page-link { color: var(--brand-1); border-radius: 10px !important; margin: 0 .15rem; border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--brand-grad); border-color: transparent; }

/* ---------- Footer ---------- */
.site-footer { background: #14172a; color: #aab0c4; padding: 3rem 0 1.5rem; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: #aab0c4; }
.site-footer a:hover { color: #fff; }
.site-footer .text-muted { color: #8a90a6 !important; }
.site-footer hr { border-color: rgba(255, 255, 255, .1); }
.site-footer .social {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.05rem;
    transition: background .2s, transform .2s;
}
.site-footer .social:hover { background: var(--brand-grad); transform: translateY(-2px); }

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
    position: fixed; right: 18px; bottom: 18px;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff;
    display: grid; place-items: center; font-size: 1.6rem;
    box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
    z-index: 1040; transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ---------- Cart / forms ---------- */
.qty-control { display: inline-flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.qty-control button { border: none; background: #f3f4f6; width: 34px; height: 34px; font-weight: 700; }
.qty-control input { width: 48px; text-align: center; border: none; }

.card { border: 1px solid var(--line); border-radius: var(--radius); }
.page-content img { height: auto; border-radius: 12px; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse { padding-top: .75rem; }
    .navbar .navbar-nav { gap: .15rem; }
    .navbar-collapse .btn-outline-primary { margin-top: .5rem; width: fit-content; }
}
@media (max-width: 575.98px) {
    .product-card .card-body { padding: .75rem .8rem .85rem; }
    .product-title { font-size: .92rem; }
    .price-now { font-size: 1.02rem; }
    .product-desc { display: none; }
    .product-card .btn-primary { font-size: .82rem; padding: .5rem; }
    .section-head h2 { font-size: 1.25rem; }
    .trust-badge { padding: .85rem .5rem; }
    .trust-badge i { font-size: 1.35rem; }
    .category-card { padding: 1.1rem .65rem; }
    .category-card i { width: 48px; height: 48px; font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card { animation: none; }
    * { transition: none !important; }
}
