/*
Theme Name: Petly Modern
Theme URI: https://sambird.ir
Author: Sambird
Description: قالب اختصاصی مینیمال و مدرن برای پت‌شاپ، الهام‌گرفته از رابط کاربری iOS 17 با حس هوشمند و هویت بصری حیوان‌محور.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petly-modern
Tags: woocommerce, rtl, custom-logo, minimal
*/

/* ===================== Design Tokens ===================== */
:root{
  --bg: #F5F5F7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --accent: #FF6B4A;
  --accent-2: #0A84FF;
  --accent-soft: #FFF1EC;
  --accent-2-soft: #EAF4FF;
  --border: rgba(0,0,0,0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}

html[data-theme="dark"]{
  --bg: #0B0B0F;
  --surface: rgba(28, 28, 34, 0.6);
  --surface-solid: #1C1C22;
  --text: #F5F5F7;
  --text-secondary: #9A9AA2;
  --accent-soft: rgba(255,107,74,0.14);
  --accent-2-soft: rgba(10,132,255,0.14);
  --border: rgba(255,255,255,0.08);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 70px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body{ transition: background-color .4s ease, color .4s ease; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }

/* Safety net: our inline pet-icon SVGs don't set width/height attributes, so without
   this they fall back to the browser's native SVG size (huge). Any more specific
   rule (e.g. .icon-btn svg) still wins over this thanks to CSS specificity. */
svg{ width:20px; height:20px; flex-shrink:0; }

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== Buttons ===================== */
.btn, button, input[type="submit"], .button, .wc-forward, .checkout-button, .single_add_to_cart_button{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family: var(--font);
  font-weight:600;
  font-size:15px;
  padding: 13px 28px;
  border-radius: 999px;
  border: none;
  cursor:pointer;
  background: var(--text);
  color: var(--bg);
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  box-shadow: var(--shadow-sm);
  overflow:hidden;
  isolation:isolate;
}
.btn::after, button::after, .button::after, .single_add_to_cart_button::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
  z-index:1;
}
.btn:hover::after, button:hover::after, .button:hover::after, .single_add_to_cart_button:hover::after{
  transform: translateX(120%);
}
.btn:hover, button:hover, input[type="submit"]:hover, .button:hover, .wc-forward:hover, .single_add_to_cart_button:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity:.96;
}
.btn-accent, .single_add_to_cart_button, .checkout-button{
  background: linear-gradient(135deg, var(--accent), #FF8A65);
  color:#fff;
}

/* ===================== Header ===================== */
.site-header{
  position: sticky;
  top:0;
  z-index: 999;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: color-mix(in srgb, var(--surface-solid) 65%, transparent);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.is-scrolled{
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.site-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width:1200px;
  margin:0 auto;
}
.site-branding{ display:flex; align-items:center; gap:10px; }
.site-branding .site-title{
  font-size: 21px;
  font-weight: 800;
  letter-spacing:-.02em;
}
.site-branding .site-title .paw{ color: var(--accent); }

.main-navigation{ flex:1; display:flex; justify-content:center; }
.main-navigation ul{ display:flex; gap: 6px; }
.main-navigation a{
  padding: 10px 16px;
  border-radius: 999px;
  font-weight:600;
  font-size:14.5px;
  color: var(--text-secondary);
  transition: background .2s ease, color .2s ease;
}
.main-navigation a:hover, .main-navigation .current-menu-item > a{
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.header-actions{ display:flex; align-items:center; gap: 8px; }
.icon-btn{
  position:relative;
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}
.icon-btn:hover{ transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-md); color: var(--accent); }
.icon-btn svg{ width:20px; height:20px; }
.icon-btn .badge{
  position:absolute; top:-4px; left:-4px;
  min-width:18px; height:18px; padding:0 4px;
  border-radius:999px;
  background: var(--accent);
  color:#fff;
  font-size:10.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  border: 2px solid #fff;
}

.menu-toggle{ display:none; }

/* ===================== Hero ===================== */
.hero{
  padding: 72px 24px 40px;
  position:relative;
  overflow:hidden;
}
.hero::before, .hero::after{
  content:"";
  position:absolute;
  width: 420px; height: 420px;
  border-radius:50%;
  filter: blur(90px);
  opacity:.35;
  z-index:-1;
}
.hero::before{ background: var(--accent); top:-160px; left:-120px; animation: floatBlob 14s ease-in-out infinite; }
.hero::after{ background: var(--accent-2); top:-100px; right:-160px; animation: floatBlob 18s ease-in-out infinite reverse; }

@keyframes floatBlob{
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px, 40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(.95); }
}

.hero-inner{
  max-width:1200px;
  margin:0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align:center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}
.hero-badge{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--accent-2-soft);
  color: var(--accent-2);
  font-weight:700; font-size:13.5px;
  padding: 8px 16px;
  border-radius:999px;
  margin-bottom: 22px;
}
.hero-badge svg{ width:14px; height:14px; }
.hero h1{
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  line-height:1.25;
}
.hero h1 span{ color: var(--accent); }
.hero p{
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ===================== AI badge ===================== */
.ai-badge{
  position:absolute;
  top:14px; left:14px;
  display:inline-flex; align-items:center; gap:6px;
  background: linear-gradient(135deg, var(--accent-2), #7C5CFC);
  color:#fff;
  font-size: 11.5px; font-weight:700;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  z-index:2;
}
.ai-badge svg{ width:13px; height:13px; }

/* ===================== Section headings ===================== */
.section{ padding: 56px 24px; }
.section-head{ text-align:center; margin-bottom: 40px; }
.section-head h2{
  font-size: clamp(24px, 3vw, 34px);
  font-weight:800;
  letter-spacing:-.02em;
  margin: 0 0 10px;
}
.section-head p{ color: var(--text-secondary); margin:0; }

/* ===================== WooCommerce product grid ===================== */
ul.products{
  display:grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width:1200px;
  margin: 0 auto;
  padding:0 24px;
}
ul.products li.product{
  position:relative;
  background: var(--surface-solid);
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
  padding-bottom: 20px !important;
  text-align:center;
}
ul.products li.product:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
ul.products li.product a{ display:block; overflow:hidden; border-radius: var(--radius-md) var(--radius-md) 0 0; }
ul.products li.product a img{
  aspect-ratio: 1/1;
  object-fit: cover;
  margin-bottom: 16px;
  transition: transform .5s ease;
}
ul.products li.product:hover a img{ transform: scale(1.08); }
ul.products li.product .woocommerce-loop-product__title{
  font-size: 15.5px;
  font-weight:700;
  margin: 0 16px 6px;
  color: var(--text);
}
ul.products li.product .price{
  color: var(--accent);
  font-weight:800;
  font-size: 15px;
}
ul.products li.product .button{
  margin: 14px 16px 0;
  width: calc(100% - 32px);
  padding: 11px 20px;
  font-size:13.5px;
}
ul.products li.product .onsale{
  position:absolute; top:14px; right:14px; left:auto;
  background: var(--accent); color:#fff;
  border-radius:999px; min-height:auto;
  font-size:11px; font-weight:700;
  padding:5px 12px;
}

@media(max-width: 980px){
  ul.products{ grid-template-columns: repeat(2, 1fr); }
}

/* ===================== Single product / cart / checkout polish ===================== */
.woocommerce-page .container, .content-area{
  max-width:1200px; margin:0 auto; padding: 40px 24px;
}

/* Soft decorative blurred blobs behind shop/category/product pages — pure CSS,
   no extra markup, so it can never break the layout the way a wrapper div can. */
.woocommerce-page .content-area{ position:relative; z-index:0; }
.woocommerce-page .content-area::before,
.woocommerce-page .content-area::after{
  content:"";
  position:absolute;
  width: 380px; height:380px;
  border-radius:50%;
  filter: blur(100px);
  opacity:.22;
  z-index:-1;
  pointer-events:none;
}
.woocommerce-page .content-area::before{ background: var(--accent); top:-60px; right:-80px; }
.woocommerce-page .content-area::after{ background: var(--accent-2); bottom:40px; left:-100px; }

/* Shop/category archive header — breadcrumb + title, as a soft glass card */
.woocommerce-breadcrumb{
  font-size:13px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.woocommerce-breadcrumb a{ color: var(--text-secondary); }
.woocommerce-breadcrumb a:hover{ color: var(--accent); }

.woocommerce-products-header{
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.woocommerce-products-header__title{
  margin:0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight:800;
  letter-spacing:-.02em;
}

.woocommerce-result-count{
  color: var(--text-secondary);
  font-size:13.5px;
  margin: 0 0 16px;
}
.woocommerce-ordering{ margin: 0 0 24px; }
.woocommerce-ordering select{ min-width:220px; }
table.shop_table{
  width:100%; border-collapse: separate; border-spacing:0;
  background: var(--surface-solid); border-radius: var(--radius-md);
  overflow:hidden; box-shadow: var(--shadow-sm);
}
table.shop_table th, table.shop_table td{ padding:16px; border-bottom:1px solid var(--border); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], textarea, select{
  font-family: var(--font);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width:100%;
  font-size:14.5px;
}

/* ===================== Footer ===================== */
.site-footer{
  margin-top: 60px;
  padding: 48px 24px 28px;
  text-align:center;
  color: var(--text-secondary);
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}
.site-footer .paw{ color: var(--accent); }

/* ===================== Mobile ===================== */
@media(max-width: 860px){
  .main-navigation{ display:none; }
  .main-navigation.is-open{
    display:block; position:absolute; top:100%; inset-inline:0;
    background: var(--surface-solid); padding:12px 20px; box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
  .main-navigation.is-open ul{ flex-direction:column; gap:4px; }
  .menu-toggle{
    display:flex; align-items:center; justify-content:center;
    width:42px; height:42px; border-radius:50%;
    background: var(--surface-solid); box-shadow: var(--shadow-sm);
    border:none; cursor:pointer; color: var(--text);
  }
  .hero-inner{ padding: 40px 24px; }
}

/* ===================== Theme switch (dark/light) ===================== */
.theme-switch{
  display:flex;
  align-items:center;
  gap:2px;
  background: var(--surface-solid);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.theme-switch button{
  all:unset;
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px;
  border-radius:50%;
  cursor:pointer;
  color: var(--text-secondary);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.theme-switch button svg{ width:16px; height:16px; }
.theme-switch button.is-active{
  background: linear-gradient(135deg, var(--accent), #FF8A65);
  color:#fff;
  transform: scale(1.05);
}
html[data-theme="dark"] .theme-switch button.is-active{
  background: linear-gradient(135deg, var(--accent-2), #7C5CFC);
}

/* ===================== Search overlay ===================== */
.search-overlay{
  position: fixed; inset:0;
  z-index: 1200;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 12vh;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  opacity:0; visibility:hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.search-overlay.is-open{ opacity:1; visibility:visible; }
.search-overlay-box{
  width:min(560px, 92vw);
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-24px) scale(.97);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.search-overlay.is-open .search-overlay-box{ transform: translateY(0) scale(1); }
.search-overlay-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.search-overlay-head strong{ display:flex; align-items:center; gap:8px; font-size:16px; }
.search-overlay-head strong svg{ width:20px; height:20px; color:var(--accent); }
.search-overlay-close{
  all:unset; cursor:pointer; width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color: var(--text-secondary);
  background: var(--bg);
}
.search-overlay-close:hover{ color: var(--accent); }
.search-overlay form{ display:flex; gap:10px; }
.search-overlay input[type="search"]{ flex:1; font-size:16px; padding:14px 18px; }

/* ===================== Scroll reveal ===================== */
.reveal{
  opacity:0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{
  opacity:1;
  transform: translateY(0);
}

/* ===================== Product quick-actions (wishlist + quick view) ===================== */
ul.products li.product{ position:relative; }
.product-quick-actions{
  position:absolute;
  top:14px; left:14px;
  z-index:3;
  display:flex;
  flex-direction:column;
  gap:8px;
  opacity:0;
  transform: translateX(-8px);
  transition: opacity .25s ease, transform .25s ease;
}
ul.products li.product:hover .product-quick-actions{
  opacity:1;
  transform: translateX(0);
}
.pqa-btn{
  all:unset;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor:pointer;
  transition: transform .2s ease, color .2s ease, box-shadow .2s ease;
}
.pqa-btn svg{ width:17px; height:17px; }
.pqa-btn:hover{ transform: scale(1.08); box-shadow: var(--shadow-md); color: var(--accent); }
.pqa-btn.js-wishlist-toggle.is-active{ color: var(--accent); }
.pqa-btn.js-wishlist-toggle.is-active svg{ fill: currentColor; }

.onsale.badge-new{ background: linear-gradient(135deg, var(--accent-2), #7C5CFC); }

/* ===================== Quick-view modal ===================== */
.qv-overlay{
  position: fixed; inset:0;
  z-index: 1300;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  opacity:0; visibility:hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.qv-overlay.is-open{ opacity:1; visibility:visible; }
.qv-overlay-box{
  position:relative;
  width:min(760px, 94vw);
  max-height: 86vh;
  overflow:auto;
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px) scale(.97);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.qv-overlay.is-open .qv-overlay-box{ transform: translateY(0) scale(1); }
.qv-overlay-close{
  all:unset; position:absolute; top:16px; left:16px; cursor:pointer;
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color: var(--text-secondary);
  background: var(--bg);
  z-index:2;
}
.qv-overlay-close:hover{ color: var(--accent); }
.qv-loading{ text-align:center; padding: 60px 0; color: var(--text-secondary); }
.qv-layout{ display:grid; grid-template-columns: 1fr 1fr; gap:32px; align-items:center; }
.qv-image img{ border-radius: var(--radius-md); }
.qv-info h3{ font-size:22px; font-weight:800; margin: 0 0 10px; }
.qv-info .price{ color: var(--accent); font-weight:800; font-size:18px; margin-bottom:14px; }
.qv-desc{ color: var(--text-secondary); font-size:14.5px; margin-bottom:20px; }
.qv-desc p{ margin:0 0 10px; }
@media(max-width:640px){ .qv-layout{ grid-template-columns:1fr; } }

/* ===================== Wishlist overlay ===================== */
.wishlist-overlay{
  position: fixed; inset:0;
  z-index: 1200;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 10vh;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  opacity:0; visibility:hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.wishlist-overlay.is-open{ opacity:1; visibility:visible; }
.wishlist-overlay-box{
  width:min(480px, 92vw);
  max-height: 78vh;
  overflow:auto;
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-24px) scale(.97);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.wishlist-overlay.is-open .wishlist-overlay-box{ transform: translateY(0) scale(1); }
.wishlist-overlay-close{
  all:unset; cursor:pointer; width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color: var(--text-secondary);
  background: var(--bg);
}
.wishlist-overlay-close:hover{ color: var(--accent); }
.wishlist-empty{ color: var(--text-secondary); text-align:center; padding: 30px 10px; font-size:14.5px; }
.wishlist-row{
  display:flex; align-items:center; gap:14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.wishlist-row:last-child{ border-bottom:none; }
.wishlist-row-thumb{ display:block; width:56px; height:56px; border-radius: var(--radius-sm); overflow:hidden; flex-shrink:0; }
.wishlist-row-thumb img{ width:100%; height:100%; object-fit:cover; }
.wishlist-row-info{ flex:1; min-width:0; }
.wishlist-row-info a{ font-weight:700; font-size:14.5px; display:block; }
.wishlist-row-info .price{ color: var(--accent); font-weight:700; font-size:13.5px; }
.wishlist-row-remove{
  all:unset; cursor:pointer; width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color: var(--text-secondary);
  background: var(--bg);
}
.wishlist-row-remove svg{ width:14px; height:14px; }
.wishlist-row-remove:hover{ color: var(--accent); }

/* ===================== Toast notifications ===================== */
.toast-stack{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
  width: min(400px, 92vw);
}
.toast{
  display:flex;
  align-items:center;
  gap:10px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight:600;
  border: 1px solid var(--border);
  opacity:0;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.is-visible{ opacity:1; transform: translateY(0); }
.toast.toast-success{ border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.toast-icon{ color: var(--accent); flex-shrink:0; display:flex; }
.toast-icon svg{ width:18px; height:18px; }

/* ===================== Mobile bottom nav ===================== */
.bottom-nav{
  display:none;
  position: fixed;
  bottom:0; inset-inline:0;
  z-index: 998;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  align-items:stretch;
  justify-content: space-around;
}
.bottom-nav-item{
  all:unset;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  padding:6px 4px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size:10.5px;
  font-weight:600;
  cursor:pointer;
  flex:1;
  text-align:center;
  transition: color .2s ease, background .2s ease;
}
.bottom-nav-item svg{ width:21px; height:21px; }
.bottom-nav-item.is-active{ color: var(--accent); background: var(--accent-soft); }
.bottom-nav-item .badge{
  position:absolute; top:2px; left:calc(50% + 6px);
  min-width:16px; height:16px; padding:0 4px;
  border-radius:999px;
  background: var(--accent);
  color:#fff;
  font-size:9.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  border: 2px solid var(--surface-solid);
}

@media(max-width: 720px){
  .bottom-nav{ display:flex; }
  .site-footer{ padding-bottom: 96px; }
}

/* ===================== Footer newsletter ===================== */
.footer-newsletter{
  max-width: 1200px;
  margin: 0 auto 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  flex-wrap:wrap;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  text-align: right;
}
.footer-newsletter-text strong{ display:flex; align-items:center; gap:8px; font-size:17px; }
.footer-newsletter-text strong svg{ width:18px; height:18px; color: var(--accent); }
.footer-newsletter-text p{ margin: 6px 0 0; color: var(--text-secondary); font-size:14px; }
.js-newsletter-form{ display:flex; gap:10px; flex-wrap:wrap; }
.js-newsletter-form input{ min-width: 220px; }
.footer-copy{ margin:0; }

/* ===================== Shop filters bar (dynamic WooCommerce widgets) ===================== */
/* A horizontal, wrapping row of filter widgets shown above the product grid on
   shop/category pages — only when Appearance > Widgets > "فیلترهای فروشگاه" has
   widgets added to it (category list, price filter, attribute filter, etc). */
.shop-filters-bar{
  max-width:1200px;
  margin: 0 auto;
  padding: 0 24px 28px;
  display:flex;
  flex-wrap:wrap;
  gap: 16px;
  align-items:flex-start;
}
.shop-filters-bar .widget{
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 200px;
  max-width: 100%;
  flex: 1 1 220px;
  overflow-wrap: anywhere;
}
.shop-filters-bar .widget-title{
  font-size:14px; font-weight:800; margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.shop-filters-bar ul{ display:flex; flex-direction:column; gap:8px; }
.shop-filters-bar ul li a{ color: var(--text-secondary); font-size:13.5px; transition: color .2s ease; overflow-wrap:anywhere; }
.shop-filters-bar ul li a:hover{ color: var(--accent); }
.shop-filters-bar .price_slider_wrapper .ui-slider{ background: var(--border); height:4px; border-radius:999px; margin: 14px 0; }
.shop-filters-bar .price_slider_wrapper .ui-slider .ui-slider-range{ background: var(--accent); border-radius:999px; }
.shop-filters-bar .price_slider_wrapper .ui-slider .ui-slider-handle{
  width:16px; height:16px; border-radius:50%; background: var(--accent); border: 3px solid #fff;
  box-shadow: var(--shadow-sm); top:-6px;
}
.shop-filters-bar .price_label{ font-size:13px; color: var(--text-secondary); }
.shop-filters-bar button[type="submit"]{ width:100%; margin-top:14px; padding:9px 18px; font-size:13px; }

/* ===================== 404 page ===================== */
.error-404-section{ display:flex; justify-content:center; padding: 80px 24px 100px; }
.error-404-box{
  max-width: 560px;
  text-align:center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: var(--shadow-lg);
}
.error-404-icon{ font-size:52px; margin-bottom:6px; }
.error-404-box h1{ font-size: 64px; font-weight:800; margin:0; color: var(--accent); letter-spacing:-.03em; }
.error-404-box h2{ font-size:22px; font-weight:800; margin: 6px 0 12px; }
.error-404-box p{ color: var(--text-secondary); margin: 0 0 28px; }
.error-404-search{ display:flex; gap:10px; margin-bottom: 22px; }
.error-404-search input{ flex:1; }
.error-404-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ===================== Static pages (About / Contact / FAQ / Privacy / Terms) ===================== */
.static-page-inner{
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}
.static-page-header h1{
  font-size: clamp(26px, 4vw, 38px);
  font-weight:800;
  letter-spacing:-.02em;
  margin: 0 0 28px;
  text-align:center;
}
.static-page-content{
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  line-height:1.9;
}
.static-page-content h2{ font-size:20px; font-weight:800; margin: 28px 0 12px; }
.static-page-content h2:first-child{ margin-top:0; }
.static-page-content p{ color: var(--text-secondary); margin: 0 0 16px; }
.static-page-content ul{ margin: 0 0 16px; padding-inline-start: 20px; list-style: disc; }
.static-page-content li{ color: var(--text-secondary); margin-bottom:6px; }
@media(max-width:640px){ .static-page-content{ padding:24px; } }

/* ===================== Single product page ===================== */
.woocommerce div.product{
  max-width:1200px;
  margin: 0 auto;
  padding: 48px 24px 0;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items:start;
}
.woocommerce div.product div.images,
.woocommerce div.product div.summary{ min-width:0; }
.woocommerce div.product div.images{ position:relative; }
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper{
  border-radius: var(--radius-lg);
  overflow:hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}
.woocommerce div.product div.images img{ border-radius: var(--radius-lg); }
.woocommerce div.product div.images .flex-control-thumbs{
  display:flex; gap:10px; margin-top:14px; flex-wrap:wrap;
}
.woocommerce div.product div.images .flex-control-thumbs li{ width:74px; }
.woocommerce div.product div.images .flex-control-thumbs img{
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor:pointer;
  transition: border-color .2s ease, opacity .2s ease;
  opacity:.7;
}
.woocommerce div.product div.images .flex-control-thumbs img.flex-active{
  border-color: var(--accent);
  opacity:1;
}

.woocommerce div.product div.summary{ padding-top:6px; }
.woocommerce div.product div.summary .product_title{
  font-size: clamp(24px, 3vw, 32px);
  font-weight:800;
  letter-spacing:-.02em;
  margin: 0 0 10px;
}
.woocommerce div.product div.summary p.price{
  font-size: 24px;
  font-weight:800;
  color: var(--accent);
  margin: 0 0 18px;
}
.woocommerce div.product div.summary p.price del{ color: var(--text-secondary); font-weight:500; opacity:.7; margin-inline-end:8px; }
.woocommerce div.product div.summary p.price ins{ text-decoration:none; }
.woocommerce div.product div.summary .woocommerce-product-details__short-description{
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height:1.9;
}
.woocommerce div.product div.summary table.variations{ width:100%; margin-bottom:18px; }
.woocommerce div.product div.summary table.variations td{ padding:8px 0; }
.woocommerce div.product div.summary .quantity input.qty{
  width: 76px;
  text-align:center;
  padding: 12px 8px;
}
.woocommerce div.product div.summary .woocommerce-variation-add-to-cart,
.woocommerce div.product div.summary form.cart{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom: 20px;
}
.woocommerce div.product div.summary .product_meta{
  font-size:13.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.woocommerce div.product div.summary .product_meta > span{ display:block; margin-bottom:4px; }
.woocommerce div.product div.summary .stock{
  display:inline-block;
  font-weight:700;
  font-size:13px;
  padding: 5px 14px;
  border-radius:999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.woocommerce div.product div.summary .stock.out-of-stock{ background: var(--border); color: var(--text-secondary); }

/* Tabs (description / specs / reviews) */
.woocommerce div.product .woocommerce-tabs{
  max-width:1200px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs{
  display:flex; gap:8px; flex-wrap:wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li{
  background: var(--surface-solid);
  border-radius:999px;
  box-shadow: var(--shadow-sm);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{
  display:block;
  padding: 10px 20px;
  font-weight:700;
  font-size:14px;
  color: var(--text-secondary);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active{ background: var(--text); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{ color: var(--bg); }
.woocommerce div.product .woocommerce-tabs .panel{
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  line-height:1.9;
}
.woocommerce div.product .woocommerce-tabs .panel h2{ font-size:19px; font-weight:800; color: var(--text); margin: 0 0 16px; }
.woocommerce table.shop_attributes{ width:100%; border-collapse:collapse; }
.woocommerce table.shop_attributes th, .woocommerce table.shop_attributes td{
  padding:12px 14px; border-bottom:1px solid var(--border); text-align:right; font-size:14px;
}
.woocommerce table.shop_attributes th{ color: var(--text); font-weight:700; width:35%; }

/* Related / upsell products */
.woocommerce div.product .related.products,
.woocommerce div.product .upsells.products{
  max-width:1200px;
  margin: 48px auto 0;
  padding: 0 24px 60px;
}
.woocommerce div.product .related.products > h2,
.woocommerce div.product .upsells.products > h2{
  font-size: clamp(22px, 3vw, 28px);
  font-weight:800;
  margin: 0 0 28px;
  text-align:center;
}

/* Reviews */
#reviews #comments ol.commentlist{ display:flex; flex-direction:column; gap:16px; }
#reviews #comments li.comment{
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
#reviews .comment-text{ padding:0; }
#reviews .star-rating{ color: var(--accent); }
#reviews #review_form textarea, #reviews #review_form input{ font-family: var(--font); }

@media(max-width: 860px){
  .woocommerce div.product{ grid-template-columns: 1fr; gap:28px; }
}
