/* =========================================================================
   Murliganj Local Store — Premium Design System
   -------------------------------------------------------------------------
   This stylesheet is ADDITIVE. It layers a cohesive, modern visual language
   on top of the existing markup using a centralised set of design tokens.

   Brand tokens are injected at runtime from the backend (BrandingSetting)
   via the inline :root block in layouts/customer.blade.php, so the website
   becomes a true consumer of the same branding source of truth as the
   Flutter apps (/app-settings).

   Tokens (overridable inline):
     --brand            primary brand color
     --brand-dark       darker shade for gradients/hover
     --brand-soft       tinted background (primary @ 8-10%)
     --brand-contrast   readable text on brand (usually #fff)
   ========================================================================= */

:root {
    --brand: #16a34a;
    --brand-dark: #15803d;
    --brand-soft: rgba(22, 163, 74, 0.10);
    --brand-contrast: #ffffff;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.08);
    --shadow: 0 8px 24px rgba(16, 24, 40, 0.10);
    --shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.14);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 68px;
}

/* ---------- Brand color helpers (replace scattered Tailwind greens) ----- */
.text-brand { color: var(--brand) !important; }
.bg-brand { background-color: var(--brand) !important; }
.border-brand { border-color: var(--brand) !important; }

.gradient-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%) !important;
}
.gradient-primary-soft {
    background: linear-gradient(135deg, var(--brand-soft) 0%, rgba(255,255,255,0) 100%);
}

.brand-ring { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Buttons ----------------------------------------------------- */
.btn,
a.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1.1rem;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
    cursor: pointer;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary,
a.btn-primary,
.bg-primary-600 {
    background-color: var(--brand) !important;
    color: var(--brand-contrast) !important;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover,
a.btn-primary:hover,
.hover\:bg-primary-700:hover,
a.hover\:bg-primary-700:hover {
    background-color: var(--brand-dark) !important;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: #fff;
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, white);
}
.btn-secondary:hover { background-color: var(--brand-soft); }

.btn-ghost {
    background: transparent;
    color: var(--brand);
}
.btn-ghost:hover { background: var(--brand-soft); }

/* ---------- Cards ------------------------------------------------------- */
.card,
.product-card,
.store-card {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.product-card:hover,
.store-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--brand) 22%, white);
}

/* ---------- Inputs & search -------------------------------------------- */
.input,
input.input,
select.input,
textarea.input,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"] {
    border-radius: var(--radius-sm);
    border: 1px solid #e3e8ee;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
    background: #fff;
}
.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

/* ---------- Header chrome ---------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(16, 24, 40, 0.06);
    box-shadow: var(--shadow-xs);
}
.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}
.site-header .header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-size: 1.15rem;
}
.brand-logo img { height: 40px; width: auto; object-fit: contain; }
.brand-logo .brand-mark {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: grid; place-items: center;
    color: #fff; font-size: 1.1rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: var(--shadow-sm);
}

/* Search */
.site-search {
    flex: 1;
    max-width: 560px;
    position: relative;
}
.site-search input {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.7rem;
    border-radius: 999px;
    border: 1px solid #e3e8ee;
    background: #f7f9fb;
    transition: all 0.2s var(--ease);
}
.site-search input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}
.site-search .search-icon {
    position: absolute;
    left: 1rem; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.site-search .search-btn {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    height: 34px; padding: 0 1rem;
    border-radius: 999px;
    border: none;
    color: #fff;
    font-weight: 600; font-size: 0.85rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    cursor: pointer;
}

/* Header icon buttons */
.header-action {
    position: relative;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: #475569;
    background: #f1f5f9;
    transition: all 0.2s var(--ease);
    font-size: 1.05rem;
}
.header-action:hover {
    color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
}
.header-action .badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: grid; place-items: center;
    border: 2px solid #fff;
}

/* User dropdown */
#user-dropdown {
    border-radius: var(--radius);
    border: 1px solid #eef1f4;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: dropdownIn 0.18s var(--ease);
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#user-dropdown a, #user-dropdown button {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.9rem; color: #334155;
    transition: background 0.15s var(--ease);
}
#user-dropdown a:hover, #user-dropdown button:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

/* ---------- Category bar ------------------------------------------------ */
.category-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e9edf1;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s var(--ease);
    cursor: pointer;
}
.category-pill:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, white);
    color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
}
.category-pill.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: var(--shadow-sm);
}
.category-pill .cat-ico {
    width: 20px; height: 20px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.75rem;
}

/* ---------- Hero / banner ---------------------------------------------- */
.hero-section {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.banner-slide {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.banner-slide img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}
.banner-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    transition: all 0.3s var(--ease);
    cursor: pointer;
}
.banner-dot.active {
    width: 22px;
    border-radius: 4px;
    background: var(--brand);
}
.banner-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: #0f172a;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    z-index: 5;
}
.banner-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

/* ---------- Generic section heading ------------------------------------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    display: flex; align-items: center; gap: 0.5rem;
}
.section-title::before {
    content: "";
    width: 5px; height: 22px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
}

/* ---------- Mobile drawer polish --------------------------------------- */
#mobile-drawer {
    box-shadow: var(--shadow-lg);
}
#mobile-drawer a, #mobile-drawer button {
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

/* ---------- Footer (premium dark) -------------------------------------- */
.site-footer {
    background: #0b1220;
    background-image:
        radial-gradient(1200px 400px at 12% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
        radial-gradient(900px 360px at 100% 0%, color-mix(in srgb, var(--brand-dark) 18%, transparent), transparent 55%);
    color: #cbd5e1;
    position: relative;
    overflow: hidden;
}
.site-footer a { color: #cbd5e1; transition: color 0.15s var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-col-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    margin-bottom: 0.9rem;
}
.site-footer .footer-link {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.32rem 0;
    font-size: 0.875rem;
    color: #94a3b8;
}
.site-footer .footer-link:hover { color: #fff; transform: translateX(3px); }
.site-footer .footer-brand {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 800; color: #fff; font-size: 1.2rem;
}
.site-footer .footer-logo { height: 42px; width: auto; object-fit: contain; }
.site-footer .social-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
    transition: all 0.2s var(--ease);
    font-size: 1rem;
}
.site-footer .social-btn:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-2px);
}
.site-footer .pay-chip {
    height: 26px;
    padding: 0 0.6rem;
    display: inline-flex; align-items: center;
    border-radius: 7px;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    font-size: 0.72rem; font-weight: 600;
}
.site-footer .app-badge {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.5rem 0.85rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    transition: all 0.2s var(--ease);
}
.site-footer .app-badge:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}
.site-footer .newsletter-input {
    height: 44px;
    border-radius: 999px 0 0 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 0 1rem;
}
.site-footer .newsletter-input::placeholder { color: #64748b; }
.site-footer .newsletter-input:focus { outline: none; border-color: var(--brand); }
.site-footer .newsletter-btn {
    height: 44px; padding: 0 1.2rem;
    border: none; border-radius: 0 999px 999px 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff; font-weight: 700; cursor: pointer;
}

/* ---------- Animations -------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .animate-slide-up { animation: slideUp 0.35s var(--ease); }
    .fade-in { animation: fadeIn 0.4s var(--ease); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive refinements -------------------------------------- */
@media (max-width: 1023px) {
    :root { --header-h: 60px; }
    .brand-logo { font-size: 1rem; }
    .brand-logo img { height: 34px; }
    .header-action { width: 40px; height: 40px; }
}
@media (max-width: 640px) {
    .site-search input { height: 42px; }
    .section-title { font-size: 1.1rem; }
}

/* ---------- Below-header category/service strip (icon + label) ------- */
.cat-strip {
    background: #fff;
    border-bottom: 1px solid #eef1f4;
    box-shadow: var(--shadow-xs);
}
.cat-strip-inner {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.5rem 0;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 72px;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    color: #475569;
    transition: all 0.2s var(--ease);
    text-align: center;
}
.cat-chip:hover {
    background: var(--brand-soft);
    color: var(--brand);
    transform: translateY(-2px);
}
.cat-chip.active {
    background: var(--brand-soft);
    color: var(--brand);
}
.cat-chip .cat-ic {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease);
}
.cat-chip:hover .cat-ic { transform: scale(1.06); }
.cat-chip .cat-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .cat-chip { min-width: 64px; }
    .cat-chip .cat-ic { width: 34px; height: 34px; font-size: 0.9rem; }
    .cat-chip .cat-lbl { font-size: 0.68rem; }
}
