/* Ecommerce storefront (/ecommerce) — styled after the Deval Enterprise product pages.
   Scoped with the ec- prefix so the digital-card admin UI is not affected. */
:root {
    --ec-blue: #0b5ca8;
    --ec-blue-dark: #063f76;
    --ec-blue-light: #1a86d9;
    --ec-green: #23a24a;
    --ec-green-dark: #1c8a3e;
    --ec-orange: #f07c13;
    --ec-sky: #eaf3fb;
    --ec-ink: #12263f;
    --ec-muted: #5b7186;
    --ec-line: #e6eef7;
}

body.ec-page.bg-light { background-color: #fff !important; }
body.ec-page > nav.navbar { display: none; }   /* dark admin bar is not needed on the public store */
body.ec-page, body.ec-page .container { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body.ec-page { color: var(--ec-ink); }
body.ec-page h1, body.ec-page h2, body.ec-page h3, body.ec-page h4 { font-family: 'Poppins', system-ui, sans-serif; letter-spacing: -.01em; }

/* ───────── page banner ───────── */
.ec-banner { background: linear-gradient(120deg, var(--ec-blue-dark), var(--ec-blue)); color: #fff; padding: 3.2rem 0; }
.ec-banner h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin: 0 0 .4rem; color: #fff; line-height: 1.2; }
.ec-crumbs { font-size: 1rem; color: #fff; margin: 0; display: flex; flex-wrap: wrap; gap: 0; }
.ec-crumbs a { color: #cfe4f6; text-decoration: none; }
.ec-crumbs a:hover { color: #fff; }
.ec-crumbs .sep { color: #9cc6e8; margin: 0 .55rem; }

/* ───────── heading row, search, categories ───────── */
.ec-eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ec-green); margin-bottom: .35rem; }
.ec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2.6rem 0 1.4rem; }
.ec-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; margin: 0; }
.ec-head-right { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ec-count { color: var(--ec-muted); font-size: .9rem; }
.ec-pill-outline {
    display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--ec-blue); color: var(--ec-blue); background: #fff; border-radius: 999px;
    padding: .4rem 1.05rem; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; transition: .2s; font-family: inherit;
}
.ec-pill-outline:hover { background: var(--ec-blue); color: #fff; }
.ec-search { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #d7e5f2; border-radius: 999px; padding: .3rem .3rem .3rem 1rem; max-width: 560px; margin-bottom: 1.6rem; }
.ec-search > i { color: var(--ec-muted); }
.ec-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .5rem .3rem; font-size: .95rem; color: var(--ec-ink); font-family: inherit; }
.ec-search .ec-clear { color: var(--ec-muted); font-size: .82rem; text-decoration: none; white-space: nowrap; padding: 0 .4rem; }
.ec-search button { border: 0; border-radius: 999px; padding: .55rem 1.4rem; font-weight: 600; background: var(--ec-blue); color: #fff; cursor: pointer; font-family: inherit; }
.ec-search button:hover { background: var(--ec-blue-dark); }

.ec-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .75rem; margin-bottom: 2.2rem; }
.ec-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .55rem; padding: .85rem .5rem; min-height: 112px; text-align: center;
    background: #fff; border: 1px solid var(--ec-line); border-radius: .9rem; color: var(--ec-blue-dark); text-decoration: none; font-weight: 600; font-size: .82rem; line-height: 1.25; transition: .2s;
}
.ec-tile:hover { border-color: var(--ec-blue); box-shadow: 0 10px 24px rgba(11, 92, 168, .12); transform: translateY(-2px); color: var(--ec-blue-dark); }
.ec-tile.active { background: var(--ec-sky); border-color: var(--ec-blue); }
.ec-tile .ic { width: 54px; height: 54px; border-radius: 50%; background: var(--ec-sky); color: var(--ec-blue); display: grid; place-items: center; font-size: 1.2rem; overflow: hidden; flex: 0 0 54px; }
.ec-tile .ic img { width: 100%; height: 100%; object-fit: cover; }
.ec-tile.all { justify-content: center; }

/* ───────── group (category) heading ───────── */
.ec-group { margin-top: 2.2rem; }
.ec-group-title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.ec-group-title .fi { width: 34px; height: 34px; border-radius: .6rem; background: var(--ec-sky); color: var(--ec-blue); display: grid; place-items: center; }
.ec-group-title h3 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.ec-group-title .n { font-size: .72rem; font-weight: 700; background: #f1f5f9; color: var(--ec-ink); border-radius: 999px; padding: .15rem .55rem; }

/* ───────── product cards ───────── */
.ec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.ec-card {
    background: #fff; border: 1px solid var(--ec-line); border-radius: 1rem; overflow: hidden; display: flex; flex-direction: column; height: 100%; position: relative; transition: .25s;
}
.ec-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(11, 92, 168, .14); }
.ec-media { position: relative; height: 210px; background: var(--ec-sky); overflow: hidden; display: grid; place-items: center; }
.ec-media .carousel, .ec-media .carousel-inner, .ec-media .carousel-item { height: 100%; width: 100%; }
.ec-media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; cursor: pointer; display: block; }
.ec-media.ec-noimg::after, .ec-media.ec-empty::after {
    content: "\f466"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.8rem; color: #b9d4ea;
}
.ec-media .carousel-control-prev, .ec-media .carousel-control-next { width: 14%; opacity: .9; }
.ec-media .carousel-control-prev-icon, .ec-media .carousel-control-next-icon { width: 1.5rem; height: 1.5rem; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); opacity: .85; }
.ec-image-count { position: absolute; right: .7rem; bottom: .6rem; z-index: 3; padding: .25rem .6rem; border-radius: 999px; color: #fff; background: rgba(41, 55, 72, .78); font-size: .72rem; font-weight: 600; }
.ec-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.ec-chip {
    display: block; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ec-blue); background: var(--ec-sky); border-radius: 2rem;
    padding: .3rem .8rem; margin-bottom: .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0 0 .15rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.7em; }
.ec-title a { color: var(--ec-ink); text-decoration: none; }
.ec-title a:hover { color: var(--ec-blue); }
.ec-meta { color: var(--ec-muted); font-size: .85rem; margin-bottom: .1rem; }
.ec-by { color: var(--ec-muted); font-size: .78rem; margin-bottom: .2rem; }
.ec-by i { color: var(--ec-blue-light); margin-right: .25rem; }
.ec-price { color: var(--ec-green); font-weight: 700; font-size: 1.05rem; margin: .25rem 0 .7rem; }
.ec-price.ec-ask { color: var(--ec-muted); font-size: .85rem; font-weight: 600; }
.ec-actions { display: flex; gap: .5rem; margin-top: auto; align-items: center; }
.ec-actions form { flex: 1; margin: 0; }
.ec-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 999px; padding: .5rem 1rem; font-weight: 600; font-size: .9rem;
    text-decoration: none; cursor: pointer; transition: .2s; width: 100%; font-family: inherit; line-height: 1.4;
}
.ec-btn-primary { background: var(--ec-blue); color: #fff; }
.ec-btn-primary:hover { background: var(--ec-blue-dark); color: #fff; box-shadow: 0 8px 18px rgba(11, 92, 168, .28); }
.ec-btn-ghost { background: #fff; color: var(--ec-blue); border-color: var(--ec-blue); }
.ec-btn-ghost:hover { background: var(--ec-blue); color: #fff; }
.ec-btn-wa { width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border-radius: .5rem; background: var(--ec-green-dark); color: #fff; font-size: 1.05rem; }
.ec-btn-wa:hover { background: var(--ec-green); color: #fff; }
.ec-btn-green { background: var(--ec-green-dark); color: #fff; border-radius: .6rem; }
.ec-btn-green:hover { background: var(--ec-green); color: #fff; }
.ec-btn-lg { padding: .7rem 1.5rem; font-size: 1.05rem; width: auto; }

.ec-empty-state { text-align: center; background: var(--ec-sky); border-radius: 1rem; padding: 3.5rem 1.2rem; color: var(--ec-muted); }
.ec-empty-state i { font-size: 2.4rem; color: #9cc6e8; margin-bottom: .9rem; }

/* floating WhatsApp button (as on the reference site) */
.ec-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 1500; width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: #fff; font-size: 1.7rem;
    display: grid; place-items: center; text-decoration: none; box-shadow: 0 8px 22px rgba(37, 211, 102, .45); transition: transform .2s;
}
.ec-fab:hover { transform: scale(1.08); color: #fff; }

/* ───────── pagination ───────── */
.ec-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin: 2.6rem 0 .5rem; }
.ec-pager a { min-width: 40px; height: 40px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; border: 1px solid #d7e5f2; color: var(--ec-ink); font-weight: 600; text-decoration: none; font-size: .9rem; }
.ec-pager a:hover { border-color: var(--ec-blue); color: var(--ec-blue); }
.ec-pager .active { background: var(--ec-blue); border-color: var(--ec-blue); color: #fff; }
.ec-pager .disabled { opacity: .45; pointer-events: none; }

/* ───────── product details ───────── */
.ec-detail { padding: 2.6rem 0 1rem; }
.ec-gallery-card { background: #fff; border: 1px solid var(--ec-line); border-radius: 1rem; overflow: hidden; box-shadow: 0 8px 28px rgba(11, 92, 168, .07); }
.ec-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ec-green); margin-bottom: .45rem; }
.ec-info h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; line-height: 1.2; margin: 0 0 .6rem; color: var(--ec-ink); }
.ec-info .ec-model { color: var(--ec-muted); margin-bottom: 1.1rem; }
.ec-info .ec-model strong { color: #4b5f73; }
.ec-price-lg { color: var(--ec-green); font-weight: 700; font-size: 1.9rem; margin: .4rem 0 1.1rem; }
.ec-seller-line { color: var(--ec-muted); font-size: .9rem; margin-bottom: .9rem; }
.ec-seller-line i { color: var(--ec-blue-light); margin-right: .4rem; }
.ec-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; margin-top: 1.1rem; }
.ec-stack form { margin: 0; }
.ec-section { background: #fff; border: 1px solid var(--ec-line); border-radius: 1rem; padding: 1.5rem 1.6rem; margin-top: 1.6rem; }
.ec-section h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .7rem; }
.ec-section p { color: #475569; margin: 0; white-space: pre-line; line-height: 1.7; }
.ec-vlabel { font-weight: 600; font-size: .9rem; margin: 1rem 0 .5rem; display: block; }

/* variants + gallery (hooks used by the page script keep their class/id names) */
.dv-variant-option { border: 1.5px solid var(--ec-line); border-radius: .8rem; padding: .45rem .75rem; cursor: pointer; background: #fff; transition: .15s; }
.dv-variant-option:hover { border-color: #9cc6e8; }
.dv-variant-option.selected { border-color: var(--ec-blue); background: var(--ec-sky); box-shadow: 0 0 0 3px rgba(11, 92, 168, .12); }
.dv-variant-option img { width: 42px; height: 42px; object-fit: cover; border-radius: .5rem; }
.dv-detail-gallery { display: flex; gap: 1rem; padding: 1rem; min-height: 440px; }
.dv-detail-thumbnails { display: flex; flex-direction: column; gap: .6rem; width: 70px; flex: 0 0 70px; overflow-y: auto; }
.dv-detail-thumbnail { width: 66px; height: 66px; padding: 3px; border: 1px solid #dbe6f1; border-radius: .5rem; background: #fff; cursor: pointer; transition: .15s; }
.dv-detail-thumbnail:hover { border-color: #9cc6e8; }
.dv-detail-thumbnail.active { border: 2px solid var(--ec-ink); }
.dv-detail-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.dv-video-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #12263f; color: #fff; font-size: 1.2rem; border-radius: .4rem; }
.dv-detail-main-image { height: min(62vw, 540px); object-fit: contain; }
.dv-detail-video { background: #0b1320; object-fit: contain; }

@media (max-width: 767.98px) {
    .ec-banner { padding: 2.2rem 0; }
    .ec-head { margin-top: 1.8rem; }
    .ec-search { max-width: none; }
    .ec-section { padding: 1.2rem; }
    .ec-detail { padding-top: 1.6rem; }
}
@media (max-width: 575.98px) {
    .ec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .ec-media { height: 150px; }
    .ec-body { padding: .75rem .75rem .9rem; }
    .ec-title { font-size: .88rem; }
    .ec-price { font-size: .95rem; }
    .ec-btn { padding: .42rem .5rem; font-size: .8rem; }
    .ec-btn-primary i { display: none; }
    .ec-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dv-detail-gallery { display: block; min-height: 0; padding: .8rem; }
    .dv-detail-thumbnails { flex-direction: row; width: 100%; margin-bottom: .6rem; overflow-x: auto; overflow-y: hidden; }
    .dv-detail-thumbnail { flex: 0 0 60px; width: 60px; height: 60px; }
    .dv-detail-main-image { height: min(76vw, 420px); }
    .ec-fab { right: 14px; bottom: 14px; }
}
.ec-title { margin-bottom: .35rem; }
.ec-body > .ec-title:first-child { margin-top: .15rem; }

/* lazy loading of the next batch while scrolling */
.ec-more { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 2.2rem 0 1rem; color: var(--ec-muted); font-size: .9rem; }
.ec-more [hidden] { display: none !important; }
.ec-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d7e5f2; border-top-color: var(--ec-blue); animation: ecSpin .8s linear infinite; }
@keyframes ecSpin { to { transform: rotate(360deg); } }


/* cards fade/slide in one by one while scrolling (same effect as the reference site's .dv-reveal) */
.ec-reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.ec-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ec-reveal { opacity: 1; transform: none; transition: none; } }

/* sub-heading above the brand tiles */
.ec-subhead { margin: 0 0 .7rem; }

/* dots under multi-photo cards */
.ec-dots { margin: 0 0 .4rem; z-index: 3; }
.ec-dots [data-bs-target] { width: 7px; height: 7px; margin: 0 3px; padding: 0; border: 0; border-radius: 50%; background-color: #7d8da0; opacity: .55; }
.ec-dots .active { background-color: var(--ec-blue, #0d6efd); opacity: 1; }

/* privacy policy page */
.policy-page { padding: 2.5rem 0 3.5rem; background: var(--ec-sky, #f4f8fc); }
.policy-container { max-width: 1000px; margin: 0 auto; background: #fff; padding: 2.4rem; border-radius: 1rem; box-shadow: 0 2px 14px rgba(20, 40, 70, .07); line-height: 1.75; color: #3b4a5a; }
.policy-container h2 { font-size: 1.25rem; font-weight: 700; color: #192839; margin: 2rem 0 .7rem; }
.policy-container ul { padding-left: 1.3rem; }
.policy-container li { margin-bottom: .45rem; }
.policy-container a { color: var(--ec-blue, #0b5ca8); }
.policy-updated { color: var(--ec-muted, #6b7a8a); font-size: .9rem; margin-bottom: 1.2rem; }
.policy-contact { list-style: none; padding-left: 0 !important; }
.policy-contact i { width: 1.4rem; color: var(--ec-blue, #0b5ca8); }
@media (max-width: 575.98px) { .policy-container { padding: 1.4rem 1.1rem; } }
