/**
 * EdiusFa Homepage — Front-page stylesheet
 * -----------------------------------------------------------------
 * Author:  Senior Performance Engineer / WP Theme Architect (Claude)
 * Scope:   Loaded ONLY on the homepage. Every rule is namespaced under
 *          `body.ediusfa-home` so it can never leak into other pages,
 *          the WP admin, or collide with your parent theme / other
 *          plugins' CSS. No !important is used anywhere.
 *
 * Install:
 *  1) Copy this file to your child theme, e.g.
 *     wp-content/themes/your-child-theme/assets/css/ediusfa-home.css
 *  2) Enqueue it ONLY on the front page (functions.php snippet is
 *     included in README-ediusfa.md), which also adds the required
 *     `ediusfa-home` body class via the `body_class` filter.
 *  3) Fonts (Vazirmatn / JetBrains Mono) must be registered with
 *     wp_enqueue_style() — do NOT use @import (bad for performance /
 *     WPCS). See README for the exact snippet.
 *
 * CSS Custom Properties are prefixed `--edfa-*` to avoid collisions
 * with theme design tokens (e.g. Twenty Twenty-Four's `--wp--*`).
 * -----------------------------------------------------------------
 */

:root{
  --edfa-bg-deep:#120F18;
    --edfa-bg-surface:#1C1726;
    --edfa-bg-surface-2:#241D32;
    --edfa-line:#332A45;
    --edfa-violet:#8B5CF6;
    --edfa-violet-dim:#6D3FD1;
    --edfa-amber:#F2A93B;
    --edfa-mint:#34D8A8;
    --edfa-text:#F3F0F8;
    --edfa-text-muted:#A89BC2;
    --edfa-text-faint:#766A8C;
    --edfa-radius:14px;
}

body.ediusfa-home *{
  margin:0;padding:0;box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body.ediusfa-home{
  background:var(--edfa-bg-deep);
    color:var(--edfa-text);
    font-family:'Vazirmatn',sans-serif;
    line-height:1.7;
    -webkit-font-smoothing:antialiased;
}

body.ediusfa-home img{
  max-width:100%;display:block;
}

body.ediusfa-home a{
  color:inherit;text-decoration:none;
}

body.ediusfa-home .mono{
  font-family:'JetBrains Mono',monospace;
}

body.ediusfa-home .container{
  max-width:1180px;margin:0 auto;padding:0 16px;
}

/* sprocket divider — signature element evoking a filmstrip */

body.ediusfa-home .sprocket{
  height:18px;
    background-image:radial-gradient(circle at 9px 9px, var(--edfa-bg-deep) 4px, transparent 4.5px);
    background-size:26px 18px;
    background-repeat:repeat-x;
    background-color:var(--edfa-bg-surface);
    opacity:.9;
}

body.ediusfa-home .sprocket.flip{
  transform:rotate(180deg);
}

/* ===== HEADER ===== */

body.ediusfa-home header.site{
  position:sticky;top:0;z-index:50;
    background:rgba(18,15,24,.92);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--edfa-line);
}

body.ediusfa-home .topbar{
  display:flex;align-items:center;justify-content:space-between;
    padding:10px 16px;gap:10px;
}

body.ediusfa-home .logo{
  display:flex;align-items:center;gap:8px;font-weight:800;font-size:1.05rem;
    color:var(--edfa-text);
}

body.ediusfa-home .logo .dot{
  width:10px;height:10px;border-radius:50%;background:var(--edfa-amber);box-shadow:0 0 12px var(--edfa-amber);
}

body.ediusfa-home .icon-btn{
  width:40px;height:40px;border-radius:10px;background:var(--edfa-bg-surface);
    border:1px solid var(--edfa-line);display:flex;align-items:center;justify-content:center;
    position:relative;
}

body.ediusfa-home .icon-btn svg{
  width:19px;height:19px;stroke:var(--edfa-text);
}

body.ediusfa-home .badge-count{
  position:absolute;top:-6px;left:-6px;background:var(--edfa-violet);color:#fff;
    font-size:10px;font-weight:700;border-radius:99px;min-width:17px;height:17px;
    display:flex;align-items:center;justify-content:center;padding:0 3px;
}

body.ediusfa-home .header-actions{
  display:flex;gap:8px;
}

body.ediusfa-home .searchbar-wrap{
  padding:0 16px 12px;
}

body.ediusfa-home .searchbar{
  display:flex;align-items:center;gap:8px;
    background:var(--edfa-bg-surface);border:1.5px solid var(--edfa-violet-dim);
    border-radius:99px;padding:11px 16px;
}

body.ediusfa-home .searchbar svg{
  width:18px;height:18px;stroke:var(--edfa-text-muted);flex-shrink:0;
}

body.ediusfa-home .searchbar input{
  background:none;border:none;outline:none;color:var(--edfa-text);
    font-family:inherit;font-size:.92rem;width:100%;
}

body.ediusfa-home .searchbar input::placeholder{
  color:var(--edfa-text-faint);
}

body.ediusfa-home .cat-strip{
  display:flex;gap:8px;overflow-x:auto;padding:0 16px 12px;
    scrollbar-width:none;
}

body.ediusfa-home .cat-strip::-webkit-scrollbar{
  display:none;
}

body.ediusfa-home .cat-chip{
  flex-shrink:0;font-size:.78rem;color:var(--edfa-text-muted);
    background:var(--edfa-bg-surface);border:1px solid var(--edfa-line);
    padding:7px 14px;border-radius:99px;white-space:nowrap;
}

body.ediusfa-home .cat-chip.active{
  background:var(--edfa-violet);color:#fff;border-color:var(--edfa-violet);
}

/* ===== SECTION 1: HERO SEARCH/DISCOVERY ===== */

body.ediusfa-home .hero{
  padding:26px 0 22px;
    background:
      radial-gradient(circle at 85% -10%, rgba(139,92,246,.25), transparent 55%),
      radial-gradient(circle at 0% 100%, rgba(242,169,59,.12), transparent 50%);
}

body.ediusfa-home .hero-eyebrow{
  display:inline-flex;align-items:center;gap:6px;
    font-size:.72rem;color:var(--edfa-amber);font-weight:600;
    background:rgba(242,169,59,.1);border:1px solid rgba(242,169,59,.3);
    padding:5px 11px;border-radius:99px;margin-bottom:14px;
}

body.ediusfa-home .hero h1{
  font-size:1.55rem;font-weight:800;line-height:1.5;margin-bottom:10px;
}

body.ediusfa-home .hero h1 span{
  color:var(--edfa-violet);
}

body.ediusfa-home .hero p{
  color:var(--edfa-text-muted);font-size:.88rem;max-width:480px;margin-bottom:18px;
}

body.ediusfa-home .hero-stats{
  display:flex;gap:18px;margin-top:18px;flex-wrap:wrap;
}

body.ediusfa-home .hero-stat b{
  font-family:'JetBrains Mono';font-size:1.15rem;color:var(--edfa-text);display:block;
}

body.ediusfa-home .hero-stat span{
  font-size:.72rem;color:var(--edfa-text-faint);
}

/* ===== SECTION HEADER (reused) ===== */

body.ediusfa-home .section{
  padding:34px 0;
}

body.ediusfa-home .section-head{
  display:flex;align-items:flex-end;justify-content:space-between;
    margin-bottom:16px;gap:10px;
}

body.ediusfa-home .section-head .label{
  font-size:.7rem;font-family:'JetBrains Mono';color:var(--edfa-violet);
    letter-spacing:.04em;display:block;margin-bottom:4px;
}

body.ediusfa-home .section-head h2{
  font-size:1.18rem;font-weight:800;
}

body.ediusfa-home .section-head p{
  font-size:.78rem;color:var(--edfa-text-faint);margin-top:3px;
}

body.ediusfa-home .see-all{
  font-size:.78rem;color:var(--edfa-violet);font-weight:600;white-space:nowrap;
}

/* ===== SECTION 2: VISUAL CATEGORY GRID ===== */

body.ediusfa-home .cat-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
}

body.ediusfa-home .cat-card{
  background:var(--edfa-bg-surface);border:1px solid var(--edfa-line);
    border-radius:var(--edfa-radius);padding:16px 8px;text-align:center;
    transition:transform .15s, border-color .15s;
}

body.ediusfa-home .cat-card .emoji{
  font-size:1.6rem;display:block;margin-bottom:8px;
}

body.ediusfa-home .cat-card .name{
  font-size:.76rem;font-weight:600;color:var(--edfa-text);
}

body.ediusfa-home .cat-card .count{
  font-size:.65rem;color:var(--edfa-text-faint);font-family:'JetBrains Mono';margin-top:2px;display:block;
}

body.ediusfa-home .cat-card:active{
  transform:scale(.96);border-color:var(--edfa-violet);
}

/* ===== PRODUCT CARD + CAROUSEL ===== */

body.ediusfa-home .scroller{
  display:flex;gap:12px;overflow-x:auto;padding-bottom:6px;
    scroll-snap-type:x mandatory;
}

body.ediusfa-home .scroller::-webkit-scrollbar{
  display:none;
}

body.ediusfa-home .pcard{
  flex:0 0 168px;scroll-snap-align:start;
    background:var(--edfa-bg-surface);border:1px solid var(--edfa-line);
    border-radius:var(--edfa-radius);overflow:hidden;
}

body.ediusfa-home .pcard .thumb{
  position:relative;aspect-ratio:4/5;background:linear-gradient(135deg,#2b2240,#3c2a4d);
    overflow:hidden;
}

body.ediusfa-home .pcard .thumb img{
  width:100%;height:100%;object-fit:cover;
}

body.ediusfa-home .pcard .play{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    background:linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.65) 100%);
}

body.ediusfa-home .pcard .play svg{
  width:30px;height:30px;opacity:.9;
}

body.ediusfa-home .pcard .badge{
  position:absolute;top:7px;right:7px;font-size:.62rem;font-weight:700;
    padding:3px 7px;border-radius:6px;font-family:'JetBrains Mono';
}

body.ediusfa-home .badge.sale{
  background:var(--edfa-amber);color:#1A1306;
}

body.ediusfa-home .badge.free{
  background:var(--edfa-mint);color:#06231a;
}

body.ediusfa-home .badge.new{
  background:var(--edfa-violet);color:#fff;
}

body.ediusfa-home .pcard .timecode{
  position:absolute;bottom:7px;left:7px;background:rgba(0,0,0,.55);
    color:#fff;font-size:.62rem;font-family:'JetBrains Mono';padding:2px 6px;border-radius:5px;
}

body.ediusfa-home .pcard .body{
  padding:10px;
}

body.ediusfa-home .pcard .title{
  font-size:.78rem;font-weight:600;color:var(--edfa-text);
    overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    min-height:2.6em;margin-bottom:8px;
}

body.ediusfa-home .pcard .meta{
  display:flex;align-items:center;justify-content:space-between;
}

body.ediusfa-home .price-tc{
  font-family:'JetBrains Mono';font-weight:700;font-size:.85rem;color:var(--edfa-amber);
}

body.ediusfa-home .price-tc .old{
  font-size:.65rem;color:var(--edfa-text-faint);text-decoration:line-through;
    display:block;font-weight:500;margin-bottom:1px;
}

body.ediusfa-home .stars{
  font-size:.65rem;color:var(--edfa-amber);
}

/* ===== FREE PRODUCTS ===== */

body.ediusfa-home .free-section{
  background:linear-gradient(135deg, rgba(52,216,168,.08), rgba(52,216,168,0));
    border:1px solid rgba(52,216,168,.25);border-radius:18px;padding:20px 16px;
}

body.ediusfa-home .free-section .section-head h2{
  color:var(--edfa-mint);
}

/* ===== SEASONAL ===== */

body.ediusfa-home .season-banner{
  position:relative;border-radius:var(--edfa-radius);overflow:hidden;
    aspect-ratio:16/8;background:linear-gradient(120deg,#3a1f55,#1c1230);
    display:flex;align-items:flex-end;padding:16px;flex:0 0 240px;scroll-snap-align:start;
}

body.ediusfa-home .season-banner .tag{
  font-size:.68rem;font-family:'JetBrains Mono';color:var(--edfa-amber);margin-bottom:4px;display:block;
}

body.ediusfa-home .season-banner h3{
  font-size:1rem;font-weight:800;color:#fff;
}

/* ===== EDUCATIONAL ===== */

body.ediusfa-home .edu-card{
  display:flex;gap:10px;background:var(--edfa-bg-surface);border:1px solid var(--edfa-line);
    border-radius:12px;padding:10px;align-items:center;
}

body.ediusfa-home .edu-card .thumb-sm{
  width:64px;height:64px;border-radius:9px;background:#2b2240;flex-shrink:0;overflow:hidden;
}

body.ediusfa-home .edu-card .thumb-sm img{
  width:100%;height:100%;object-fit:cover;
}

body.ediusfa-home .edu-card h4{
  font-size:.82rem;font-weight:600;margin-bottom:3px;
}

body.ediusfa-home .edu-card span{
  font-size:.68rem;color:var(--edfa-text-faint);font-family:'JetBrains Mono';
}

body.ediusfa-home .edu-list{
  display:flex;flex-direction:column;gap:10px;
}

/* ===== TRUST ===== */

body.ediusfa-home .trust-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:12px;
}

body.ediusfa-home .trust-item{
  background:var(--edfa-bg-surface);border:1px solid var(--edfa-line);border-radius:var(--edfa-radius);
    padding:16px 12px;text-align:center;
}

body.ediusfa-home .trust-item b{
  font-family:'JetBrains Mono';font-size:1.4rem;color:var(--edfa-violet);display:block;
}

body.ediusfa-home .trust-item span{
  font-size:.72rem;color:var(--edfa-text-faint);
}

/* ===== CTA TELEGRAM ===== */

body.ediusfa-home .cta-band{
  background:linear-gradient(135deg, var(--edfa-violet-dim), #4527A0);
    border-radius:18px;padding:22px 18px;text-align:center;
}

body.ediusfa-home .cta-band h3{
  color:#fff;font-size:1.1rem;font-weight:800;margin-bottom:6px;
}

body.ediusfa-home .cta-band p{
  color:rgba(255,255,255,.78);font-size:.82rem;margin-bottom:16px;
}

body.ediusfa-home .cta-buttons{
  display:flex;gap:10px;justify-content:center;flex-wrap:wrap;
}

body.ediusfa-home .btn{
  display:inline-flex;align-items:center;gap:6px;font-size:.82rem;font-weight:700;
    padding:11px 20px;border-radius:10px;border:none;cursor:pointer;
}

body.ediusfa-home .btn-amber{
  background:var(--edfa-amber);color:#1A1306;
}

body.ediusfa-home .btn-ghost{
  background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.3);
}

/* ===== FOOTER ===== */

body.ediusfa-home footer{
  background:var(--edfa-bg-surface);border-top:1px solid var(--edfa-line);padding:30px 0 90px;
}

body.ediusfa-home .footer-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:24px;
}

body.ediusfa-home .footer-col h5{
  font-size:.82rem;font-weight:700;margin-bottom:10px;color:var(--edfa-text);
}

body.ediusfa-home .footer-col a{
  display:block;font-size:.78rem;color:var(--edfa-text-muted);margin-bottom:8px;
}

body.ediusfa-home .footer-bottom{
  border-top:1px solid var(--edfa-line);padding-top:16px;
    font-size:.72rem;color:var(--edfa-text-faint);text-align:center;
}

/* ===== MOBILE BOTTOM NAV ===== */

body.ediusfa-home .bottom-nav{
  position:fixed;bottom:0;left:0;right:0;z-index:60;
    background:rgba(28,23,38,.96);backdrop-filter:blur(10px);
    border-top:1px solid var(--edfa-line);
    display:flex;justify-content:space-around;padding:8px 0 calc(8px + env(safe-area-inset-bottom));
}

body.ediusfa-home .nav-item{
  display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--edfa-text-faint);font-size:.62rem;
}

body.ediusfa-home .nav-item svg{
  width:20px;height:20px;
}

body.ediusfa-home .nav-item.active{
  color:var(--edfa-violet);
}

@media (min-width:760px){
  body.ediusfa-home .bottom-nav{
    display:none;
  }
  body.ediusfa-home footer{
    padding-bottom:30px;
  }
  body.ediusfa-home .cat-grid{
    grid-template-columns:repeat(6,1fr);
  }
  body.ediusfa-home .hero h1{
    font-size:2.1rem;
  }
  body.ediusfa-home .footer-grid{
    grid-template-columns:repeat(4,1fr);
  }
  body.ediusfa-home .section-head h2{
    font-size:1.4rem;
  }
}

/* ===================================================================
   WOOCOMMERCE PRODUCT LOOP OVERRIDE
   -------------------------------------------------------------------
   Sections 3 (Best sellers), 4 (Newest) and 5 (Free downloads) use
   the REAL WooCommerce [products] shortcode via Elementor's native
   "Shortcode" widget (works with free Elementor — no Pro required).
   WooCommerce renders its own markup (ul.products > li.product), so
   we restyle that real markup to visually match the original .pcard
   design instead of faking it with static HTML.

   Wrap the Shortcode widget's parent Section/Container with the CSS
   class `edfa-wc-scroller` (already set in the supplied Elementor
   JSON) to get the same horizontal snap-scroll behaviour as the
   original design's .scroller.
   =================================================================== */

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:0 0 6px;
  margin:0;
  list-style:none;
  scroll-snap-type:x mandatory;
}
body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products::-webkit-scrollbar{display:none;}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product{
  flex:0 0 168px;
  scroll-snap-align:start;
  background:var(--edfa-bg-surface);
  border:1px solid var(--edfa-line);
  border-radius:var(--edfa-radius);
  overflow:hidden;
  margin:0 !important; /* neutralising WooCommerce's inline grid margin only, still scoped */
  padding:0;
  text-align:right;
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product img{
  aspect-ratio:4/5;
  width:100%;
  height:auto;
  object-fit:cover;
  display:block;
  background:linear-gradient(135deg,#2b2240,#3c2a4d);
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:.78rem;
  font-weight:600;
  color:var(--edfa-text);
  padding:10px 10px 4px;
  margin:0;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  min-height:2.6em;
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .price{
  display:block;
  padding:0 10px 10px;
  font-family:'JetBrains Mono',monospace;
  font-weight:700;
  font-size:.85rem;
  color:var(--edfa-amber);
}
body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .price del{
  display:block;
  font-size:.65rem;
  color:var(--edfa-text-faint);
  text-decoration:line-through;
  font-weight:500;
  opacity:1;
}
body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .price ins{
  text-decoration:none;
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .star-rating{
  display:none; /* re-enabled compactly below if you enable reviews */
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product .onsale{
  position:absolute;
  top:7px; right:7px;
  left:auto;
  background:var(--edfa-amber);
  color:#1A1306;
  font-size:.62rem;
  font-weight:700;
  font-family:'JetBrains Mono',monospace;
  padding:3px 7px;
  border-radius:6px;
  min-width:0;
  height:auto;
  line-height:1.4;
}

body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product{
  position:relative;
}

/* "Free" price text (price = 0) rendered as mint like the source design */
body.ediusfa-home .edfa-wc-scroller.edfa-free-scroller .woocommerce ul.products li.product .price{
  color:var(--edfa-mint);
}

/* Hide WooCommerce's default add-to-cart button in the compact card;
   the whole card is already a link to the product page. */
body.ediusfa-home .edfa-wc-scroller .woocommerce ul.products li.product a.button{
  display:none;
}
