@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600&family=Hind+Siliguri:wght@400;500;600;700&display=swap');
@import url('tokens.css');

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-body);
    color: var(--c-ink);
    background: var(--c-surface-alt);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--sp-3); }

/* ---------- Scroll-reveal animation system ----------
   Elements with [data-reveal] start hidden/offset, then fade+slide into
   place once they enter the viewport (see initScrollReveal() in site.js).
   Respects prefers-reduced-motion via the rule above (transitions are
   killed there, so [data-reveal] elements just appear instantly). */
[data-reveal] {
    opacity: 0; transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
[data-reveal="fade"] { transform: none; }
[data-reveal-group] > * { transition-delay: calc(var(--reveal-i, 0) * 80ms); }

/* Hero loads above the fold — animate the active slide's text in immediately on load */
.hero-slide.is-active .hero-slide-overlay { opacity: 0; animation: heroIn .7s ease forwards; animation-delay: .1s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .hero-slide.is-active .hero-slide-overlay { animation: none; opacity: 1; }
}
.eyebrow {
    font-family: var(--f-body); font-weight: 600; font-size: 13px;
    letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary);
    display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--c-primary); display: inline-block; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--r-soft); font-weight: 600; font-size: 15px;
    border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
    font-family: var(--f-body);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 10px 24px rgba(223,31,38,.28); }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-outline { background: transparent; border-color: var(--c-ink); color: var(--c-ink); }
.btn-outline:hover { background: var(--c-ink); color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; backdrop-filter: blur(6px); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247,244,238,.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-line);
}
.header-row { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--sp-3); gap: var(--sp-3); }
.brand-mark { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 20px; }
.brand-mark img { height: 42px; width: auto; }
.main-nav { display: flex; gap: var(--sp-4); }
.main-nav > li { position: relative; }
.main-nav a { font-weight: 600; font-size: 15px; padding: 8px 2px; }
.main-nav a:hover { color: var(--c-primary); }
.main-nav .submenu {
    position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px;
    border-radius: var(--r-soft); box-shadow: var(--shadow-lift); padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s ease;
    border: 1px solid var(--c-line);
}
.main-nav li:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .submenu a { display: block; padding: 9px 12px; border-radius: 6px; font-weight: 500; }
.main-nav .submenu a:hover { background: var(--c-surface); }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.admin-gear-link { font-size: 18px; opacity: .55; text-decoration: none; padding: 4px; transition: opacity .15s ease; }
.admin-gear-link:hover { opacity: 1; }
.header-actions .phone { font-weight: 600; font-size: 14px; display: none; }
@media (min-width: 900px) { .header-actions .phone { display: inline-flex; align-items: center; gap: 6px; } }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
@media (max-width: 900px) {
    .main-nav { display: none; }
    .nav-toggle { display: block; }
    .main-nav.mobile-open {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--c-line);
        box-shadow: var(--shadow-lift); padding: var(--sp-2) var(--sp-3);
        max-height: calc(100vh - 70px); overflow-y: auto;
    }
    .main-nav.mobile-open > li { width: 100%; }
    .main-nav.mobile-open a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--c-line); }
    /* মোবাইলে হোভার কাজ করে না — ট্যাপ করে সাবমেনু খোলা/বন্ধ করার জন্য */
    .main-nav.mobile-open .submenu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        border: none; padding: 0 0 0 var(--sp-2); display: none; min-width: 0;
    }
    .main-nav.mobile-open li.submenu-open .submenu { display: block; }
    .main-nav.mobile-open li.submenu-open > a { color: var(--c-primary); }
}

/* ---------- Mobile header sizing (had NOT been tuned — brand name wrapped,
   header CTA button ballooned. Fixed with explicit compact sizing.) ---------- */
@media (max-width: 480px) {
    .header-row { padding: 10px var(--sp-2); gap: 8px; }
    .brand-mark { font-size: 15px; gap: 7px; white-space: nowrap; }
    .brand-mark img { height: 30px; }
    .header-actions { gap: 8px; }
    .header-actions .btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }
    .nav-toggle { font-size: 22px; padding: 2px; }
}

/* ---------- Hero: full-screen ইমেজ স্লাইডার (cubicdesign.com.bd রেফারেন্স) ---------- */
.hero-slider { position: relative; height: 100vh; min-height: 560px; max-height: 900px; overflow: hidden; background: var(--c-surface-dark); }

.hero-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; transition: opacity .8s ease; display: flex; align-items: center;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide::before {
    /* ছবির উপর গাঢ় গ্রেডিয়েন্ট — টেক্সট যেন যেকোনো ছবির উপরেই স্পষ্ট পড়া যায় */
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(20,18,17,.82) 0%, rgba(20,18,17,.5) 50%, rgba(20,18,17,.25) 100%);
}
.hero-slide-overlay {
    position: relative; z-index: 1; color: #fff; max-width: 620px;
    padding: 0 var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2);
}
@media (min-width: 960px) { .hero-slide-overlay { padding: 0 var(--sp-8, 64px); } }
.hero-slide-overlay h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; max-width: 14ch; }
.hero-slide-overlay p { font-size: 17px; color: rgba(255,255,255,.85); max-width: 46ch; margin: 0; }
.hero-cta { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }

.hero-stats {
    position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2;
    display: flex; gap: var(--sp-4); flex-wrap: wrap; color: #fff;
    padding: 0 var(--sp-4);
}
@media (min-width: 960px) { .hero-stats { padding: 0 var(--sp-8, 64px); } }
.hero-stats div strong { display: block; font-family: var(--f-display); font-size: 24px; }
.hero-stats div span { font-size: 12.5px; color: rgba(255,255,255,.7); }

.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.15); color: #fff; font-size: 24px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(2px); transition: background .15s ease;
}
.hero-nav:hover { background: rgba(255,255,255,.3); }
.hero-nav-prev { left: 16px; }
.hero-nav-next { right: 16px; }

.hero-dots {
    position: absolute; right: 20px; bottom: 30px; z-index: 2;
    display: flex; flex-direction: column; gap: 8px;
}
.hero-dots button {
    width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    background: rgba(255,255,255,.4); transition: background .15s ease, transform .15s ease;
}
.hero-dots button.is-active { background: var(--c-primary); transform: scale(1.3); }

@media (max-width: 640px) {
    .hero-slider { height: 92vh; min-height: 480px; }
    .hero-slide-overlay h1 { font-size: 28px; max-width: none; }
    .hero-slide-overlay p { font-size: 14px; }
    .hero-stats { bottom: 18px; gap: var(--sp-3); }
    .hero-stats div strong { font-size: 19px; }
    .hero-nav { width: 36px; height: 36px; font-size: 19px; }
    .hero-dots { right: 12px; bottom: 18px; }
}

/* ---------- Section heading ---------- */
.section { padding: var(--sp-6) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head .view-all { font-weight: 600; font-size: 14px; border-bottom: 2px solid var(--c-primary); padding-bottom: 2px; }

@media (max-width: 640px) {
    .section { padding: var(--sp-4) 0; }
    .section-head { margin-bottom: var(--sp-3); }
    .section-head h2 { font-size: 24px; }
}

/* ---------- Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
@media (min-width: 700px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
.cat-tile {
    position: relative; aspect-ratio: 3/4; border-radius: var(--r-soft); overflow: hidden;
    background: var(--c-surface); box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease;
}
.cat-tile:first-child { border-top-left-radius: var(--r-arch); }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cat-tile img, .cat-tile .placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile .placeholder {
    display: flex; align-items: flex-end; justify-content: center;
    background: linear-gradient(160deg, var(--c-wood), var(--c-surface-dark));
    color: rgba(255,255,255,.55); font-family: var(--f-body); font-size: 12px; text-align: center;
    padding: var(--sp-2); padding-bottom: var(--sp-5);
}
.cat-tile .cat-label {
    position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp-2);
    background: linear-gradient(0deg, rgba(28,27,26,.82), transparent);
    color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 15px;
}

/* ---------- Product image + logo watermark (used everywhere a product
   photo appears: grid cards, product detail, landing pages, cart) ---------- */
.product-img {
    position: relative; width: 100%; overflow: hidden; border-radius: var(--r-soft);
    background: var(--c-surface);
}
.product-img__photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.product-img__badge {
    position: absolute;
    width: var(--wm-size);
    opacity: var(--wm-opacity);
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
    user-select: none;
}
/* corner variants — default bottom-right, others available via a class
   on the wrapper if a client ever wants a different placement */
.product-img--br .product-img__badge { right: var(--wm-margin); bottom: var(--wm-margin); }
.product-img--bl .product-img__badge { left: var(--wm-margin); bottom: var(--wm-margin); }
.product-img--tr .product-img__badge { right: var(--wm-margin); top: var(--wm-margin); }
.product-img--tl .product-img__badge { left: var(--wm-margin); top: var(--wm-margin); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-card {
    display: block;
    background: #fff; border-radius: var(--r-soft); border: 1px solid var(--c-line);
    overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.product-card:hover .product-img__photo { transform: scale(1.06); }
.product-card .product-img { aspect-ratio: 4/3; border-radius: 0; }
.product-card-body { padding: var(--sp-2) var(--sp-2) var(--sp-3); }
.product-card .cat-tag { font-size: 12px; font-weight: 600; color: var(--c-primary); text-transform: uppercase; letter-spacing: .04em; }
.product-card h3 { font-size: 16px; margin-top: 4px; }
.product-card .price { margin-top: 8px; font-weight: 700; font-family: var(--f-display); }
.product-card .price .was { color: var(--c-ink-soft); font-weight: 400; text-decoration: line-through; font-size: 13px; margin-right: 6px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-media { border-radius: var(--r-soft); overflow: hidden; }
.about-media img { border-top-left-radius: var(--r-arch); }
.about-copy h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: var(--sp-2); }
.about-list { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.about-list li { display: flex; gap: 12px; align-items: flex-start; }
.about-list .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-primary); margin-top: 6px; flex: none; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--c-ink); color: #fff; border-radius: var(--r-arch) var(--r-soft) var(--r-soft) var(--r-soft);
    padding: var(--sp-5) var(--sp-4); display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3); flex-wrap: wrap; margin: 0 var(--sp-3);
}
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); max-width: 30ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-surface-dark); color: rgba(255,255,255,.72); margin-top: var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); padding: var(--sp-6) 0 var(--sp-4); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: var(--sp-2); }
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); padding: var(--sp-2) 0; font-size: 13px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- Inquiry modal (public site — Request a Quote / Contact) ---------- */
.inquiry-overlay {
    position: fixed; inset: 0; background: rgba(28,27,26,.55); z-index: 200;
    display: none; align-items: flex-start; justify-content: center; padding: var(--sp-4); overflow-y: auto;
}
.inquiry-overlay.open { display: flex; }
.inquiry-card { background: #fff; border-radius: var(--r-arch) var(--r-soft) var(--r-soft) var(--r-soft); padding: var(--sp-4); width: 100%; max-width: 460px; margin-top: 40px; }
.inquiry-card h3 { font-size: 20px; margin-bottom: 4px; }
.inquiry-card .sub { font-size: 13px; color: var(--c-ink-soft); margin-bottom: var(--sp-3); }
.inquiry-field { margin-bottom: var(--sp-2); }
.inquiry-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.inquiry-field input, .inquiry-field textarea {
    width: 100%; padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--c-line); font-family: var(--f-body); font-size: 14px;
}
.inquiry-field textarea { min-height: 70px; resize: vertical; }
.inquiry-actions { display: flex; gap: 10px; margin-top: var(--sp-3); }
.inquiry-msg { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: var(--sp-2); }
.inquiry-msg.success { background: #E4F3E7; color: #1E7A34; }
.inquiry-msg.error { background: #FBE4E1; color: var(--c-primary-dark); }

/* ---------- Floating WhatsApp চ্যাট উইজেট (site-wide, site.js-এ ইনজেক্ট করা) ---------- */
#floatingWhatsApp { position: fixed; right: 20px; bottom: 90px; z-index: 150; }

.fwa-toggle {
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: #25D366; box-shadow: 0 4px 16px rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease;
}
.fwa-toggle:hover { transform: scale(1.08); }
#floatingWhatsApp.open .fwa-toggle { display: none; }

.fwa-panel {
    display: none; position: absolute; right: 0; bottom: 0;
    width: 320px; border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.25); background: #fff;
    font-family: var(--f-body, sans-serif);
}
#floatingWhatsApp.open .fwa-panel { display: block; }

.fwa-header { background: #25D366; padding: 10px 12px; display: flex; justify-content: flex-end; }
.fwa-close { background: rgba(0,0,0,.15); border: none; color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }

.fwa-greeting { background: #25D366; color: #fff; padding: 4px 18px 18px; font-size: 14px; line-height: 1.6; }

.fwa-agent-msg {
    display: flex; align-items: center; gap: 10px; background: #fff; margin: -10px 14px 0; padding: 12px 14px;
    border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 14px; position: relative; z-index: 1;
}
.fwa-avatar { font-size: 20px; }

.fwa-reply-row { display: flex; gap: 8px; align-items: center; padding: 16px 14px 8px; }
.fwa-input {
    flex: 1; border: 1px solid var(--c-line, #ddd); border-radius: 20px; padding: 10px 14px;
    font-size: 13px; outline: none;
}
.fwa-input:focus { border-color: #25D366; }
.fwa-send {
    background: none; border: none; color: #25D366; font-size: 20px; cursor: pointer;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex: none;
}

.fwa-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: calc(100% - 28px); margin: 4px 14px 14px; padding: 12px; border: none; border-radius: 24px;
    background: #25D366; color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.fwa-cta:hover { filter: brightness(1.05); }

@media (max-width: 640px) {
    #floatingWhatsApp { right: 14px; bottom: 76px; }
    .fwa-toggle { width: 50px; height: 50px; }
    .fwa-toggle svg { width: 24px; height: 24px; }
    .fwa-panel { width: min(320px, calc(100vw - 28px)); }
}
