:root {
    --primary: #d84315;
    --primary-dark: #a52f0d;
    --gold: #f2a900;
    --navy: #1a2b4c;
    --bg: #fff8f2;
    --card-bg: #ffffff;
    --text: #2b2420;
    --text-muted: #7a6f66;
    --border: #f0e2d6;
    --success: #1f9d55;
    --danger: #d64545;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 0;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------------- Marquee ---------------- */
.marquee-bar {
    background: var(--gold);
    color: #3a2a00;
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
    font-weight: 700;
    font-size: 13px;
}

.marquee-track {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 18s linear infinite;
}

.marquee-track span { margin: 0 18px; }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ---------------- Header ---------------- */
.site-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 24px;
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-logo {
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    letter-spacing: 0.02em;
}

.site-logo span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #d7dcea;
}

.site-nav {
    display: flex;
    gap: 18px;
    margin-left: auto;
    font-size: 14px;
}

.site-nav a { color: #d7dcea; }
.site-nav a:hover { color: #fff; }

.cart-icon-link {
    position: relative;
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ---------------- Layout ---------------- */
.site-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.hero {
    text-align: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.hero p {
    margin: 0;
    color: #ffe3d5;
    font-size: 14px;
}

.section { margin-bottom: 36px; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-header h2 {
    margin: 0;
    font-size: 19px;
    color: var(--navy);
}

.view-all-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

.empty-msg {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------------- Category grid ---------------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    transition: transform 0.15s ease;
}

.category-card:hover { transform: translateY(-2px); }

.category-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.category-card .no-image {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0ea;
    color: var(--text-muted);
    font-size: 11px;
}

.category-card span {
    display: block;
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* ---------------- Category filter tabs (shop page) ---------------- */
.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.category-filter a {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.category-filter a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------------- Product grid / card ---------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.product-img .no-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0ea;
    color: var(--text-muted);
    font-size: 11px;
}

.product-info {
    padding: 10px 10px 6px;
    flex-grow: 1;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.product-cart-controls {
    padding: 0 10px 10px;
}

.btn-add {
    width: 100%;
    padding: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.btn-add:hover { background: var(--primary-dark); }

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary);
}

.qty-value {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.btn-confirm-add {
    flex-basis: 100%;
    margin-top: 4px;
    padding: 7px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: #eee2d6; color: var(--text); }
.btn-secondary:hover { background: #e4d5c4; }

.btn-block { width: 100%; }

/* ---------------- Cart page ---------------- */
.empty-cart {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.cart-list { display: flex; flex-direction: column; gap: 10px; }

.cart-row {
    display: grid;
    grid-template-columns: 56px 1fr auto auto auto;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.cart-row-img img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-row-name { font-weight: 600; font-size: 14px; }
.cart-row-price { font-size: 12px; color: var(--text-muted); }

.cart-row-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-row-total {
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}

.cart-row-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--danger);
    cursor: pointer;
}

.cart-summary {
    margin-top: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 10px;
}

.cart-min-note {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.cart-min-note.not-met { background: #fff4e0; color: #b8720b; }
.cart-min-note.met { background: #e5f7ea; color: var(--success); }

/* ---------------- Checkout ---------------- */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.checkout-form-card, .order-summary-card, .table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.checkout-form-card h3, .order-summary-card h3, .table-card h3 {
    margin-top: 0;
    font-size: 15px;
    color: var(--navy);
}

.checkout-form-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 14px 0 6px;
}

.checkout-form-card label:first-of-type { margin-top: 0; }

.checkout-form-card input,
.checkout-form-card textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.checkout-form-card textarea { resize: vertical; }

.payment-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}

.qr-code-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
}

.bank-details { font-size: 13px; }

.payment-instructions {
    font-size: 13px;
    color: var(--text-muted);
    background: #fff4e0;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.summary-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    border-bottom: none;
    padding-top: 10px;
}

/* ---------------- Order success ---------------- */
.order-success {
    text-align: center;
    padding: 30px 16px;
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.order-id-line { font-size: 16px; }

.success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* ---------------- Track order ---------------- */
.track-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 420px;
}

.track-form input {
    flex-grow: 1;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.track-result { display: flex; flex-direction: column; gap: 14px; }

.track-status-row {
    display: flex;
    gap: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.track-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ---------------- Shared table / badge styles ---------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th, .data-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-active { background: #e5f7ea; color: var(--success); }
.badge-inactive { background: #f1f2f4; color: var(--text-muted); }

.badge-status-pending { background: #fff4e0; color: #b8720b; }
.badge-status-confirmed { background: #e5f7ea; color: var(--success); }
.badge-status-processing { background: #e6eefc; color: #2563c9; }
.badge-status-shipped { background: #eee5fc; color: #7a3fc9; }
.badge-status-delivered { background: #e5f7ea; color: var(--success); }
.badge-status-cancelled { background: #fdeaea; color: var(--danger); }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-error { background: #fdeaea; color: var(--danger); }
.alert-success { background: #e5f7ea; color: var(--success); }

/* ---------------- WhatsApp float button ---------------- */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 60;
}

/* ---------------- Bottom nav (mobile only) ---------------- */
.bottom-nav {
    display: none;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
    .site-nav { display: none; }

    .checkout-grid { grid-template-columns: 1fr; }

    .cart-row {
        grid-template-columns: 48px 1fr;
        row-gap: 8px;
    }

    .cart-row-qty, .cart-row-total, .cart-row-remove {
        grid-column: 2;
    }

    body { padding-bottom: 66px; }

    .whatsapp-float { bottom: 78px; }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--border);
        z-index: 55;
    }

    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 0 6px;
        font-size: 10px;
        color: var(--text-muted);
        position: relative;
    }

    .bn-icon { font-size: 19px; }

    .bottom-nav-badge {
        position: absolute;
        top: 2px;
        right: 22%;
        background: var(--primary);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        min-width: 15px;
        height: 15px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
    }
}
