/* ════════════════════════════════════════════════════════════
   JioMart — Custom Stylesheet
   Stack : Tailwind CSS (CDN) + this file
   Author: JioMart Demo
   ════════════════════════════════════════════════════════════ */

/* ── 0. CSS Custom Properties ────────────────────────────── */
:root {
    --clr-primary: #E21F26;
    --clr-primary-dk: #B91C1C;
    --clr-secondary: #003087;
    --clr-accent: #F7941D;
    --clr-bg: #F5F5F5;
    --clr-white: #FFFFFF;
    --clr-text: #1a1a1a;
    --clr-muted: #6b7280;
    --clr-border: #e5e7eb;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, .14);
    --shadow-popup: 0 25px 60px rgba(0, 0, 0, .25);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;

    --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 1. Base Reset ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-padding-top: 6rem;
    /* sticky header offset */
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--clr-text);
    background-color: var(--clr-bg);
    min-height: 100dvh;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
    line-height: 1.2;
}

p,
li {
    text-wrap: pretty;
}

button {
    cursor: pointer;
}


/* ── 2. Focus Ring ───────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Remove default focus ring only when focus-visible is supported */
:focus:not(:focus-visible) {
    outline: none;
}


/* ── 3. Selection colour ─────────────────────────────────── */
::selection {
    background: rgba(226, 31, 38, 0.18);
    color: var(--clr-text);
}


/* ── 4. Scrollbar Utilities ──────────────────────────────── */
.no-scrollbar {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}


/* ── 5. Line Clamp Utilities ─────────────────────────────── */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* ── 6. Number Input — hide spin buttons ─────────────────── */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type='number'] {
    -moz-appearance: textfield;
}


/* ── 7. Smooth Transitions on interactive elements ──────── */
a,
button,
[role='button'],
input,
textarea,
select {
    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition),
        transform var(--transition);
}


/* ════════════════════════════════════════════════════════════
   8. KEYFRAME ANIMATIONS
════════════════════════════════════════════════════════════ */

/* Popup entrance — scale 0.8 → 1 + fade */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(12px);
    }

    60% {
        opacity: 1;
        transform: scale(1.03) translateY(-2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Toast — slide up from bottom + fade */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Skeleton shimmer */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Slide up (APK prompt, drawers) */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Pulse ring (for badges / notifications) */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(226, 31, 38, .5);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(226, 31, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(226, 31, 38, 0);
    }
}

/* Shake — invalid pincode */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-7px);
    }

    30% {
        transform: translateX(7px);
    }

    45% {
        transform: translateX(-5px);
    }

    60% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }

    90% {
        transform: translateX(3px);
    }
}

/* Bounce — add to cart button micro */
@keyframes bounceCart {

    0%,
    100% {
        transform: scale(1);
    }

    40% {
        transform: scale(0.88);
    }

    70% {
        transform: scale(1.08);
    }
}

/* Count up badge (when item added) */
@keyframes badgePop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}


/* ════════════════════════════════════════════════════════════
   9. PINCODE POPUP
════════════════════════════════════════════════════════════ */

#pincodeOverlay {
    animation: fadeIn .2s ease both;
}

#pincodeModal {
    animation: popIn .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* Pincode input — wide tracking, large centered */
#pincodeInput {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.55em;
    text-align: center;
    caret-color: var(--clr-primary);
}

#pincodeInput:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(226, 31, 38, .15);
}

/* Shake animation on invalid submit */
#pincodeInput.shake {
    animation: shake .5s ease both;
    border-color: var(--clr-primary) !important;
}

/* Animated dot indicators */
.pin-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
    transition: background-color .2s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}

.pin-dot.filled {
    background-color: var(--clr-primary);
    transform: scale(1.25);
}

.pin-dot.success {
    background-color: #22c55e;
    transform: scale(1.25);
}

/* Pincode status messages */
#pincodeStatus.success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

#pincodeStatus.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}


/* ════════════════════════════════════════════════════════════
   10. PRODUCT CARD
════════════════════════════════════════════════════════════ */

.product-card {
    background: var(--clr-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Product image container */
.product-card .card-img-wrap {
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform var(--transition-slow);
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

/* Discount badge */
.product-card .discount-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--clr-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    z-index: 2;
}

/* Card body */
.product-card .card-body {
    padding: 0.625rem 0.75rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.product-card .card-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--clr-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.product-card .card-unit {
    font-size: 0.7rem;
    color: var(--clr-muted);
    margin-bottom: 0.25rem;
}

.product-card .card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-card .card-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--clr-primary);
    line-height: 1;
}

.product-card .card-mrp {
    font-size: 0.7rem;
    color: var(--clr-muted);
    text-decoration: line-through;
    margin-left: 0.25rem;
}

/* Round red "+" add-to-cart button (bottom-right of card) */
.btn-add-cart {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: var(--clr-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
    box-shadow: 0 2px 8px rgba(226, 31, 38, .35);
}

.btn-add-cart:hover {
    background-color: var(--clr-primary-dk);
}

.btn-add-cart:active {
    transform: scale(0.88);
    animation: bounceCart .35s ease;
}

/* "Added" state — green tick */
.btn-add-cart.added {
    background-color: #22c55e;
    animation: bounceCart .3s ease;
}


/* ════════════════════════════════════════════════════════════
   11. BANNER / HERO SLIDER
════════════════════════════════════════════════════════════ */

.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.banner-slide {
    display: none;
    animation: fadeIn .4s ease;
}

.banner-slide.active {
    display: flex;
}

/* Dot indicators */
.slider-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: background-color var(--transition), width var(--transition);
}

.slider-dot.active {
    background-color: #fff;
    width: 1.25rem;
}

/* Arrow buttons */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, .3);
    transition: background-color var(--transition);
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, .4);
}

.slider-arrow.prev {
    left: 0.75rem;
}

.slider-arrow.next {
    right: 0.75rem;
}


/* ════════════════════════════════════════════════════════════
   12. SKELETON LOADER
════════════════════════════════════════════════════════════ */

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e8e8e8 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-heading {
    height: 1.4em;
    width: 45%;
    margin-bottom: 0.75rem;
}

.skeleton-circle {
    border-radius: 9999px;
}

.skeleton-img {
    aspect-ratio: 1/1;
    width: 100%;
}

/* Respect reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: #f0f0f0;
    }
}


/* ════════════════════════════════════════════════════════════
   13. TOAST NOTIFICATION
════════════════════════════════════════════════════════════ */

.jm-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    min-width: 220px;
    max-width: 320px;
    animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

.jm-toast.removing {
    animation: toastOut .3s ease forwards;
}

.jm-toast .toast-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.jm-toast.success .toast-icon {
    background: #22c55e;
}

.jm-toast.error .toast-icon {
    background: var(--clr-primary);
}


/* ════════════════════════════════════════════════════════════
   14. CART PAGE
════════════════════════════════════════════════════════════ */

.cart-item {
    background: var(--clr-white);
    border-radius: var(--radius-lg);
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition);
}

.cart-item:hover {
    box-shadow: var(--shadow-hover);
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: #f9fafb;
    object-fit: contain;
    padding: 0.25rem;
    flex-shrink: 0;
}

/* Qty stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--clr-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition);
}

.qty-btn:hover {
    background-color: #fef2f2;
}

.qty-val {
    min-width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clr-text);
    padding: 0 0.25rem;
}

/* Cart summary box */
.cart-summary {
    background: var(--clr-white);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 5.5rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--clr-muted);
    padding: 0.375rem 0;
}

.cart-summary-row.total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--clr-text);
    border-top: 1.5px dashed var(--clr-border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

/* Free delivery badge */
.free-delivery-tag {
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #bbf7d0;
}


/* ════════════════════════════════════════════════════════════
   15. PRODUCT DETAIL PAGE
════════════════════════════════════════════════════════════ */

.product-detail-img {
    background: #f9fafb;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    padding: 1.5rem;
    overflow: hidden;
}

.product-detail-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.product-detail-img:hover img {
    transform: scale(1.04);
}

/* Delivery info box */
.delivery-info-box {
    background: linear-gradient(135deg, #e8edf8 0%, #dce4f5 100%);
    border: 1px solid rgba(0, 48, 135, .15);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
}

/* Stock badge */
.in-stock {
    color: #16a34a;
    background: #f0fdf4;
}

.out-stock {
    color: #dc2626;
    background: #fef2f2;
}

.stock-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}


/* ════════════════════════════════════════════════════════════
   16. ADMIN PANEL
════════════════════════════════════════════════════════════ */

/* Sidebar */
.admin-sidebar {
    background: var(--clr-secondary);
    min-height: 100vh;
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, .7);
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.admin-sidebar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .08);
}

.admin-sidebar-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .12);
    border-left-color: var(--clr-accent);
    font-weight: 600;
}

/* Admin stat cards */
.admin-stat-card {
    background: var(--clr-white);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--clr-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1.5px solid var(--clr-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: var(--clr-text);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: #fafafa;
}

/* Admin form inputs */
.admin-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: #fff;
    color: var(--clr-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-input:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(226, 31, 38, .12);
}

.admin-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 0.375rem;
}

.admin-form-group {
    margin-bottom: 1.25rem;
}

/* Discount preview badge (auto-calculated) */
.discount-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #fef9ec;
    color: var(--clr-accent);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
}

/* Admin image preview */
.img-preview-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--clr-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    transition: border-color var(--transition);
}

.img-preview-wrap:hover {
    border-color: var(--clr-primary);
}

.img-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Admin mobile: sidebar collapses to top bar */
@media (max-width: 767px) {
    .admin-sidebar {
        width: 100%;
        min-height: auto;
        flex-direction: row;
        overflow-x: auto;
    }

    .admin-sidebar-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }

    .admin-sidebar-link.active {
        border-bottom-color: var(--clr-accent);
        border-left-color: transparent;
    }
}


/* ════════════════════════════════════════════════════════════
   17. OFFER STRIP (3 boxes)
════════════════════════════════════════════════════════════ */

.offer-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
}

.offer-box {
    background: var(--clr-white);
    border-radius: var(--radius-xl);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.offer-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.offer-box .offer-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.offer-box .offer-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--clr-text);
    line-height: 1.2;
}

.offer-box .offer-sub {
    font-size: 0.7rem;
    color: var(--clr-muted);
    margin-top: 0.125rem;
}

@media (max-width: 640px) {
    .offer-strip {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
}


/* ════════════════════════════════════════════════════════════
   18. SECTION HEADERS
════════════════════════════════════════════════════════════ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 800;
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25em;
    background: var(--clr-primary);
    border-radius: 9999px;
}

.section-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--clr-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.section-link:hover {
    text-decoration: underline;
}


/* ════════════════════════════════════════════════════════════
   19. CATEGORY CIRCLE CARDS
════════════════════════════════════════════════════════════ */

.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform var(--transition);
}

.category-circle:hover {
    transform: translateY(-3px);
}

.cat-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition);
}

.category-circle:hover .cat-icon-wrap {
    box-shadow: var(--shadow-hover);
}

.cat-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--clr-text);
    text-align: center;
    max-width: 4.5rem;
    line-height: 1.2;
}


/* ════════════════════════════════════════════════════════════
   20. BADGE UTILITIES
════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    white-space: nowrap;
}

.badge-red {
    background: var(--clr-primary);
    color: #fff;
}

.badge-blue {
    background: var(--clr-secondary);
    color: #fff;
}

.badge-orange {
    background: var(--clr-accent);
    color: #fff;
}

.badge-green {
    background: #22c55e;
    color: #fff;
}

.badge-gray {
    background: #f3f4f6;
    color: var(--clr-muted);
}


/* ════════════════════════════════════════════════════════════
   21. BUTTON UTILITIES
════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--clr-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(226, 31, 38, .3);
}

.btn-primary:hover {
    background-color: var(--clr-primary-dk);
    box-shadow: 0 4px 16px rgba(226, 31, 38, .35);
}

.btn-secondary {
    background-color: var(--clr-secondary);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #002266;
}

.btn-outline {
    background: transparent;
    color: var(--clr-primary);
    border: 1.5px solid var(--clr-primary);
}

.btn-outline:hover {
    background-color: #fef2f2;
}

.btn-ghost {
    background: transparent;
    color: var(--clr-muted);
}

.btn-ghost:hover {
    background-color: #f3f4f6;
    color: var(--clr-text);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* Loading spinner inside button */
.btn-loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 9999px;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ════════════════════════════════════════════════════════════
   22. BREADCRUMB
════════════════════════════════════════════════════════════ */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--clr-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--clr-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--clr-primary);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--clr-border);
    font-size: 0.7rem;
    user-select: none;
}

.breadcrumb span:last-child {
    color: var(--clr-text);
    font-weight: 600;
}


/* ════════════════════════════════════════════════════════════
   23. EMPTY STATE
════════════════════════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--clr-muted);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: .6;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 28ch;
    margin-bottom: 1.5rem;
}


/* ════════════════════════════════════════════════════════════
   24. SAFE AREA + MOBILE FIXES
════════════════════════════════════════════════════════════ */

/* Bottom padding for fixed bottom nav on iOS */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Sticky bottom checkout button (cart page, mobile) */
.sticky-checkout {
    position: sticky;
    bottom: calc(3.5rem + env(safe-area-inset-bottom));
    z-index: 30;
}

@media (min-width: 768px) {
    .sticky-checkout {
        position: static;
    }
}


/* ════════════════════════════════════════════════════════════
   25. HELPER UTILITIES
════════════════════════════════════════════════════════════ */

.text-price {
    color: var(--clr-primary);
    font-weight: 800;
}

.text-mrp {
    color: var(--clr-muted);
    text-decoration: line-through;
    font-size: .85em;
}

.text-save {
    color: #16a34a;
    font-weight: 600;
    font-size: .85em;
}

.tabular-num {
    font-variant-numeric: tabular-nums;
}

/* Divider */
.jm-divider {
    height: 1px;
    background-color: var(--clr-border);
    margin: 1rem 0;
}

/* Page container */
.page-container {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .page-container {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .page-container {
        padding-inline: 2rem;
    }
}

/* Section spacing */
.section-gap {
    padding-block: 1.5rem;
}

@media (min-width: 768px) {
    .section-gap {
        padding-block: 2.5rem;
    }
}


/* ════════════════════════════════════════════════════════════
   26. PRINT
════════════════════════════════════════════════════════════ */

@media print {

    header,
    footer,
    nav,
    .admin-sidebar,
    #pincodeOverlay,
    #apkPrompt,
    #toastContainer,
    .btn-add-cart {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 10pt;
        color: #555;
    }
}