/* =========================================================
   LOCAL ROOTS AGROTECH — Theme
   ========================================================= */

:root {
    --se-primary: #1a7e3e;
    --se-primary-dark: #14622f;
    --se-primary-light: #e6f4ec;
    --se-accent: #f0a500;
    --se-sale: #e63946;
    --se-bg: #faf7f2;
    --se-text: #1a1a1a;
    --se-muted: #6b6b6b;
    --se-border: #e8e8e8;
    --se-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    --se-shadow-hover: 0 10px 30px rgba(26, 126, 62, 0.18);
    --se-radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--se-text);
    background: #ffffff;
    line-height: 1.6;
    position: relative;
}

/* Subtle Rainbow background — site-wide */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* Faint background texture. Static 54KB image (6% opacity = motion imperceptible anyway),
       so it loads instantly instead of an 11MB animated GIF. */
    background: url('../img/bg-texture.jpg') center/cover no-repeat;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
    contain: strict;
}
body > * { position: relative; z-index: 1; }

main { flex: 1; }

a { text-decoration: none; transition: color .2s; }
a:hover { color: var(--se-primary); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Poppins', serif;
    font-weight: 700;
    color: var(--se-text);
}

/* =========================================================
   TOP ANNOUNCEMENT BAR
   ========================================================= */
.top-bar {
    background: var(--se-primary-dark);
    color: #ffffff;
    font-size: .82rem;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}
.top-bar a { color: #fff; }
.top-bar a:hover { color: #ffd166; }
.announcement-track {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
}
.announcement-track span { display: inline-flex; align-items: center; gap: 6px; }
@keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================================
   MAIN NAVBAR
   ========================================================= */
.main-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--se-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}
.brand-logo .brand-img {
    height: 58px;
    width: auto;
    display: block;
}
@media (max-width: 768px) {
    .brand-logo .brand-img { height: 46px; }
}

.nav-search {
    position: relative;
    max-width: 480px;
    width: 100%;
}
.nav-search input {
    border-radius: 30px;
    padding-left: 44px;
    height: 44px;
    border: 1.5px solid var(--se-border);
    background: var(--se-bg);
    font-size: .9rem;
}
.nav-search input:focus {
    border-color: var(--se-primary);
    box-shadow: 0 0 0 3px var(--se-primary-light);
    background: #fff;
}
.nav-search .bi-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--se-muted);
}

.nav-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--se-bg);
    color: var(--se-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    transition: all .2s;
    border: none;
}
.nav-icon-btn:hover { background: var(--se-primary); color: #fff; }
.cart-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--se-sale);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    min-width: 20px; height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* Category Menu Strip */
.cat-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--se-border);
}
.cat-strip .nav-link {
    font-weight: 500;
    color: var(--se-text) !important;
    font-size: .9rem;
    padding: 12px 16px !important;
    text-transform: uppercase;
    letter-spacing: .3px;
    position: relative;
}
.cat-strip .nav-link:hover,
.cat-strip .nav-link.active { color: var(--se-primary) !important; }
.cat-strip .nav-link.active::after {
    content: '';
    position: absolute;
    left: 16px; right: 16px; bottom: 6px;
    height: 2px; background: var(--se-primary);
}
.cat-strip .dropdown-menu {
    border: none;
    box-shadow: var(--se-shadow);
    border-radius: var(--se-radius);
    padding: 12px;
    min-width: 240px;
}
.cat-strip .dropdown-item {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .9rem;
}
.cat-strip .dropdown-item:hover {
    background: var(--se-primary-light);
    color: var(--se-primary);
}

/* =========================================================
   HERO CAROUSEL
   ========================================================= */
.hero-carousel .carousel-item {
    height: 540px;
    background-size: cover;
    background-position: center;
    position: relative;
    /* GIF backgrounds ko apni compositor layer pe rakho — smooth */
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: paint;
}

/* Hero background video — full quality, lightweight, behind the caption */
.hero-carousel .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-carousel .carousel-item .container { position: relative; z-index: 2; }

/* Section decorative gif accents — desktop floating, mobile full banner */
.section-gif {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    border: 5px solid #fff;
    z-index: 2;
    pointer-events: none;
    animation: gif-float 4s ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
}
.section-gif.left  { left: 4%;  top: 30px; }
.section-gif.right { right: 4%; top: 30px; }
@keyframes gif-float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-14px); }
}
/* Mobile: gif becomes a full-width strip banner above the section content */
@media (max-width: 768px) {
    .section-gif {
        position: relative !important;
        display: block;
        margin: 0 auto 18px;
        width: 90% !important;
        height: 140px !important;
        border-radius: 18px !important;
        border-width: 3px !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        animation: none;
    }
}
.hero-carousel .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 70%);
    z-index: 1;
}
.hero-carousel .carousel-caption {
    text-align: left;
    left: 8%;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    max-width: 540px;
}
.hero-carousel .carousel-caption h1,
.hero-carousel .carousel-caption h2 {
    font-size: 3.4rem;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    margin-bottom: 16px;
}
.hero-carousel .carousel-caption p {
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 26px;
}
.hero-carousel .btn {
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: .5px;
}
@media (max-width: 768px) {
    .hero-carousel .carousel-item { height: 380px; }
    .hero-carousel .carousel-caption h1,
    .hero-carousel .carousel-caption h2 { font-size: 2rem; }
    .hero-carousel .carousel-caption p { font-size: .95rem; }
}

/* =========================================================
   CROSSING RIBBONS (animated marquee, before categories)
   ========================================================= */
.ribbon-marquee {
    position: relative;
    height: 168px;
    overflow: hidden;
    margin: 24px 0;
}
.ribbon {
    position: absolute;
    left: -12%;
    width: 124%;
    top: 52px;
    padding: 13px 0;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.14);
}
.ribbon-light {
    transform: rotate(-7deg);
    background: #cdeccf;
    color: #14622f;
    z-index: 1;
}
.ribbon-dark {
    transform: rotate(7deg);
    background: linear-gradient(90deg, #1a7e3e 0%, #0f5227 100%);
    color: #fff;
    z-index: 2;
}
.ribbon-track {
    display: inline-block;
    will-change: transform;
}
.ribbon-light .ribbon-track { animation: ribbon-left 34s linear infinite; }
.ribbon-dark  .ribbon-track { animation: ribbon-right 30s linear infinite; }
.ribbon-track .ph {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: .98rem;
    text-transform: uppercase;
    padding: 0 20px;
    vertical-align: middle;
}
.ribbon-track .sep {
    opacity: .65;
    font-size: .9rem;
    vertical-align: middle;
}
@keyframes ribbon-left  { from { transform: translateX(0); }      to { transform: translateX(-50%); } }
@keyframes ribbon-right { from { transform: translateX(-50%); }   to { transform: translateX(0); } }
@media (max-width: 768px) {
    .ribbon-marquee { height: 128px; margin: 12px 0; }
    .ribbon { top: 40px; padding: 10px 0; }
    .ribbon-track .ph { font-size: .78rem; letter-spacing: 1px; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ribbon-track { animation: none !important; }
}

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section { padding: 70px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow {
    color: var(--se-primary);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.section-head h2 {
    font-size: 2.4rem;
    margin-bottom: 12px;
}
.section-head p { color: var(--se-muted); max-width: 560px; margin: 0 auto; }

/* =========================================================
   CATEGORY CARDS
   ========================================================= */
.cat-card {
    position: relative;
    border-radius: var(--se-radius);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--se-shadow);
    transition: transform .35s, box-shadow .35s;
    display: block;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--se-shadow-hover); }
.cat-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.cat-card:hover img { transform: scale(1.07); }
.cat-card .cat-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--se-primary-light), #fff);
    display: flex; align-items: center; justify-content: center;
    font-size: 4.5rem;
    color: var(--se-primary);
}
.cat-card .cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    display: flex;
    align-items: flex-end;
    padding: 22px;
}
.cat-card .cat-overlay h5 {
    color: #fff;
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
}

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.product-card {
    background: #fff;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    overflow: hidden;
    transition: all .3s;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--se-shadow-hover);
    border-color: var(--se-primary);
}
.product-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--se-bg);
}
.product-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.product-card:hover .product-thumb img { transform: scale(1.08); }
.product-thumb .placeholder-icon {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--se-primary);
    font-size: 4rem;
    opacity: .35;
}
.product-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 6px;
    z-index: 2;
}
.product-badges .badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-sale { background: var(--se-sale); color: #fff; }
.badge-organic { background: var(--se-primary); color: #fff; }
.badge-featured { background: var(--se-accent); color: #fff; }
.badge-out { background: #6c757d; color: #fff; }

.product-actions {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; flex-direction: column; gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all .3s;
    z-index: 2;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.product-actions .icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--se-text);
    display: inline-flex;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 1rem;
    border: none;
    transition: all .2s;
}
.product-actions .icon-btn:hover { background: var(--se-primary); color: #fff; }

.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-cat {
    color: var(--se-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.product-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--se-text);
    margin-bottom: 8px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-name a { color: inherit; }
.product-name a:hover { color: var(--se-primary); }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.price-current { color: var(--se-primary); font-size: 1.2rem; font-weight: 700; }
.price-original { color: var(--se-muted); font-size: .9rem; text-decoration: line-through; }
.price-unit { color: var(--se-muted); font-size: .85rem; }
.btn-cart {
    background: var(--se-primary);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 9px 18px;
    font-size: .85rem;
    font-weight: 600;
    width: 100%;
    transition: all .2s;
    margin-top: auto;
}
.btn-cart:hover { background: var(--se-primary-dark); color: #fff; transform: scale(1.02); }
.btn-cart:disabled { background: #b0b0b0; cursor: not-allowed; }

/* =========================================================
   FEATURE STRIP
   ========================================================= */
.feature-strip {
    background: var(--se-bg);
    padding: 40px 0;
}
.feature-item {
    display: flex; align-items: center; gap: 14px;
}
.feature-item .feat-icon {
    width: 56px; height: 56px;
    background: var(--se-primary-light);
    color: var(--se-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.feature-item h6 { font-size: 1rem; margin: 0 0 2px 0; }
.feature-item small { color: var(--se-muted); }

/* =========================================================
   ABOUT PILLARS
   ========================================================= */
.pillar-card {
    background: #fff;
    border-radius: var(--se-radius);
    padding: 28px;
    text-align: center;
    border: 1px solid var(--se-border);
    transition: all .3s;
    height: 100%;
}
.pillar-card:hover {
    border-color: var(--se-primary);
    transform: translateY(-4px);
    box-shadow: var(--se-shadow-hover);
}
.pillar-card .pillar-icon {
    width: 70px; height: 70px;
    background: var(--se-primary-light);
    color: var(--se-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.9rem;
    margin-bottom: 16px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: #1a1a1a;
    color: #c9c9c9;
    padding: 64px 0 0;
}
.site-footer .footer-logo {
    height: 72px;
    width: auto;
    display: block;
}
.site-footer h6 {
    color: #fff;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}
.site-footer a { color: #c9c9c9; font-size: .9rem; }
.site-footer a:hover { color: var(--se-primary); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.social-icons { display: flex; gap: 10px; margin-top: 18px; }
.social-icons a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
}
.social-icons a:hover { background: var(--se-primary); color: #fff; }
.newsletter input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 30px;
    padding: 12px 20px;
}
.newsletter input::placeholder { color: #888; }
.newsletter input:focus { background: rgba(255,255,255,0.12); border-color: var(--se-primary); color: #fff; box-shadow: none; }
.newsletter .btn {
    background: var(--se-primary);
    color: #fff;
    border-radius: 30px;
    padding: 12px 24px;
    border: none;
    font-weight: 600;
    margin-top: 10px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 48px;
    padding: 22px 0;
    font-size: .85rem;
    color: #888;
}

/* =========================================================
   BUTTONS / GENERIC
   ========================================================= */
.btn-primary-green {
    background: var(--se-primary);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all .2s;
}
.btn-primary-green:hover { background: var(--se-primary-dark); color: #fff; transform: translateY(-2px); }
.btn-outline-green {
    background: transparent;
    color: var(--se-primary);
    border: 2px solid var(--se-primary);
    border-radius: 30px;
    padding: 10px 26px;
    font-weight: 600;
}
.btn-outline-green:hover { background: var(--se-primary); color: #fff; }

/* Bootstrap overrides */
.btn-success { background: var(--se-primary) !important; border-color: var(--se-primary) !important; }
.btn-success:hover { background: var(--se-primary-dark) !important; border-color: var(--se-primary-dark) !important; }
.btn-outline-success { color: var(--se-primary) !important; border-color: var(--se-primary) !important; }
.btn-outline-success:hover { background: var(--se-primary) !important; color: #fff !important; }
.text-success { color: var(--se-primary) !important; }
.bg-success { background: var(--se-primary) !important; }
.border-success { border-color: var(--se-primary) !important; }
.form-control:focus, .form-select:focus { border-color: var(--se-primary); box-shadow: 0 0 0 .2rem var(--se-primary-light); }

.card {
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
}
.alert { border-radius: 10px; border: none; }

/* =========================================================
   ADMIN PANEL
   ========================================================= */
.admin-wrap { display: flex; min-height: 100vh; background: #f5f7fa; }
.admin-sidebar {
    width: 260px;
    background: #1a1a1a;
    color: #c9c9c9;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .brand {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex; align-items: center; gap: 10px;
}
.admin-sidebar .brand i { color: var(--se-primary); }
.admin-sidebar .menu { padding: 18px 12px; }
.admin-sidebar .menu-title {
    color: #666;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 14px 6px;
}
.admin-sidebar a {
    display: flex; align-items: center; gap: 12px;
    color: #c9c9c9;
    padding: 11px 14px;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: .92rem;
    transition: all .15s;
}
.admin-sidebar a:hover { background: rgba(26, 126, 62, 0.15); color: #fff; }
.admin-sidebar a.active { background: var(--se-primary); color: #fff; }
.admin-sidebar a i { font-size: 1.05rem; width: 20px; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--se-border);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; top: 0;
    z-index: 10;
}
.admin-topbar h1 { font-family: 'Poppins', sans-serif; font-size: 1.3rem; margin: 0; }
.admin-content { padding: 28px; }

.stat-card {
    background: #fff;
    border-radius: var(--se-radius);
    padding: 22px;
    border: 1px solid var(--se-border);
    transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--se-shadow); }
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 14px;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1; margin-bottom: 4px; font-family: 'Poppins', sans-serif; }
.stat-card .stat-label { color: var(--se-muted); font-size: .85rem; }

.stat-icon.bg-green-soft { background: var(--se-primary-light); color: var(--se-primary); }
.stat-icon.bg-orange-soft { background: #fff4e0; color: var(--se-accent); }
.stat-icon.bg-red-soft { background: #fde7e9; color: var(--se-sale); }
.stat-icon.bg-blue-soft { background: #e3f2fd; color: #1976d2; }
.stat-icon.bg-purple-soft { background: #f3e5f5; color: #8e44ad; }
.stat-icon.bg-grey-soft { background: #eef0f3; color: #555; }

/* Admin sidebar backdrop (mobile only) */
.admin-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity .25s;
}
.admin-backdrop.show { display: block; opacity: 1; }

@media (max-width: 991px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        z-index: 1050;
        transition: left .25s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    .admin-sidebar.open { left: 0; }
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 12px 16px; }
    .admin-topbar h1 { font-size: 1.05rem; }

    /* Stat cards — stack better */
    .stat-card { padding: 18px; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .stat-card .stat-icon {
        width: 44px; height: 44px;
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    /* Topbar dropdown smaller */
    .admin-topbar .btn { padding: 6px 10px; font-size: .85rem; }
    .admin-topbar .btn .bi-person-circle { font-size: 1rem; }

    /* Disable tap highlight + selection on chrome */
    .admin-sidebar, .admin-topbar {
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Sidebar close button — mobile only */
.admin-sidebar .sidebar-close {
    display: none;
    position: absolute;
    top: 18px; right: 18px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    align-items: center;
    justify-content: center;
}
@media (max-width: 991px) {
    .admin-sidebar .sidebar-close { display: inline-flex; }
}

/* =========================================================
   HELPERS
   ========================================================= */
.bg-soft-green { background: var(--se-primary-light); }
.text-muted-2 { color: var(--se-muted); }
.divider { height: 1px; background: var(--se-border); margin: 24px 0; }

.alert {
    animation: slideDown .3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pagination */
.pagination .page-link { color: var(--se-primary); border-radius: 8px !important; margin: 0 3px; border: 1px solid var(--se-border); }
.pagination .page-item.active .page-link { background: var(--se-primary); border-color: var(--se-primary); color: #fff; }

/* =========================================================
   MOBILE — APP FEEL
   ========================================================= */

/* Mobile bottom navigation (visible only on small screens) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--se-border);
    box-shadow: 0 -4px 18px rgba(0,0,0,0.08);
    z-index: 1040;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.mobile-bottom-nav .nav-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.mobile-bottom-nav a {
    flex: 1;
    text-align: center;
    color: var(--se-muted);
    font-size: .68rem;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 0;
    position: relative;
    transition: color .15s;
}
.mobile-bottom-nav a i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 2px;
}
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:active { color: var(--se-primary); }
.mobile-bottom-nav a .mb-cart-badge {
    position: absolute;
    top: 0; right: 22%;
    background: var(--se-sale);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #fff;
}

@media (max-width: 991px) {
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 70px; }
    /* Hide top desktop-only icons on mobile (cart icon already in bottom bar) */
    .main-nav .nav-icon-btn[aria-label="Cart"],
    .main-nav .nav-icon-btn[aria-label="Account"],
    .main-nav .nav-icon-btn[aria-label="Login"] { display: none; }
}

/* Mobile-specific tweaks for app feel */
@media (max-width: 768px) {
    /* Smaller, tighter top bar on mobile */
    .top-bar {
        font-size: .72rem;
        padding: 6px 0;
    }
    .top-bar .small { font-size: .72rem; }

    /* Hero adjustments */
    .hero-carousel .carousel-item { height: 360px; }
    .hero-carousel .carousel-caption {
        left: 5%;
        right: 5%;
        max-width: none;
        text-align: center;
    }
    .hero-carousel .carousel-caption h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 10px;
    }
    .hero-carousel .carousel-caption p {
        font-size: .9rem;
        margin-bottom: 18px;
    }
    .hero-carousel .btn { padding: 10px 24px; font-size: .9rem; }
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next { width: 8%; }

    /* Sections — tighter padding */
    .section { padding: 40px 0; }
    .section-head { margin-bottom: 28px; }
    .section-head .eyebrow { font-size: .75rem; letter-spacing: 1.5px; }
    .section-head h2 { font-size: 1.6rem; }
    .section-head p { font-size: .9rem; }

    /* Product cards — tighter */
    .product-card { border-radius: 12px; }
    .product-thumb img { width: 100%; height: 100%; }
    .product-body { padding: 12px; }
    .product-name { font-size: .9rem; min-height: 38px; }
    .price-current { font-size: 1rem; }
    .btn-cart { padding: 8px 14px; font-size: .8rem; }

    /* Category cards — visible on mobile too */
    .cat-card .cat-overlay { padding: 14px; }
    .cat-card .cat-overlay h5 { font-size: .95rem; }

    /* Feature strip — single column on mobile */
    .feature-strip { padding: 24px 0; }
    .feature-item .feat-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .feature-item h6 { font-size: .9rem; }
    .feature-item small { font-size: .75rem; }

    /* Footer compact */
    .site-footer { padding: 40px 0 0; }
    .site-footer h6 { font-size: .85rem; margin-bottom: 12px; margin-top: 16px; }

    /* Disable text selection on UI chrome (app feel) */
    .top-bar, .main-nav, .cat-strip, .mobile-bottom-nav, .product-actions, .product-badges {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Smooth scroll on iOS-like phones */
html { -webkit-overflow-scrolling: touch; }

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* Tables */
.table thead th {
    background: var(--se-bg);
    color: var(--se-text);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border: none;
}
.table td { vertical-align: middle; }
