/* ==========================================================================
   Arcopet v2 · پوسته‌ی فروشگاه
   هدر فروشگاه (جستجوی محصول، سبد خرید، مگامنوی دسته‌بندی‌ها) و کشوی موبایل.
   فقط داخل اجزای v2 (.v2-scope) اثر دارد؛ بدنه‌ی صفحه‌های فروشگاه همان CSS قدیمی را دارد.
   ========================================================================== */

/* ---------- چیدمان نوار هدر ---------- */
@media (min-width:992px){
  .v2-header-shop .v2-header-bar{
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"logo search actions";
    column-gap:32px;
  }
  .v2-header-shop .v2-header-search{ max-width:560px; justify-self:center; }
}
.v2-header-shop .v2-header-buttons{ gap:4px; }

/* ---------- جستجوی محصول (افزونه‌ی flowrand؛ رفتار و شناسه‌ها دست‌نخورده) ---------- */
.v2-header .v2-shop-search{ width:100%; }
.v2-header .v2-shop-search .flowrand-container{
  max-width:none; height:auto; margin:0; padding:0; border-radius:0;
}
.v2-header .v2-shop-search .search-container{ position:relative; }
.v2-header .v2-shop-search .search-form{ position:relative; margin:0; }
.v2-header .v2-shop-search .search-input{
  display:block; width:100%; height:48px; margin:0;
  padding:0 14px 0 44px!important;
  background:var(--v2-surface-subtle); color:var(--v2-text);
  border:1px solid transparent; border-radius:var(--v2-radius-s);
  font:inherit; font-size:var(--v2-fs-16); box-shadow:none;
  transition:border-color .15s, background-color .15s;
}
.v2-header .v2-shop-search .search-input::placeholder{ color:var(--v2-text-subtle); opacity:1; }
.v2-header .v2-shop-search .search-input:focus{
  background:var(--v2-surface); border-color:var(--v2-border-strong); box-shadow:none; outline:0;
}
.v2-header .v2-shop-search .search-button{
  position:absolute; top:50%; left:6px; right:auto; z-index:2;
  display:grid; place-items:center; width:36px; height:36px; padding:0;
  transform:translateY(-50%); border-radius:50%;
  color:var(--v2-text); background:none;
}
.v2-header .v2-shop-search .search-button:hover{ background:var(--v2-surface-hover); color:var(--v2-text); }
.v2-header .v2-shop-search .search-button svg{ width:22px; height:22px; }
/* کلمه‌های چرخان بعد از متن «جستجو محصول در» (همان رفتار style.css چایلد؛ در صفحه‌ی کامل v2 آن فایل لود نمی‌شود) */
.v2-header .v2-shop-search .sliding-suggestions{
  position:absolute; top:0; bottom:0; inset-inline-start:calc(14px + 7.1em); inset-inline-end:48px; z-index:3; /* بالای input (CSS قدیمی در پوسته به آن z-index:2 می‌دهد) */
  height:48px; overflow:hidden; pointer-events:none; font-size:var(--v2-fs-16);
  transition:opacity .3s;
}
.v2-header .v2-shop-search .search-input:focus ~ .sliding-suggestions,
.v2-header .v2-shop-search .search-input:not(:placeholder-shown) ~ .sliding-suggestions{ opacity:0; }
.v2-header .v2-shop-search .suggestion-track{
  position:absolute; inset:0; display:flex; align-items:center; padding:0;
  color:var(--v2-brand); font-size:var(--v2-fs-16); font-weight:500;
}
.v2-header .v2-shop-search .suggestion-track span{
  position:absolute; inset-inline-start:0; padding:0; white-space:nowrap; font-size:inherit;
  opacity:0; transform:translateY(20px); animation:v2-search-word 10s linear infinite;
}
.v2-header .v2-shop-search .suggestion-track span:nth-child(2){ animation-delay:2s; }
.v2-header .v2-shop-search .suggestion-track span:nth-child(3){ animation-delay:4s; }
.v2-header .v2-shop-search .suggestion-track span:nth-child(4){ animation-delay:6s; }
.v2-header .v2-shop-search .suggestion-track span:nth-child(5){ animation-delay:8s; }
@keyframes v2-search-word{
  0%{ opacity:0; transform:translateY(20px); }
  4%, 18%{ opacity:1; transform:none; }
  20%, 100%{ opacity:0; transform:translateY(-14px); }
}
@media (prefers-reduced-motion:reduce){
  .v2-header .v2-shop-search .suggestion-track span{ animation:none; }
  .v2-header .v2-shop-search .suggestion-track span:first-child{ opacity:1; transform:none; }
}
.v2-header .v2-shop-search .search-results-dropdown{
  top:calc(100% + 6px); z-index:60;
  background:var(--v2-surface);
  border:1px solid var(--v2-border); border-radius:var(--v2-radius-m);
  box-shadow:var(--v2-shadow-raised);
}
@media (min-width:768px){
  .v2-header .v2-shop-search .search-input,
  .v2-header .v2-shop-search .sliding-suggestions{ height:44px; }
  .v2-header .v2-shop-search .search-input, .v2-header .v2-shop-search .sliding-suggestions{ font-size:var(--v2-fs-14); }
  .v2-header .v2-shop-search .suggestion-track{ font-size:var(--v2-fs-14); }
}

/* ---------- سبد خرید (افزونه‌ی flowrand-fast-cart) ---------- */
.v2-header .v2-cart{ display:inline-flex; }
.v2-header .v2-cart .flowrand-fc-cart-toggle,
.v2-header .v2-cart-link{
  position:relative; display:inline-grid; place-items:center;
  width:var(--v2-tap); height:var(--v2-tap); min-height:0; padding:0;
  border:0; border-radius:50%; background:none; color:var(--v2-text);
  box-shadow:none; transition:background-color .15s;
}
.v2-header .v2-cart .flowrand-fc-cart-toggle:hover,
.v2-header .v2-cart-link:hover{ background:var(--v2-surface-subtle); }
.v2-header .v2-cart .flowrand-fc-cart-toggle__icon svg{ width:22px; height:22px; }
.v2-header .v2-cart .flowrand-fc-cart-toggle__count,
.v2-header .v2-cart-count{
  position:absolute; top:4px; left:2px;
  display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:var(--v2-brand); color:var(--v2-on-brand);
  font-size:11px; font-weight:700; line-height:1;
}
.v2-header .v2-cart .flowrand-fc-cart-toggle__count.is-loading{ background:transparent; color:var(--v2-text-subtle); }

/* ---------- مگامنوی دسته‌بندی‌ها (دسکتاپ) ---------- */
.v2-cat-nav{ display:none; border-top:1px solid var(--v2-border); }
@media (min-width:992px){
  .v2-cat-nav{ display:block; }
  .v2-cat-nav .v2-container{ position:relative; }
  .v2-cat-menu{ display:flex; flex-wrap:wrap; align-items:center; gap:2px; }
  .v2-cat-menu > .menu-item > a{
    position:relative; display:flex; align-items:center; gap:4px; height:48px; padding-inline:12px;
    font-size:var(--v2-fs-14); font-weight:500;
  }
  .v2-cat-menu > .menu-item > a::after{
    content:""; position:absolute; inset-inline:12px; bottom:8px; height:2px; border-radius:2px;
    background:var(--v2-border-strong); transform:scaleX(0); transition:transform .2s;
  }
  .v2-cat-menu > .menu-item:hover > a::after,
  .v2-cat-menu > .menu-item.is-open > a::after{ transform:scaleX(1); }
  .v2-cat-menu > .current-menu-ancestor > a{ font-weight:700; }
  .v2-cat-menu > .current-menu-ancestor > a::after{ background:var(--v2-brand); transform:scaleX(1); }
  .v2-cat-menu > .menu-item-has-children{ display:flex; align-items:center; }
  .v2-cat-menu .v2-submenu-toggle{ width:24px; height:24px; margin-inline-start:-8px; }

  /* پنل: هم‌عرض نوار، ستون‌ها = زیرمنوی سطح ۲ */
  .v2-cat-menu > .menu-item > .sub-menu{
    position:absolute; z-index:5; top:100%; inset-inline:var(--v2-gutter-r) var(--v2-gutter-l);
    display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:18px 24px;
    max-height:min(70vh, 560px); overflow-y:auto;
    padding:20px 24px; border-radius:0 0 var(--v2-radius-m) var(--v2-radius-m);
    background:var(--v2-surface); border:1px solid var(--v2-border); border-top:0;
    box-shadow:var(--v2-shadow-raised);
    opacity:0; visibility:hidden; transform:translateY(6px);
    transition:opacity .15s, transform .15s, visibility 0s .15s;
  }
  .v2-cat-menu > .menu-item:hover > .sub-menu,
  .v2-cat-menu > .menu-item:focus-within > .sub-menu,
  .v2-cat-menu > .menu-item.is-open > .sub-menu{
    opacity:1; visibility:visible; transform:none; transition:opacity .15s, transform .15s;
  }
  .v2-cat-menu .sub-menu .menu-item > a{ display:block; padding:5px 8px; border-radius:var(--v2-radius-s); font-size:var(--v2-fs-14); line-height:1.7; }
  .v2-cat-menu .sub-menu .menu-item > a:hover{ background:var(--v2-surface-subtle); color:var(--v2-link); }
  .v2-cat-menu > .menu-item > .sub-menu > .menu-item > a{ font-weight:700; color:var(--v2-heading); }
  .v2-cat-menu .sub-menu .sub-menu{ display:block; margin-top:2px; }
  .v2-cat-menu .sub-menu .sub-menu .sub-menu{ padding-inline-start:12px; border-inline-start:1px solid var(--v2-border); margin-inline-start:8px; }
  .v2-cat-menu .sub-menu .sub-menu .sub-menu a{ color:var(--v2-text-muted); }
  .v2-cat-menu .sub-menu .v2-submenu-toggle{ display:none; }
}

/* ---------- کشوی موبایل: لینک‌های حساب و منوی چندسطحی ---------- */
.v2-drawer-links{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.v2-drawer-links a{
  display:inline-flex; align-items:center; min-height:40px; padding-inline:14px;
  border-radius:999px; background:var(--v2-surface-subtle);
  font-size:var(--v2-fs-14); font-weight:500; transition:background-color .15s;
}
.v2-drawer-links a:hover{ background:var(--v2-surface-hover); }
.v2-drawer-menu .sub-menu .sub-menu{ margin:0 4px 8px 12px; }
.v2-drawer-menu .sub-menu .menu-item{ display:flex; flex-wrap:wrap; align-items:center; }
.v2-drawer-menu .sub-menu .menu-item > a{ flex:1; }

/* ==========================================================================
   فوتر فروشگاه — همان طرح فوتر قدیمی، با CSS امروزی (grid، متغیرها، بدون float)
   ========================================================================== */
.v2-sf{ color:var(--v2-text); }
.v2-sf-title{ margin:0 0 10px; font-size:var(--v2-fs-16); font-weight:700; line-height:1.9; color:var(--v2-text); }

/* ۱. مزیت‌ها */
.v2-sf-features{ background:var(--v2-surface); border-top:1px solid var(--v2-border); }
.v2-sf-features-list{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); }
.v2-sf-feature{
  display:grid; justify-items:center; align-content:start; gap:6px;
  padding:24px 12px; text-align:center;
}
.v2-sf-feature + .v2-sf-feature{ border-inline-start:1px solid var(--v2-border); }
.v2-sf-feature:nth-child(3){ border-inline-start:0; }
.v2-sf-feature:nth-child(n+3){ border-top:1px solid var(--v2-border); }
.v2-sf-feature img{ width:64px; height:64px; object-fit:contain; }
.v2-sf-feature-title{ margin:6px 0 0; font-size:var(--v2-fs-18); font-weight:700; }
.v2-sf-feature-text{ margin:0; font-size:var(--v2-fs-14); color:var(--v2-text-muted); }

/* بخش اصلی: زمینه‌ی صورتی روشن */
.v2-sf-main{ background:var(--v2-tint); }

/* ۲. لوگو، تماس، رفتن به بالا */
.v2-sf-top{
  display:grid; justify-items:center; gap:16px; padding-block:28px;
  border-bottom:1px solid var(--v2-brand-soft); text-align:center;
}
.v2-sf-logo img{ display:block; width:190px; height:auto; }
.v2-sf-contacts{ display:grid; gap:6px; font-style:normal; font-size:var(--v2-fs-14); line-height:1.9; }
.v2-sf-contacts a{ font-weight:500; }
.v2-sf-contacts a:hover{ color:var(--v2-link); }
.v2-sf-totop{
  display:inline-flex; align-items:center; gap:8px; min-height:42px; padding-inline:18px 14px;
  border:1px solid var(--v2-border); border-radius:var(--v2-radius-s);
  background:var(--v2-surface); color:var(--v2-text-muted); font-size:var(--v2-fs-14);
  transition:border-color .15s, color .15s;
}
.v2-sf-totop:hover{ border-color:var(--v2-border-strong); color:var(--v2-text); }
.v2-sf-totop .v2-icon{ width:18px; height:18px; transform:rotate(180deg); }

/* ۳. منوها، خبرنامه، شبکه‌ها */
.v2-sf-cols{
  display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px 16px;
  padding-block:28px; border-bottom:1px solid var(--v2-brand-soft);
}
.v2-sf-links{ display:grid; gap:2px; }
.v2-sf-links a{ display:inline-flex; align-items:center; min-height:36px; font-size:var(--v2-fs-14); color:var(--v2-text-muted); }
.v2-sf-links a:hover{ color:var(--v2-link); }
.v2-sf-newsletter, .v2-sf-social{ grid-column:1 / -1; text-align:center; }
.v2-sf-social-list{ display:flex; justify-content:center; gap:10px; }
.v2-sf-social-btn{
  display:grid; place-items:center; width:54px; height:54px; border-radius:var(--v2-radius-m);
  background:var(--v2-brand-soft); color:var(--v2-heading); transition:background-color .15s, color .15s;
}
.v2-sf-social-btn:hover{ background:var(--v2-brand); color:var(--v2-on-brand); }
.v2-sf-social-btn .v2-icon{ width:26px; height:26px; }

/* ۴. معرفی و نمادهای اعتماد (ابزارک‌های فوتر) */
.v2-sf-about{ position:relative; padding-block:24px 28px; }
.v2-sf-about-inner{ display:grid; gap:20px; font-size:var(--v2-fs-14); line-height:2; color:var(--v2-text-muted); }
.v2-sf-about .widget-title{ margin:0 0 6px; font-size:var(--v2-fs-16); font-weight:700; line-height:1.8; color:var(--v2-text); }
.v2-sf-about .widget-header{ margin:0; }
.v2-sf-about p{ margin:0 0 .6em; }
.v2-sf-about strong{ color:var(--v2-text); }
.v2-sf-about .custom-html-widget{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }
.v2-sf-about .custom-html-widget img{
  width:110px; height:110px; padding:10px; object-fit:contain;
  background:var(--v2-white); border:1px solid var(--v2-border); border-radius:var(--v2-radius-m);
}
/* «نمایش بیشتر»: متن بلند معرفی تا وقتی باز نشده کوتاه می‌ماند */
.v2-js .v2-sf-about.is-collapsible:not(.is-open) .widget_text:not(.widget_custom_html){
  max-height:150px; overflow:hidden;
  -webkit-mask-image:linear-gradient(to bottom, black 55%, transparent);
  mask-image:linear-gradient(to bottom, black 55%, transparent);
}
.v2-sf-more{
  display:block; min-height:40px; margin:8px auto 0; padding-inline:22px;
  border-radius:var(--v2-radius-s); background:var(--v2-surface); color:var(--v2-heading);
  font-size:var(--v2-fs-14); font-weight:500;
}
.v2-sf-more[hidden]{ display:none; }
.v2-sf-more:hover{ background:var(--v2-surface-subtle); }

/* ۵. کپی‌رایت */
.v2-sf-copy{
  margin:0; padding:10px 16px max(10px, env(safe-area-inset-bottom, 0px));
  background:var(--v2-heading); color:var(--v2-on-brand);
  font-size:var(--v2-fs-14); text-align:center;
}

@media (min-width:768px){
  .v2-sf-features-list{ grid-template-columns:repeat(4, minmax(0,1fr)); }
  .v2-sf-feature:nth-child(3){ border-inline-start:1px solid var(--v2-border); }
  .v2-sf-feature:nth-child(n+3){ border-top:0; }
  .v2-sf-cols{ grid-template-columns:repeat(4, minmax(0,1fr)); gap:24px; }
  .v2-sf-newsletter, .v2-sf-social{ grid-column:auto; text-align:start; }
  .v2-sf-social-list{ justify-content:flex-start; }
}
@media (min-width:992px){
  .v2-sf-top{ grid-template-columns:auto 1fr auto; justify-items:start; align-items:center; gap:32px; text-align:start; }
  .v2-sf-contacts{ display:flex; flex-wrap:wrap; justify-self:center; gap:0; }
  .v2-sf-contacts > span + span::before{
    content:""; display:inline-block; width:1px; height:14px; margin-inline:14px; vertical-align:middle;
    background:var(--v2-border-strong); opacity:.4;
  }
  .v2-sf-about-inner{ grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:32px; }
  .v2-sf-about .custom-html-widget{ justify-content:flex-start; flex-wrap:nowrap; }
}

/* CSS قدیمی دور .widget کادر می‌کشد؛ در فوتر قدیمی کادری نبود. */
.v2-sf-about .widget{ margin:0; padding:0; background:none; border:0; border-radius:0; box-shadow:none; }
@media (max-width:767px){
  .v2-sf-about .custom-html-widget{ flex-wrap:nowrap; gap:8px; }
  .v2-sf-about .custom-html-widget img{ width:96px; height:96px; padding:8px; }
}
