/* ====================================================
   {{$settings?->farsi_name}} — استایل قالب فروشگاهی (شبیه دیجی‌کالا)
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root{
    --red: #ed1b34;
    --red-dark: #c8102e;
    --red-soft: #fdecee;
    --orange: #ff6f1e;
    --yellow: #ffb800;
    --green: #1fa451;
    --bg: #f3f4f6;
    --white: #ffffff;
    --text: #1c1c1e;
    --text-muted: #767b87;
    --border: #e7e8ec;
    --radius-sm: 4px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(20,20,30,.08);
    --shadow-md: 0 4px 14px rgba(20,20,30,.10);
    --container: 1260px;
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; overflow-x:hidden; }
body{
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--white);
    color: var(--text);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    max-width:100vw;
}
a{ text-decoration:none; color:inherit; }
ul{ list-style:none; margin:0; padding:0; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; border:none; background:none; cursor:pointer; }
input, select{ font-family:inherit; }

.container{
    width:100%;
    max-width:var(--container);
    margin:0 auto;
    padding:0 16px;
}

/* ===================== TOP PROMO BAR (ticker) ===================== */
.top-promo-bar{
    background: linear-gradient(90deg,#15257a,#1d36a8 50%,#15257a);
    height:36px; overflow:hidden; position:relative;
}
.tpb-track{
    display:flex; width:max-content; height:100%;
    animation: tpb-scroll 18s linear infinite;
    direction:ltr;
}
.top-promo-bar:hover .tpb-track{ animation-play-state: paused; }
@keyframes tpb-scroll{
    0%{ transform: translateX(0); }
    100%{ transform: translateX(-50%); }
}
.tpb-item{
    display:flex; align-items:center; gap:10px; height:36px;
    padding:0 36px; white-space:nowrap; direction:rtl;
    color:#fff; font-size:12.5px; font-weight:600;
}
.tpb-item i{ font-size:13px; color:#ffd76a; }
.tpb-cta{
    background:linear-gradient(90deg,#0b5345,#137a63);
    color:#ffd76a; padding:4px 14px; border-radius:20px; font-weight:700;
    border:1px solid rgba(255,255,255,.25); font-size:11.5px;
}

/* ===================== HEADER ===================== */
.site-header{ background:var(--white); position:relative; z-index:50; }

.main-header{ border-bottom:1px solid var(--border); }
.main-header-inner{
    display:flex; align-items:center; gap:24px;
    height:78px;
}
.logo{
    font-size:23px; font-weight:800; color:var(--red); flex-shrink:0; white-space:nowrap;
    max-width:170px; overflow:hidden;
}
.logo img{ max-width:100%; width:auto; object-fit:contain; display:block; }
.logo span{ color:var(--text); }

.search-form{
    flex:1; display:flex; align-items:center;
    border:1.5px solid var(--border); border-radius:var(--radius); overflow:hidden; height:42px;
    max-width:680px;
}
.search-form:focus-within{ border-color: var(--red); }
.search-form input{
    flex:1; border:none; outline:none; padding:0 14px; font-size:14px; height:100%; background:#fafafb;
}
.search-form button{
    background:var(--red); color:#fff; height:100%; width:50px; display:flex; align-items:center; justify-content:center; font-size:15px;
}

.header-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.hdr-icon-btn{
    width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    color:#3a3d46; font-size:17px; position:relative;
}
.hdr-icon-btn:hover{ background:#f5f5f7; color:var(--red); }
.hdr-icon-btn .badge{
    position:absolute; top:-2px; left:-2px; background:var(--red); color:#fff; font-size:10px;
    width:16px; height:16px; border-radius:50%; display:flex; align-items:center; justify-content:center;
}
.login-btn{
    display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:8px;
    padding:8px 16px; font-size:13px; font-weight:600; color:var(--text); white-space:nowrap;
}
.login-btn:hover{ border-color:var(--red); color:var(--red); }

/* ===================== NAV ROW (links + categories + address) ===================== */
.nav-row{ background:#fff; border-bottom:1px solid var(--border); }
.nav-row-inner{ display:flex; align-items:center; gap:24px; height:46px; }
.cats-btn{
    display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:700; color:var(--text);
    flex-shrink:0;
}
.nav-links{ display:flex; gap:22px; overflow-x:auto; flex:1; scrollbar-width:none; }
.nav-links::-webkit-scrollbar{ display:none; }
.nav-links li a{ font-size:13px; color:#44464e; white-space:nowrap; }
.nav-links li a:hover{ color:var(--red); }
.address-btn{
    display:flex; align-items:center; gap:6px; border:1px solid #ffd9c2; background:#fff7f2;
    color:var(--orange); border-radius:20px; padding:6px 14px; font-size:12.5px; font-weight:600;
    flex-shrink:0; white-space:nowrap;
}

/* ===================== STORIES ROW ===================== */
.stories-row{
    display:flex; gap:18px; overflow-x:auto; padding:18px 16px; max-width:var(--container); margin:0 auto;
    scrollbar-width:none;
}
.stories-row::-webkit-scrollbar{ display:none; }
.story-item{ display:flex; flex-direction:column; align-items:center; gap:8px; width:80px; flex-shrink:0; text-align:center; }
.story-avatar{
    width:68px; height:68px; border-radius:50%; overflow:hidden; border:2px solid var(--red-soft); padding:2px;
    display:block;
}
.story-avatar img{ width:100%; height:100%; object-fit:cover; border-radius:50%; }
.story-avatar {display: inline-block;padding: 2px;border-radius: 50%;background: linear-gradient(45deg, #d62976, #962fbf, #4f5bd5);}
.story-label{ font-size:10.5px; color:var(--text); line-height:1.5; }

/* ===================== HERO (single banner) ===================== */
.hero-single{ margin-top:6px; }
.hero-slide-wrap{ position:relative; }
.hero-slide{
    position:relative; display:block; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
}
.hero-slide img{ width:100%; aspect-ratio:16/5; object-fit:cover; display:block; }
.hero-slide img.hero-slide-img--mobile{ display:none; }
.hero-text{ position:absolute; right:40px; bottom:40px; max-width:340px; }
.hero-text h2{ font-size:24px; margin:0 0 16px; line-height:1.7; color:#1c1c1e; }
.hero-btn{
    display:inline-block; background:#1c1c1e; color:#fff; padding:10px 26px; border-radius:8px;
    font-size:14px; font-weight:600;
}
.hero-dots{ position:absolute; bottom:16px; left:50%; transform:translateX(-50%); display:flex; gap:6px; }
.hd{ width:6px; height:6px; border-radius:50%; background:rgba(0,0,0,.25); padding:0; }
.hd.active{ background:#1c1c1e; width:18px; border-radius:3px; }

/* ===================== QUICK LINKS ROW (colored circles) ===================== */
.quick-links-row{ display:flex; gap:8px; overflow-x:auto; padding:18px 4px; scrollbar-width:none; }
.quick-links-row::-webkit-scrollbar{ display:none; }
.ql-item{ display:flex; flex-direction:column; align-items:center; gap:8px; width:82px; flex-shrink:0; font-size:11px; text-align:center; color:var(--text); }
.ql-circle{ width:58px; height:58px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:21px; }
.ql-c1{ background:#9aa0ab; } .ql-c2{ background:#e23744; } .ql-c3{ background:#ff6f1e; }
.ql-c4{ background:#3366ff; } .ql-c5{ background:#caa14a; } .ql-c6{ background:#1fa451; }
.ql-c7{ background:#ff9e2c; } .ql-c8{ background:#6b4fd6; } .ql-c9{ background:#27ae60; }

/* ===================== SECTION HEAD (generic) ===================== */
.section-head{ display:flex; align-items:center; justify-content:space-between; margin:26px 0 14px; }
.section-title{ display:flex; align-items:center; gap:10px; }
.section-title i{ color:var(--red); font-size:18px; }
.section-title h3{ font-size:18px; margin:0; font-weight:700; }
.see-all{ font-size:13px; color:var(--red); display:flex; align-items:center; gap:4px; font-weight:600; }

/* ===================== FLASH SALE CARD (combined) ===================== */
.flash-card{
    display:flex; background:#fff; border:1px solid #fde2e5; border-radius:var(--radius);
    overflow:hidden; margin-top:22px; box-shadow:var(--shadow);
}
.flash-panel{
    width:160px; flex-shrink:0; background:linear-gradient(160deg,#ed1b34,#c8102e); color:#fff;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
    padding:18px 10px; text-align:center;
}
.flash-icon{ font-size:24px; }
.flash-panel h3{ font-size:14.5px; margin:0; }
.flash-countdown{ background:rgba(0,0,0,.18); padding:5px 10px; border-radius:6px; font-size:14px; font-weight:700; direction:ltr; }
.flash-more{ color:#fff; font-size:11.5px; display:flex; align-items:center; gap:4px; text-decoration:underline; }
.flash-products{ flex:1; display:flex; gap:0; padding:10px; overflow-x:auto; scrollbar-width:thin; }
.flash-tile{ min-width:150px; flex-shrink:0; position:relative; text-align:center; padding:10px; }
.flash-tile .disc{
    position:absolute; top:6px; right:6px; background:var(--red); color:#fff; font-size:11px;
    border-radius:var(--radius-sm); padding:2px 6px; font-weight:700;
}
.flash-tile .ft-img{ height:96px; display:flex; align-items:center; justify-content:center; margin-bottom:8px; }
.flash-tile .ft-img img{ max-height:96px; object-fit:contain; margin:0 auto; }
.flash-tile .ft-title{ font-size:12px; line-height:1.6; height:38px; overflow:hidden; display:block; color:var(--text); }
.flash-tile .ft-price{ font-size:13.5px; font-weight:700; margin-top:6px; }
.flash-tile .ft-old{ font-size:11px; color:var(--text-muted); text-decoration:line-through; display:block; }

/* ===================== PROMO BANNER ROW (4 cols) ===================== */
.banner-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:26px; }
.banner-row a{ border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); display:block; position:relative; }
.banner-row img{ width:100%; height:150px; object-fit:cover; }
.banner-row .br-label{
    position:absolute; right:12px; bottom:10px; color:#fff; font-size:12.5px; font-weight:700;
    text-shadow:0 2px 6px rgba(0,0,0,.45);
}

/* ===================== PRODUCT GRID ===================== */
.product-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.product-card{
    background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow); position:relative;
    padding:14px; transition:box-shadow .15s, transform .15s;
}
.product-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.discount-badge{
    position:absolute; top:12px; right:12px; background:var(--red); color:#fff; font-size:12px; font-weight:700;
    padding:3px 8px; border-radius:var(--radius-sm); z-index:2;
}
.wishlist-btn{
    position:absolute; top:10px; left:10px; width:30px; height:30px; border-radius:50%; background:#fff;
    display:flex; align-items:center; justify-content:center; color:#9a9da6; box-shadow:var(--shadow); z-index:2;
}
.wishlist-btn:hover{ color:var(--red); }
.product-img{ height:140px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.product-img img{ max-height:140px; object-fit:contain; margin:0 auto; }
.product-title{ font-size:13.5px; line-height:1.7; display:block; height:46px; overflow:hidden; color:var(--text); font-weight:500; }
.product-rating{ display:flex; align-items:center; gap:6px; margin:8px 0; font-size:12px; }
.stars{ color:var(--yellow); letter-spacing:1px; font-size:13px; }
.rating-count{ color:var(--text-muted); }
.product-price{ display:flex; flex-direction:column; gap:3px; }
.old-price{ font-size:12px; color:var(--text-muted); text-decoration:line-through; }
.new-price{ font-size:15px; font-weight:700; color:var(--text); }
.new-price small{ font-size:11px; font-weight:400; color:var(--text-muted); }

/* ===================== CATEGORY GRID SECTION ===================== */
.category-grid-section{ margin-top:34px; }
.cgs-title{ font-size:17px; font-weight:700; margin:0 0 18px; }
.category-grid{ display:grid; grid-template-columns:repeat(9,1fr); gap:18px 6px; }
.cg-item{ display:flex; flex-direction:column; align-items:center; gap:10px; font-size:11px; text-align:center; color:var(--text); }
.cg-icon{
    width:62px; height:62px; border-radius:50%; border:1px solid var(--border); display:flex; align-items:center;
    justify-content:center; font-size:23px; color:#6b6f7a; background:#fff;
}
.cg-item:hover .cg-icon{ border-color:var(--red); color:var(--red); }

/* ===================== BOTTOM 2-BANNER ROW ===================== */
.banner-row-2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:30px; }
.banner-row-2 a{ position:relative; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); display:block; }
.banner-row-2 img{ width:100%; height:200px; object-fit:cover; }
.b2-text{ position:absolute; right:24px; bottom:24px; color:#fff; text-shadow:0 2px 6px rgba(0,0,0,.45); }
.b2-text h4{ margin:0 0 10px; font-size:18px; }
.b2-text span{ background:#1c1c1e; padding:6px 16px; border-radius:6px; font-size:12px; font-weight:600; }

/* ===================== FOOTER ===================== */
.site-footer{ background:#1d1f26; color:#b8bac3; margin-top:46px; font-size:13.5px; }
.footer-top{ display:grid; grid-template-columns:repeat(4,1fr); gap:30px; padding:40px 16px 30px; }
.footer-col{ min-width:0; overflow-wrap:break-word; word-break:break-word; }
.footer-col h4{ color:#fff; font-size:14.5px; margin:0 0 16px; font-weight:700; }
.footer-col ul li{ margin-bottom:10px; }
.footer-col ul li a:hover{ color:#fff; }
.app-badges{ display:flex; flex-direction:column; gap:10px; margin-bottom:22px; }
.app-badge{ display:flex; align-items:center; gap:8px; border:1px solid #3a3c45; border-radius:var(--radius-sm); padding:8px 12px; color:#fff; }
.app-badge i{ font-size:18px; }
.social-title{ margin-top:6px; }
.social-icons{ display:flex; gap:12px; }
.social-icons a{ width:34px; height:34px; border-radius:50%; background:#2c2e36; display:flex; align-items:center; justify-content:center; color:#fff; }
.social-icons a:hover{ background:var(--red); }
.footer-payment{ display:flex; flex-wrap:wrap; gap:22px; border-top:1px solid #2c2e36; padding:18px 16px; font-size:12.5px; }
.footer-payment span{ display:flex; align-items:center; gap:7px; }
.footer-payment i{ color:var(--red); }
.footer-bottom{ border-top:1px solid #2c2e36; padding:14px 16px; font-size:12px; text-align:center; color:#74767f; }

main{ padding-bottom:10px; }

/* ===================== BREADCRUMB ===================== */
.breadcrumb{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; font-size:12.5px; color:var(--text-muted); }
.breadcrumb .bc-path{ display:flex; align-items:center; gap:8px; }
.breadcrumb .bc-path a:hover{ color:var(--red); }
.breadcrumb .bc-sep{ color:#c7c9d1; }
.breadcrumb .bc-sell{ display:flex; align-items:center; gap:6px; color:var(--text-muted); }

/* ===================== CATEGORY (LISTING) PAGE ===================== */
.category-layout{ display:flex; gap:18px; align-items:flex-start; }
.cat-main{ flex:1; min-width:0; }
.cat-sidebar{
    width:270px; flex-shrink:0; background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
    padding:18px;
}
.cat-sidebar-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.cat-sidebar-head h4{ margin:0; font-size:15px; font-weight:700; }
.cat-sidebar-head a{ font-size:12px; color:var(--red); font-weight:600; }

.filter-toggle-row{ display:flex; align-items:flex-start; gap:10px; padding:14px 0; border-bottom:1px solid var(--border); }
.filter-toggle-row i{ font-size:16px; color:#6b6f7a; margin-top:2px; }
.filter-toggle-row .ft-label{ flex:1; font-size:13px; }
.filter-toggle-row .ft-sub{ display:block; font-size:11px; color:var(--text-muted); margin-top:2px; }
.toggle-switch{ width:38px; height:22px; border-radius:20px; background:#dfe1e6; position:relative; flex-shrink:0; transition:background .15s; }
.toggle-switch::after{ content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,.25); }
.toggle-switch.on{ background:var(--red); }
.toggle-switch.on::after{ left:18px; }

.filter-accordion{ border-bottom:1px solid var(--border); }
.filter-accordion summary{ list-style:none; cursor:pointer; padding:14px 0; font-size:13px; font-weight:600; display:flex; align-items:center; justify-content:space-between; }
.filter-accordion summary::-webkit-details-marker{ display:none; }
.filter-accordion summary i{ font-size:11px; color:#9a9da6; transition:transform .15s; }
.filter-accordion[open] summary i{ transform:rotate(180deg); }
.filter-options{ padding:0 0 14px; display:flex; flex-direction:column; gap:12px; }
.filter-options label{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text); cursor:pointer; }
.filter-options input{ width:15px; height:15px; accent-color:var(--red); }

.cat-toolbar{
    display:flex; align-items:center; justify-content:space-between; background:#fff; border-radius:var(--radius);
    box-shadow:var(--shadow); padding:12px 16px; margin-bottom:14px; flex-wrap:wrap; gap:10px;
}
.cat-count{ font-size:13px; color:var(--text-muted); font-weight:600; }
.sort-tabs{ display:flex; align-items:center; gap:18px; }
.sort-tabs span{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-muted); }
.sort-tabs a{ font-size:12.5px; color:var(--text-muted); padding-bottom:4px; }
.sort-tabs a.active{ color:var(--red); font-weight:700; border-bottom:2px solid var(--red); }

.cat-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.cat-card{
    background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:14px; position:relative;
    display:flex; flex-direction:column;
}
.cat-card .cc-badge{ color:var(--red); font-size:11.5px; font-weight:700; margin-bottom:6px; }
.cc-swatches{ display:flex; gap:5px; margin-bottom:8px; }
.cc-swatches span{ width:14px; height:14px; border-radius:50%; border:1px solid var(--border); display:inline-block; }
.cc-swatches .more{ font-size:11px; color:var(--text-muted); }
.cat-card .cc-img{ height:160px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.cat-card .cc-img img{ max-height:160px; object-fit:contain; margin:0 auto; }
.cat-card .cc-title{ font-size:13px; line-height:1.8; height:44px; overflow:hidden; color:var(--text); margin-bottom:8px; }
.cc-rating{ display:flex; align-items:center; gap:14px; margin-bottom:8px; font-size:12px; flex-wrap:wrap; }
.cc-rating .cc-star{ color:var(--yellow); display:flex; align-items:center; gap:3px; font-weight:600; }
.cc-shipping{ display:flex; align-items:center; gap:5px; background:#eef3fc; color:#2563c9; border-radius:var(--radius-sm); padding:3px 8px; font-size:11px; }
.cc-price-row{ margin-top:auto; display:flex; align-items:center; gap:8px; }
.cc-discount{ background:var(--red); color:#fff; font-size:12px; font-weight:700; padding:3px 7px; border-radius:var(--radius-sm); }
.cc-price-col{ display:flex; flex-direction:column; }
.cc-price-old{ font-size:11px; color:var(--text-muted); text-decoration:line-through; }
.cc-price-new{ font-size:15px; font-weight:700; }
.cc-stock-note{ font-size:11px; color:var(--red); margin-top:4px; }

/* ===================== PRODUCT PAGE ===================== */
.pp-breadcrumb-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.pp-layout{ display:grid; grid-template-columns: 300px 1fr 420px; gap:24px; align-items:flex-start; }

/* gallery (right column) */
.pp-gallery{ position:relative; background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; }
.pp-gallery-main{ display:flex; align-items:center; justify-content:center; height:380px; }
.pp-gallery-main img{ max-height:380px; object-fit:contain; margin:0 auto; }
.pp-thumbs{ display:flex; gap:8px; margin-top:14px; justify-content:center; }
.pp-thumbs span{ width:56px; height:56px; border-radius:var(--radius-sm); border:1.5px solid var(--border); overflow:hidden; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.pp-thumbs span.active{ border-color:var(--red); }
.pp-thumbs span img{ width:100%; height:100%; object-fit:cover; }
.pp-action-icons{ position:absolute; top:18px; left:14px; display:flex; flex-direction:column; gap:14px; }
.pp-action-icons i{ font-size:16px; color:#9a9da6; cursor:pointer; }
.pp-action-icons i:hover{ color:var(--red); }

/* middle info column */
.pp-info-col{ min-width:0; }
.pp-cat-line{ font-size:12.5px; color:var(--text-muted); margin-bottom:10px; }
.pp-cat-line a:hover{ color:var(--red); }
.pp-title{ font-size:19px; font-weight:700; margin:0 0 8px; line-height:1.9; }
.pp-subtitle{ font-size:12.5px; color:var(--text-muted); margin:0 0 14px; direction:ltr; text-align:right; }
.pp-meta-row{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:12.5px; color:var(--text-muted); margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.pp-meta-row .pp-rate{ display:flex; align-items:center; gap:4px; color:var(--text); font-weight:700; }
.pp-meta-row .pp-rate i{ color:var(--yellow); }
.pp-ai-badge{ background:var(--red-soft); color:var(--red); padding:4px 10px; border-radius:14px; font-weight:600; }

.pp-color-row{ display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.pp-color-row .pcr-label{ font-size:13px; font-weight:600; }
.color-dot{ width:30px; height:30px; border-radius:50%; border:2px solid transparent; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.color-dot span{ width:22px; height:22px; border-radius:50%; display:block; }
.color-dot.selected{ border-color:var(--text); }
.color-dot.selected i{ color:#fff; font-size:11px; }

.delivery-banner{
    display:flex; align-items:center; justify-content:space-between; background:#eef0fd; color:#3949ab;
    border-radius:var(--radius); padding:14px 18px; font-size:13px; font-weight:600; margin-bottom:24px;
}

.pp-section-title{ font-size:15px; font-weight:700; margin:0 0 14px; }
.insurance-card{
    display:flex; align-items:center; gap:14px; border:1px solid var(--border); border-radius:var(--radius);
    padding:14px; margin-bottom:26px;
}
.insurance-card .ic-name{ flex:1; font-size:13px; }
.insurance-card .ic-name small{ display:block; color:var(--text-muted); font-size:11.5px; margin-top:4px; }
.insurance-card .ic-price{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; }
.insurance-card .ic-old{ font-size:11px; color:var(--text-muted); text-decoration:line-through; font-weight:400; }

.feature-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:10px; }
.feature-card{ border:1px solid var(--border); border-radius:var(--radius); padding:14px; text-align:center; font-size:12.5px; }
.feature-card b{ display:block; margin-top:6px; font-size:13px; }

/* buybox (left column) */
.pp-buybox{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; position:sticky; top:16px; }
.pp-seller-head{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; color:var(--text-muted); margin-bottom:10px; }
.pp-seller-head a{ color:var(--red); font-weight:600; }
.pp-seller-box{ display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:var(--radius); padding:12px; margin-bottom:16px; }
.pp-seller-box .seller-icon{ width:36px; height:36px; border-radius:50%; background:#f3f4f6; display:flex; align-items:center; justify-content:center; color:#6b6f7a; flex-shrink:0; }
.pp-seller-box .seller-name{ font-size:13px; font-weight:600; }
.pp-seller-box .seller-score{ font-size:11.5px; color:var(--green); margin-top:3px; }
.pp-price-big{ font-size:22px; font-weight:800; margin-bottom:14px; display:flex; align-items:baseline; gap:6px; }
.pp-price-big small{ font-size:12px; font-weight:400; color:var(--text-muted); }
.add-to-cart-btn{ width:100%; background:var(--red); color:#fff; border-radius:var(--radius); padding:13px; font-size:14.5px; font-weight:700; margin-bottom:16px; }
.add-to-cart-btn:hover{ background:var(--red-dark); }
.pp-row-item{ display:flex; align-items:flex-start; gap:10px; padding:12px 0; border-top:1px solid var(--border); font-size:12.5px; }
.pp-row-item i{ color:var(--green); margin-top:2px; }
.pp-row-item.muted i{ color:#9a9da6; }
.pp-row-item .pri-title{ font-weight:600; }
.pp-row-item .pri-sub{ display:block; color:var(--text-muted); margin-top:4px; font-size:11.5px; }
.plus-badge{ background:#fff3e0; color:#e08600; border-radius:var(--radius-sm); padding:2px 6px; font-size:10.5px; font-weight:700; margin-right:4px; }

.related-products{ margin-top:36px; }

/* ===================== LOGIN / AUTH PAGE ===================== */
.auth-page{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:#fff; padding:20px; }
.auth-card{ width:100%; max-width:410px; background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow-md); padding:30px; }
.auth-card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:30px; }
.auth-card-head .logo{ font-size:22px; }
.auth-card-head .auth-back{ font-size:18px; color:var(--text); }
.auth-card h2{ font-size:17px; margin:0 0 10px; font-weight:700; }
.auth-card p.auth-sub{ font-size:13px; color:var(--text-muted); margin:0 0 20px; }
.auth-input{ width:100%; border:1px solid var(--border); border-radius:8px; padding:13px 14px; font-size:13.5px; margin-bottom:20px; outline:none; }
.auth-input:focus{ border-color:var(--red); }
.auth-submit{ width:100%; background:var(--red); color:#fff; border-radius:8px; padding:13px; font-size:14px; font-weight:700; margin-bottom:16px; }
.auth-submit:hover{ background:var(--red-dark); }
.auth-terms{ font-size:11.5px; color:var(--text-muted); line-height:1.9; }
.auth-terms a{ color:#2563c9; }

/* ===================== CART PAGE ===================== */
.cart-tabs{ display:flex; align-items:center; gap:26px; border-bottom:1px solid var(--border); margin-bottom:6px; }
.cart-tabs a{ padding:14px 2px; font-size:13.5px; color:var(--text-muted); position:relative; }
.cart-tabs a.active{ color:var(--text); font-weight:700; }
.cart-tabs a.active::after{ content:''; position:absolute; right:0; left:0; bottom:-1px; height:2px; background:var(--red); }
.cart-tabs .cart-tab-badge{ background:var(--red); color:#fff; font-size:11px; border-radius:10px; padding:1px 7px; margin-right:6px; }

.cart-layout{ display:flex; gap:18px; align-items:flex-start; margin-top:18px; }
.cart-summary{ width:280px; flex-shrink:0; background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; }
.cart-summary-row{ display:flex; align-items:center; justify-content:space-between; font-size:13px; padding:9px 0; }
.cart-summary-row.profit{ color:var(--green); font-weight:600; }
.cart-summary-row.total{ font-weight:700; font-size:14px; border-top:1px solid var(--border); margin-top:4px; padding-top:14px; }
.cart-checkout-btn{ width:100%; background:var(--red); color:#fff; border-radius:8px; padding:13px; font-size:14px; font-weight:700; margin:14px 0 12px; }
.cart-checkout-btn:hover{ background:var(--red-dark); }
.cart-note{ font-size:11px; color:var(--text-muted); line-height:1.9; }

.cart-main{ flex:1; min-width:0; }
.cart-main-head{ display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--text-muted); background:#fff; border-radius:var(--radius) var(--radius) 0 0; padding:16px 18px; box-shadow:var(--shadow); }
.cart-item{ background:#fff; box-shadow:var(--shadow); padding:18px; display:flex; gap:16px; align-items:flex-start; }
.cart-item-img{ width:130px; height:130px; flex-shrink:0; display:flex; align-items:center; justify-content:center; position:relative; }
.cart-item-img img{ max-height:120px; object-fit:contain; }
.cart-item-img .ci-badge{ position:absolute; top:0; right:0; color:var(--red); font-size:11px; font-weight:700; }
.cart-item-body{ flex:1; min-width:0; }
.cart-item-title{ font-size:13.5px; line-height:1.9; margin:0 0 10px; }
.cart-item-meta{ display:flex; flex-direction:column; gap:8px; font-size:12px; color:var(--text-muted); }
.cart-item-meta span{ display:flex; align-items:center; gap:6px; }
.cart-item-meta i{ color:#9a9da6; width:14px; }
.cart-item-side{ flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:10px; min-width:130px; }
.qty-stepper{ display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:8px; padding:6px 10px; }
.qty-stepper button{ font-size:14px; color:var(--text); }
.ci-trash{ color:#9a9da6; font-size:14px; }
.ci-discount{ color:var(--red); font-size:12px; }
.ci-final-price{ font-weight:700; font-size:14.5px; }

.cart-addon{ background:#fff; box-shadow:var(--shadow); padding:14px 18px; display:flex; align-items:center; gap:12px; font-size:12.5px; border-top:1px solid var(--border); }
.cart-addon input{ width:16px; height:16px; accent-color:var(--red); }
.cart-addon .addon-title{ flex:1; }
.cart-addon .addon-title small{ display:block; color:var(--text-muted); margin-top:3px; }
.cart-addon .addon-price{ font-weight:700; display:flex; align-items:center; gap:8px; }
.cart-addon .addon-old{ font-size:11px; color:var(--text-muted); text-decoration:line-through; font-weight:400; }
.cart-next-link{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--red); background:#fff; box-shadow:var(--shadow); padding:14px 18px; border-radius:0 0 var(--radius) var(--radius); }

/* ===================== MEGA MENU (category dropdown) ===================== */
.mega-menu-wrap{ position:relative; }
.mega-menu{
    display:none; position:absolute; top:100%; right:0; width:min(1100px, 96vw); background:#fff;
    border-radius:0 0 var(--radius) var(--radius); box-shadow:var(--shadow-md); border:1px solid var(--border);
    z-index:80; overflow:hidden;
}
.mega-menu.open{ display:flex; }
.mega-cats{ width:230px; flex-shrink:0; border-left:1px solid var(--border); max-height:480px; overflow-y:auto; }
.mega-cats li a{ display:flex; align-items:center; gap:10px; padding:13px 18px; font-size:13px; color:var(--text); }
.mega-cats li a i:first-child{ width:16px; color:#9a9da6; }
.mega-cats li a i:last-child{ margin-right:auto; font-size:11px; color:#c7c9d1; }
.mega-cats li a.active{ background:#fafafb; font-weight:700; color:var(--red); }
.mega-cats li a.active i:first-child{ color:var(--red); }
.mega-content{ flex:1; min-width:0; overflow:hidden; }
.mega-col{ flex:1; padding:0 14px; border-left:1px solid var(--border); }
.mega-col:last-child{ border-left:none; }
.mega-col h5{ display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:700; margin:0 0 14px; }
.mega-col h5 i{ font-size:11px; color:#c7c9d1; }
.mega-col ul li a{ display:block; font-size:12.5px; color:#44464e; padding:6px 0; }
.mega-col ul li a:hover{ color:var(--red); }
.mega-content-wrap{ flex:1; min-width:0; display:flex; flex-direction:column; padding:20px; max-height:480px; }
.mega-top-link{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-muted); padding-bottom:14px; margin-bottom:6px; border-bottom:1px solid var(--border); flex-shrink:0; }
.mega-top-link i{ font-size:10px; }
.mega-panel{ display:none; gap:0; overflow-y:auto; height:100%; }
.mega-panel.active{ display:flex; }
.mega-group{ margin-bottom:18px; }
.mega-group:last-child{ margin-bottom:0; }
.mega-group h6{ display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:700; color:var(--text); margin:0 0 10px; }
.mega-group h6 i{ font-size:10px; color:#c7c9d1; }
.mega-group ul li a{ display:block; font-size:12px; color:#84878f; padding:5px 0; }
.mega-group ul li a:hover{ color:var(--red); }

/* ===================== DYNAMIC-DATA SUPPORT (added for backend wiring) ===================== */
.product-card.is-out-of-stock{ opacity:.55; }
.product-cat-tag{ display:block; font-size:11px; color:var(--text-muted); margin-bottom:4px; }
.out-of-stock-text{ color:var(--red); font-size:13px; font-weight:600; display:flex; align-items:center; gap:6px; }
.pagination-wrap{ display:flex; justify-content:center; margin-top:24px; }
.cg-icon img{ width:100%; height:100%; object-fit:cover; border-radius:50%; }
.hero-slide-wrap .swiper-pagination-bullet{ width:6px; height:6px; background:rgba(0,0,0,.3); opacity:1; border-radius:50%; }
.hero-slide-wrap .swiper-pagination-bullet-active{ background:#1c1c1e; width:18px; border-radius:3px; }
.hero-slide-wrap .swiper-pagination{ bottom:16px !important; }
.flash-products.swiper{ overflow:hidden; }
.flash-products .swiper-slide{ padding:10px; }

/* ===================== FOOTER (dynamic content support) ===================== */
.footer-contact{ display:flex; align-items:flex-start; gap:10px; color:#b8bac3; font-size:12.5px; margin-bottom:14px; min-width:0; }
.footer-contact span{ min-width:0; overflow-wrap:break-word; word-break:break-word; }
.footer-contact i{ color:var(--red); margin-top:2px; flex-shrink:0; }
.footer-contact small{ display:block; color:var(--red); font-size:10.5px; margin-top:5px; opacity:.85; }
.footer-contact:hover{ color:#fff; }
.footer-msg-success{ color:#4ade80; font-size:12px; margin-bottom:8px; }
.footer-msg-error{ color:#f87171; font-size:12px; margin-bottom:6px; }
.newsletter-box{ display:flex; gap:8px; margin-bottom:18px; }
.newsletter-box input{
    flex:1; min-width:0; background:#2c2e36; border:1px solid #3a3c45; color:#fff; border-radius:6px;
    padding:10px 12px; font-size:12.5px; outline:none;
}
.newsletter-box input::placeholder{ color:#74767f; }
.newsletter-box input:focus{ border-color:var(--red); }
.newsletter-box button{ background:var(--red); color:#fff; width:42px; border-radius:6px; flex-shrink:0; font-size:14px; }
.newsletter-box button:hover{ background:var(--red-dark); }
.trust-box{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.trust-box img{ height:48px; max-width:100%; object-fit:contain; }
.footer-bottom-row{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; border-top:1px solid #2c2e36; padding:16px; font-size:12px; color:#74767f; }
.footer-bottom-row > span{ min-width:0; overflow-wrap:break-word; word-break:break-word; }
.footer-dev-credit{ font-size:11.5px; color:#5d5f68; margin-right:14px; padding-right:14px; border-right:1px solid #3a3c45; }
.footer-dev-credit a{ color:var(--yellow); font-weight:700; }
.footer-dev-credit a:hover{ color:#fff; }

/* ===================== HEADER: LIVE SEARCH DROPDOWN ===================== */
.search-wrap{ position:relative; flex:1; max-width:680px; }
.search-dropdown{
    position:absolute; top:48px; right:0; left:0; background:#fff; border:1px solid var(--border);
    border-radius:var(--radius); box-shadow:var(--shadow-md); z-index:60; max-height:420px; overflow-y:auto;
}
.search-result-item{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid var(--border); }
.search-result-item:last-child{ border-bottom:none; }
.search-result-item:hover{ background:#fafafb; }
.sr-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.sr-img{ width:40px; height:40px; object-fit:contain; flex-shrink:0; }
.sr-title{ font-size:12.5px; color:var(--text); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-price-wrap{ text-align:left; font-size:12px; flex-shrink:0; }
.sr-discount{ background:var(--red); color:#fff; font-size:10.5px; border-radius:10px; padding:1px 6px; margin-left:6px; }
.sr-old{ color:var(--text-muted); text-decoration:line-through; font-size:11px; }
.sr-new{ font-weight:700; font-size:13px; }
.search-state{ padding:16px; text-align:center; font-size:12.5px; color:var(--text-muted); }
.search-spinner{ width:13px; height:13px; border:2px solid var(--border); border-top-color:var(--red); border-radius:50%; display:inline-block; margin-left:6px; animation:srspin .6s linear infinite; vertical-align:middle; }
@keyframes srspin{ to{ transform:rotate(360deg); } }

/* ===================== HEADER: MOBILE NAV DRAWER ===================== */
.mobile-menu-btn{ display:none; }
.mobile-nav-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:90; opacity:0; pointer-events:none; transition:opacity .2s; }
.mobile-nav-overlay.active{ opacity:1; pointer-events:auto; }
.mobile-nav-drawer{
    position:fixed; top:0; right:0; height:100%; width:280px; background:#fff; z-index:95;
    transform:translateX(100%); transition:transform .25s ease; box-shadow:-4px 0 18px rgba(0,0,0,.15); overflow-y:auto;
}
.mobile-nav-drawer.active{ transform:translateX(0); }
.mobile-nav-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border); font-weight:700; font-size:14px; }
.mobile-nav-head button{ font-size:18px; color:var(--text-muted); }
.mobile-nav-list li a{ display:flex; align-items:center; gap:10px; padding:14px 18px; font-size:13.5px; color:var(--text); border-bottom:1px solid var(--border); }
.mobile-nav-list li a i{ width:18px; color:#9a9da6; }
@media (max-width:768px){ .mobile-menu-btn{ display:flex; } }

/* ===================== AUTH FORMS (login / register, dynamic) ===================== */
.auth-field{ position:relative; margin-bottom:18px; }
.auth-field .auth-input{ margin-bottom:0; }
.auth-label{ display:block; font-size:12.5px; color:var(--text); margin-bottom:6px; font-weight:600; }
.auth-input.ltr-field{ direction:ltr; text-align:left; padding-left:44px; }
.auth-toggle-pass{ position:absolute; left:12px; top:38px; background:none; border:none; cursor:pointer; padding:4px; color:#9a9da6; }
.auth-toggle-pass:hover{ color:var(--text); }
.auth-toggle-pass svg{ width:18px; height:18px; fill:currentColor; display:block; }
.auth-error{ background:var(--red-soft); color:var(--red); padding:10px 14px; border-radius:8px; font-size:12.5px; margin-bottom:16px; }
.auth-info{ background:#eef0fd; color:#3949ab; padding:12px 14px; border-radius:8px; font-size:12.5px; margin-bottom:16px; text-align:center; }
.auth-divider{ text-align:center; color:var(--text-muted); font-size:12px; margin:18px 0 12px; }
.auth-google-btn{
    width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:12px; border:1px solid var(--border);
    border-radius:8px; font-size:13.5px; font-weight:600; color:var(--text); background:#fff;
}
.auth-google-btn:hover{ background:#fafafb; border-color:#d7d9de; }
.auth-link-row{ text-align:center; font-size:12.5px; color:var(--text-muted); margin-top:16px; }
.auth-link-row a{ color:var(--red); font-weight:600; }
.auth-spinner{ width:14px; height:14px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; display:inline-block; margin-left:8px; vertical-align:-2px; animation:authspin .6s linear infinite; }
@keyframes authspin{ to{ transform:rotate(360deg); } }
.auth-forgot{ text-align:center; font-size:12.5px; margin-top:6px; }
.auth-forgot a{ color:#2563c9; }
.auth-link-btn{ width:100%; text-align:center; background:none; border:none; color:#2563c9; font-size:12.5px; padding:10px; margin-top:6px; text-decoration:underline; cursor:pointer; display:block; }



/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px){
    .product-grid{ grid-template-columns:repeat(4,1fr); }
    .category-grid{ grid-template-columns:repeat(6,1fr); }
    .banner-row{ grid-template-columns:repeat(2,1fr); }
    .footer-top{ grid-template-columns:repeat(2,1fr); }
    .cat-grid{ grid-template-columns:repeat(3,1fr); }
    .pp-layout{ grid-template-columns: 260px 1fr; }
    .pp-buybox{ grid-column: 1 / -1; order:3; position:static; }
    .cart-layout{ flex-direction:column; align-items:stretch; }
    .cart-summary{ width:100%; order:2; }
    .mega-menu{ width:94vw; }
    .mega-panel.active{ flex-wrap:wrap; }
    .mega-col{ flex:1 1 45%; border-left:none; margin-bottom:14px; }
}

@media (max-width: 768px){
    .top-promo-bar{ height:32px; }
    .tpb-item{ height:32px; font-size:11px; padding:0 26px; }
    .main-header-inner{ flex-wrap:wrap; height:auto; padding:10px 0; gap:10px; }
    .logo{ font-size:19px; order:1; max-width:110px; }
    .header-actions{ order:2; margin-right:auto; gap:4px; }
    .login-btn span{ display:none; }
    .login-btn{ padding:8px 10px; }
    .search-wrap{ order:3; flex:1 1 100%; width:100%; max-width:none; }
    .search-form{ width:100%; height:40px; }
    .nav-row-inner{ gap:14px; }
    .cats-btn span{ display:none; }
    .address-btn span{ display:none; }
    .hero-slide img.hero-slide-img--desktop{ display:none; }
    .hero-slide img.hero-slide-img--mobile{ display:block; aspect-ratio:4/5; }
    .hero-text{ right:20px; bottom:20px; max-width:60%; }
    .hero-text h2{ font-size:15px; margin:0 0 10px; }
    .hero-btn{ padding:6px 16px; font-size:12px; }
    .flash-card{ flex-direction:column; }
    .flash-panel{ width:100%; flex-direction:row; justify-content:space-between; padding:10px 16px; }
    .product-grid{ grid-template-columns:repeat(2,1fr); }
    .category-grid{ grid-template-columns:repeat(4,1fr); }
    .banner-row{ grid-template-columns:repeat(2,1fr); }
    .banner-row-2{ grid-template-columns:1fr; }
    .section-head{ flex-wrap:wrap; gap:10px; }
    .footer-top{ grid-template-columns:1fr; text-align:center; }
    .app-badges, .social-icons{ align-items:center; justify-content:center; }
    .footer-payment{ justify-content:center; text-align:center; }
    .category-layout{ flex-direction:column; align-items:stretch; }
    .cat-sidebar{ width:100%; order:2; }
    .cat-main{ order:1; }
    .cat-grid{ grid-template-columns:repeat(2,1fr); }
    .sort-tabs{ overflow-x:auto; width:100%; }
    .pp-layout{ grid-template-columns:1fr; }
    .pp-gallery{ order:1; }
    .pp-info-col{ order:2; }
    .pp-buybox{ order:3; position:static; }
    .feature-grid{ grid-template-columns:repeat(2,1fr); }
    .pp-gallery-main{ height:260px; }
    .pp-gallery-main img{ max-height:260px; }
    .cart-item{ flex-wrap:wrap; }
    .cart-item-side{ flex-direction:row; align-items:center; justify-content:space-between; width:100%; }
    .auth-card{ padding:22px; }
    .mega-col{ flex:1 1 100%; padding:0 0 14px; }

    /* مگامنوی دسته‌بندی در موبایل: چسبیده به viewport تا هرگز از عرض صفحه سرریز نکند */
    .mega-menu{
        position:fixed;
        top:150px;
        right:10px;
        left:10px;
        width:auto;
        max-width:none;
        max-height:70vh;
        flex-direction:column;
    }
    .mega-cats{ width:100%; max-height:160px; border-left:none; border-bottom:1px solid var(--border); }
    .mega-content-wrap{ max-height:50vh; padding:14px; }
}

@media (max-width: 420px){
    .product-grid{ grid-template-columns:repeat(2,1fr); }
    .category-grid{ grid-template-columns:repeat(4,1fr); }
    .banner-row{ grid-template-columns:repeat(2,1fr); }
    .flash-tile{ min-width:120px; }
}
