/* C:\Project\Barakah_Finance\pages\style\shop.css */

:root {
    --gold: #C9A227;
    --gold-light: #F5D061;
    --dark-green: #064E3B;
    --mid-green: #065F46;
    --light-green: #D1FAE5;
    --cream: #FDFAF3;
    --text-dark: #1A2A1A;
    --text-muted: #4A5A4A;
}

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

body {
    font-family: 'Noto Sans Bengali', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
}

/* ── NAV ── */
.top-nav {
    background: rgba(6, 78, 59, 0.97);
    backdrop-filter: blur(12px);
    padding: 0 5%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--gold);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-brand .logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9A227, #A67C00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: 'Noto Serif Bengali', serif;
}

.nav-brand span {
    color: #F5D061;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 18px;
    font-weight: 700;
}

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

.nav-actions a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    padding: 7px 16px;
    border-radius: 50px;
    transition: all 0.2s;
}

.nav-actions a:hover {
    color: #F5D061;
    background: rgba(255, 255, 255, 0.08);
}

.nav-actions .btn-cart {
    background: var(--gold);
    color: #0A2A1A !important;
    font-weight: 700;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e53e3e;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ── HERO BANNER ── */
.shop-hero {
    background: linear-gradient(135deg, #064E3B 0%, #065F46 60%, #047857 100%);
    padding: 60px 5% 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C9A227' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}

.shop-hero h1 {
    font-family: 'Noto Serif Bengali', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #fff;
    margin-bottom: 12px;
    position: relative;
}

.shop-hero h1 em {
    font-style: normal;
    color: #F5D061;
}

.shop-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    max-width: 560px;
    margin: 0 auto 28px;
    position: relative;
}

.hero-chips {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.hero-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    color: #F5D061;
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

/* ── FILTER BAR ── */
.filter-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 5%;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: 70px;
    z-index: 90;
}

.filter-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.fcat {
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid #d1fae5;
    background: #fff;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.fcat.active,
.fcat:hover {
    background: var(--dark-green);
    color: #fff;
    border-color: var(--dark-green);
}

.search-box {
    margin-left: auto;
    padding: 7px 14px;
    border: 1.5px solid #d1fae5;
    border-radius: 50px;
    font-size: 13px;
    outline: none;
    font-family: 'Noto Sans Bengali', sans-serif;
    width: 220px;
}

.search-box:focus {
    border-color: var(--gold);
}

/* ── MAIN GRID ── */
.shop-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 5%;
}

.sort-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sort-row span {
    font-size: 13px;
    color: var(--text-muted);
}

.sort-sel {
    padding: 6px 12px;
    border: 1.5px solid #d1fae5;
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    font-family: 'Noto Sans Bengali', sans-serif;
}

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

/* ── PRODUCT CARD ── */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.07);
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.product-img-wrap {
    height: 200px;
    background: #f0fdf4;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img-placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.in-stock {
    background: #d1fae5;
    color: #065F46;
}

.out-stock {
    background: #fee2e2;
    color: #991b1b;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gold);
    color: #0A2A1A;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.product-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 11px;
    color: var(--mid-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-name {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-block {
    background: #f0fdf4;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.price-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-green);
    font-family: 'Noto Serif Bengali', serif;
}

.price-emi {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.price-emi span {
    color: var(--gold);
    font-weight: 700;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-detail {
    flex: 1;
    padding: 9px;
    border: 1.5px solid var(--dark-green);
    color: var(--dark-green);
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Noto Sans Bengali', sans-serif;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: var(--dark-green);
    color: #fff;
}

.btn-order {
    flex: 1.5;
    padding: 9px;
    border: none;
    background: linear-gradient(135deg, var(--dark-green), var(--mid-green));
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Sans Bengali', sans-serif;
    transition: all 0.2s;
}

.btn-order:hover {
    background: linear-gradient(135deg, #047857, #059669);
}

.btn-order:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── NO PRODUCTS ── */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-products .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ── MODAL BASE ── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.overlay.open .modal-box {
    transform: scale(1);
}

/* ── PRODUCT DETAIL MODAL ── */
.detail-head {
    display: flex;
    gap: 24px;
    padding: 24px;
    flex-wrap: wrap;
}

.detail-imgs {
    flex: 0 0 300px;
}

.main-img {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    overflow: hidden;
}

.main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 2px solid #d1fae5;
    cursor: pointer;
    overflow: hidden;
    background: #f0fdf4;
    object-fit: cover;
}

.thumb.active {
    border-color: var(--gold);
}

.detail-info {
    flex: 1;
    min-width: 220px;
}

.detail-cat {
    font-size: 11px;
    color: var(--mid-green);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-name {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.detail-price-box {
    background: #f0fdf4;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-green);
    font-family: 'Noto Serif Bengali', serif;
}

.emi-breakdown {
    margin-top: 8px;
}

.emi-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px solid #e5e7eb;
}

.emi-row:last-child {
    border: none;
    font-weight: 700;
    color: var(--dark-green);
}

.detail-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.detail-actions {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-actions .btn-order {
    flex: 2;
    padding: 14px;
    font-size: 15px;
}

.detail-actions .btn-detail {
    flex: 1;
    padding: 14px;
    font-size: 14px;
}

/* ── ORDER MODAL ── */
.order-head {
    background: linear-gradient(135deg, var(--dark-green), var(--mid-green));
    padding: 20px 24px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-head h3 {
    color: #fff;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 1.1rem;
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.order-body {
    padding: 24px;
}

.of {
    margin-bottom: 14px;
}

.of label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--mid-green);
    margin-bottom: 4px;
}

.oi {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1fae5;
    border-radius: 8px;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 13px;
    outline: none;
    background: #f0fdf4;
    transition: border 0.2s;
}

.oi:focus {
    border-color: var(--gold);
    background: #fff;
}

.o2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.order-summary {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 13px;
}

.order-summary .srow {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #d1fae5;
}

.order-summary .srow:last-child {
    border: none;
    font-weight: 700;
    color: var(--dark-green);
    font-size: 14px;
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--dark-green), var(--mid-green));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Serif Bengali', sans-serif;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #047857, #059669);
}

/* ── CART SIDEBAR ── */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
    transition: right 0.35s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    background: linear-gradient(135deg, var(--dark-green), var(--mid-green));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #fff;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 1.1rem;
    margin: 0;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f0fdf4;
    align-items: center;
}

.cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f0fdf4;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 12px;
    color: var(--mid-green);
    font-weight: 700;
    margin-top: 3px;
}

.cart-item-remove {
    color: #e53e3e;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.cart-footer {
    padding: 16px;
    border-top: 2px solid #f0fdf4;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.checkout-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--gold), #A67C00);
    color: #0A2A1A;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Serif Bengali', serif;
    transition: all 0.2s;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #D9B237, #B88D00);
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-cart .icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 12px;
}

/* ── ALERT ── */
.aalert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.aalert-ok {
    background: #d1fae5;
    color: #065F46;
    border: 1px solid #a7f3d0;
}

.aalert-err {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.hidden {
    display: none !important;
}

/* ── STATUS TRACKER ── */
.status-track {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 5%;
    max-width: 1280px;
}

.status-track h4 {
    font-family: 'Noto Serif Bengali', serif;
    color: var(--dark-green);
    margin-bottom: 12px;
    font-size: 14px;
}

.track-steps {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.track-step {
    flex: 1;
    text-align: center;
    min-width: 100px;
    position: relative;
}

.track-step::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #d1fae5;
    z-index: 0;
}

.track-step:last-child::before {
    display: none;
}

.ts-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin: 0 auto 6px;
    background: #d1fae5;
    border: 2px solid #d1fae5;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.ts-dot.done {
    background: var(--dark-green);
    border-color: var(--dark-green);
    color: #fff;
}

.ts-dot.current {
    background: var(--gold);
    border-color: var(--gold);
    color: #0A2A1A;
}

.ts-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── TOAST ── */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #065F46;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 99999;
    font-family: 'Noto Serif Bengali', serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    max-width: 320px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── FOOTER ── */
.shop-footer {
    background: var(--dark-green);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 20px;
    font-size: 13px;
    margin-top: 40px;
}

.shop-footer a {
    color: var(--gold);
    text-decoration: none;
}

@media(max-width:700px) {
    .detail-head {
        flex-direction: column;
    }

    .detail-imgs {
        flex: none;
        width: 100%;
    }

    .o2col {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}