/* ============================================================================
   Home & Hardware Megastore — brand theme stylesheet (theme code: hnh)
   Palette extracted from logo:
     Brand orange : #F07820  (icon / MEGASTORE)   hover: #D9640F
     Brand blue   : #0084C4  (wordmark)           deep : #045E8C
   Loaded on top of Bagisto default theme's compiled CSS. All custom
   components use hnh-* classes so nothing here depends on Tailwind's purge.
   ========================================================================== */

:root {
    --hnh-orange:      #F07820;
    --hnh-orange-dark: #D9640F;
    --hnh-orange-soft: #FEF3EA;
    --hnh-blue:        #0084C4;
    --hnh-blue-deep:   #045E8C;
    --hnh-ink:         #1E293B;
    --hnh-line:        #E7E5E4;
}

/* ---- Global button re-brand (default theme's semantic button classes) ---- */
.primary-button {
    background: var(--hnh-orange) !important;
    border-color: var(--hnh-orange) !important;
}
.primary-button:hover {
    background: var(--hnh-orange-dark) !important;
    border-color: var(--hnh-orange-dark) !important;
}
.secondary-button {
    border-color: var(--hnh-orange) !important;
    color: var(--hnh-orange) !important;
}
.secondary-button:hover {
    background: var(--hnh-orange-soft) !important;
}

/* ------------------------- Product card ---------------------------------- */
.hnh-badge-off {
    background: var(--hnh-orange);
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

.hnh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.hnh-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    line-height: 1;
    color: var(--hnh-blue-deep);
    background: #F0F9FF;
    border: 1px solid #DBEFFB;
    border-radius: 999px;
    padding: 4px 8px;
    white-space: nowrap;
}
.hnh-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hnh-orange);
    display: inline-block;
}

/* Add button: solid brand orange, always visible */
.hnh-actions { opacity: 1 !important; }
.hnh-add-btn,
.hnh-add-btn:focus {
    background: var(--hnh-orange) !important;
    border: 1px solid var(--hnh-orange) !important;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: .01em;
}
.hnh-add-btn:hover:not(:disabled) {
    background: var(--hnh-orange-dark) !important;
    border-color: var(--hnh-orange-dark) !important;
    color: #fff !important;
}
.hnh-add-btn:disabled { opacity: .45; }

/* Price emphasis inside card (price_html renders final + struck regular) */
.hnh-actions ~ *, /* no-op guard */
[v-html] .final-price { color: var(--hnh-ink); }

/* --------------------------- Home USP strip ------------------------------- */
.hnh-usp-wrap {
    background: linear-gradient(180deg, var(--hnh-orange-soft), #fff);
    border-bottom: 1px solid var(--hnh-line);
}
.hnh-usp {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.hnh-usp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--hnh-line);
    border-radius: 12px;
    padding: 10px 14px;
}
.hnh-usp-ico { font-size: 22px; line-height: 1; }
.hnh-usp-item strong {
    display: block;
    font-size: 13px;
    color: var(--hnh-ink);
    line-height: 1.25;
}
.hnh-usp-item small {
    display: block;
    font-size: 11px;
    color: #64748B;
    line-height: 1.25;
}
@media (max-width: 991px) {
    .hnh-usp { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; }
}
@media (max-width: 524px) {
    .hnh-usp { grid-template-columns: 1fr 1fr; gap: 8px; }
    .hnh-usp-item { padding: 8px 10px; }
    .hnh-usp-ico { font-size: 18px; }
}

/* ------------- Section titles (carousel headings) get brand rule ---------- */
/* Default theme headings inside carousels are h2/h3; give a subtle brand tick
   without depending on utility classes: */
main h2 { position: relative; }

/* ======================= PHASE 2 ========================================= */

/* ------------------------- Brand top strip ------------------------------- */
.hnh-topstrip {
    background: var(--hnh-blue-deep);
    color: #E6F4FB;
    font-size: 12px;
    line-height: 1;
}
.hnh-topstrip-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.hnh-topstrip-left { display: flex; align-items: center; gap: 10px; }
.hnh-topstrip-left i {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--hnh-orange); display: inline-block;
}
.hnh-topstrip-right { display: flex; align-items: center; gap: 16px; }
.hnh-topstrip-right a { color: #fff; text-decoration: none; font-weight: 600; }
.hnh-topstrip-right a:hover { color: #FFD9BB; }
@media (max-width: 524px) {
    .hnh-topstrip-left span:nth-child(n+3) { display: none; }
    .hnh-topstrip-left i { display: none; }
}

/* ----------------------- Search bar emphasis ------------------------------ */
header form[role="search"] { max-width: 620px !important; width: 100%; }
header form[role="search"] input {
    background: #fff !important;
    border: 2px solid var(--hnh-orange) !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}
header form[role="search"] input:focus {
    border-color: var(--hnh-orange-dark) !important;
    box-shadow: 0 0 0 3px rgba(240, 120, 32, .15);
    outline: none;
}
header form[role="search"] .icon-search { color: var(--hnh-orange); }

/* ------------------ Hero banner (admin static content) -------------------- */
.hnh-hero {
    position: relative;
    background: linear-gradient(100deg, var(--hnh-blue-deep) 0%, var(--hnh-blue) 55%, #14A2E2 100%);
    color: #fff;
    overflow: hidden;
}
.hnh-hero-inner {
    max-width: 1440px; margin: 0 auto;
    padding: 44px 24px;
    display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center;
}
.hnh-hero h1 { font-size: 34px; line-height: 1.15; font-weight: 800; margin: 0 0 10px; }
.hnh-hero h1 em { color: #FFC58F; font-style: normal; }
.hnh-hero p  { font-size: 15px; opacity: .92; margin: 0 0 20px; max-width: 48ch; }
.hnh-hero-cta {
    display: inline-block;
    background: var(--hnh-orange);
    color: #fff; text-decoration: none; font-weight: 700;
    padding: 12px 26px; border-radius: 12px;
    box-shadow: 0 6px 18px rgba(240,120,32,.35);
}
.hnh-hero-cta:hover { background: var(--hnh-orange-dark); }
.hnh-hero-panel {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 16px; padding: 18px 20px;
    backdrop-filter: blur(2px);
}
.hnh-hero-panel li {
    list-style: none; display: flex; gap: 10px; align-items: center;
    padding: 7px 0; font-size: 14px;
}
.hnh-hero-panel li::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--hnh-orange); flex: 0 0 auto;
}
@media (max-width: 868px) {
    .hnh-hero-inner { grid-template-columns: 1fr; padding: 30px 16px; }
    .hnh-hero h1 { font-size: 26px; }
}

/* --------------- Category tiles (admin static content) -------------------- */
.hnh-cats { max-width: 1440px; margin: 0 auto; padding: 28px 24px 8px; }
.hnh-cats h2 { font-size: 22px; font-weight: 700; color: var(--hnh-ink); margin: 0 0 16px; }
.hnh-cats-grid {
    display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px;
}
.hnh-cat {
    display: grid; justify-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--hnh-line); border-radius: 14px;
    padding: 16px 8px; text-decoration: none; text-align: center;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.hnh-cat:hover {
    border-color: var(--hnh-orange);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.hnh-cat img { width: 56px; height: 56px; object-fit: contain; }
.hnh-cat span { font-size: 13px; font-weight: 600; color: var(--hnh-ink); line-height: 1.25; }
.hnh-cat small { font-size: 11px; color: var(--hnh-orange); font-weight: 600; }
@media (max-width: 1180px) { .hnh-cats-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 524px)  { .hnh-cats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .hnh-cat img{width:44px;height:44px} }

/* --------------- Testimonials (admin static content) ---------------------- */
.hnh-testi-wrap { background: var(--hnh-orange-soft); margin-top: 32px; }
.hnh-testi { max-width: 1440px; margin: 0 auto; padding: 32px 24px 40px; }
.hnh-testi h2 { font-size: 22px; font-weight: 700; color: var(--hnh-ink); margin: 0 0 4px; }
.hnh-testi > p { color: #64748B; font-size: 14px; margin: 0 0 20px; }
.hnh-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hnh-testi-card {
    background: #fff; border: 1px solid var(--hnh-line);
    border-radius: 14px; padding: 18px;
}
.hnh-testi-card p { font-size: 14px; color: var(--hnh-ink); margin: 0 0 12px; line-height: 1.5; }
.hnh-testi-card p::before { content: "\201C"; color: var(--hnh-orange); font-size: 26px; line-height: 0; vertical-align: -8px; margin-right: 4px; }
.hnh-testi-who { display: flex; align-items: center; gap: 10px; }
.hnh-testi-ava {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--hnh-blue); color: #fff; font-weight: 700; font-size: 14px;
    display: grid; place-items: center;
}
.hnh-testi-who strong { display: block; font-size: 13px; color: var(--hnh-ink); }
.hnh-testi-who small  { display: block; font-size: 11px; color: #64748B; }
.hnh-stars { color: var(--hnh-orange); font-size: 12px; letter-spacing: 2px; }
@media (max-width: 868px) { .hnh-testi-grid { grid-template-columns: 1fr; } }

/* ======================= PHASE 3: bulk tier pricing ======================= */
.hnh-bulk {
    margin-top: 14px;
    max-width: 470px;
    border: 1px solid #F9D9BC;
    background: var(--hnh-orange-soft);
    border-radius: 12px;
    overflow: hidden;
}
.hnh-bulk summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--hnh-ink);
    user-select: none;
}
.hnh-bulk summary::-webkit-details-marker { display: none; }
.hnh-bulk summary strong { color: var(--hnh-orange-dark); }
.hnh-bulk-tag {
    background: var(--hnh-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    border-radius: 6px;
    padding: 3px 7px;
}
.hnh-bulk-toggle {
    margin-left: auto;
    width: 8px; height: 8px;
    border-right: 2px solid var(--hnh-orange-dark);
    border-bottom: 2px solid var(--hnh-orange-dark);
    transform: rotate(45deg);
    transition: transform .2s;
}
.hnh-bulk[open] .hnh-bulk-toggle { transform: rotate(-135deg); }

.hnh-bulk-table {
    width: 100%;
    background: #fff;
    border-top: 1px solid #F9D9BC;
    border-collapse: collapse;
    font-size: 14px;
}
.hnh-bulk-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #FBE9D7;
    color: var(--hnh-ink);
}
.hnh-bulk-table tr:last-child td { border-bottom: 0; }
.hnh-bulk-table strong { color: var(--hnh-ink); }
.hnh-bulk-save {
    background: #EAF7EC;
    color: #2E7D36;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    white-space: nowrap;
}
.hnh-bulk-note {
    margin: 0;
    padding: 8px 14px 10px;
    background: #fff;
    font-size: 12px;
    color: #64748B;
}

/* ================= PHASE 4: category-card layout fixes ==================== */
/* Grid card: static layout (no slide-up), name clamped to 2 lines so every
   card is uniform and the Add button never clips. */
.hnh-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 3.05em;   /* reserve two lines so 1-line names align too */
    line-height: 1.5;
}
.hnh-card-info { border-radius: 0 0 10px 10px; }
.hnh-actions { margin-top: 2px; }

/* ==================== PHASE 5: footer address column ====================== */
.hnh-footer-address { max-width: 300px; color: #3b3b3b; line-height: 1.65; }
.hnh-footer-address h4 {
    font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--hnh-ink);
}
.hnh-footer-address p { margin: 0 0 8px; font-size: 13px; }
.hnh-footer-address a { color: var(--hnh-blue-deep); font-weight: 600; text-decoration: none; }
.hnh-footer-address a:hover { color: var(--hnh-orange-dark); }

/* ==================== PHASE 6: pincode check ============================== */
.hnh-pin-chip {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff; font-size: 12px; font-weight: 600;
    border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.hnh-pin-chip:hover { background: rgba(255,255,255,.25); }

.hnh-pin-modal {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(15,23,42,.55);
    display: none;
    align-items: center; justify-content: center; padding: 16px;
}
.hnh-pin-modal.open { display: flex; }
.hnh-pin-box {
    position: relative; background: #fff; border-radius: 16px;
    padding: 24px; width: 100%; max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.hnh-pin-box h3 { margin: 0 0 4px; font-size: 20px; color: var(--hnh-ink); }
.hnh-pin-sub { margin: 0 0 16px; font-size: 13px; color: #64748B; }
.hnh-pin-row { display: flex; gap: 10px; }
.hnh-pin-row input {
    flex: 1; border: 1.5px solid #CBD5E1; border-radius: 10px;
    padding: 12px 14px; font-size: 15px; letter-spacing: .1em;
}
.hnh-pin-row input:focus { outline: none; border-color: var(--hnh-orange); box-shadow: 0 0 0 3px rgba(240,120,32,.15); }
.hnh-pin-apply {
    background: var(--hnh-orange); color: #fff; border: 0;
    border-radius: 10px; padding: 12px 26px; font-weight: 700; cursor: pointer;
}
.hnh-pin-apply:hover:not(:disabled) { background: var(--hnh-orange-dark); }
.hnh-pin-apply:disabled { opacity: .6; }
.hnh-pin-close {
    position: absolute; top: 10px; right: 14px;
    background: none; border: 0; font-size: 26px; color: #94A3B8; cursor: pointer;
}
.hnh-pin-result { display: none; margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.hnh-pin-result.show { display: block; }
.hnh-pin-result.good { color: #15803D; }
.hnh-pin-result.bad  { color: #B91C1C; }
@media (max-width: 524px) {
    .hnh-pin-chip { padding: 4px 9px; }
}
