@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/font/iran/IRANFaNum.woff') format('woff');
}
@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/font/iran/IRANFaNum.woff') format('woff');
}
@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/font/iran/IRANSemiBoldFaNum.woff') format('woff');
}
@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/font/iran/IRANBoldFaNum.woff') format('woff');
}
@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/font/iran/IRANBoldFaNum.woff') format('woff');
}
@font-face {
  font-family: 'IRAN';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/assets/font/iran/IRANBoldFaNum.woff') format('woff');
}
:root {
  --blue: #1f6feb;
  --blue-dark: #1553b8;
  --blue-soft: #e8f1fe;
  --bg: #f6f8fb;
  --text: #1c2733;
  --muted: #7b8794;
  --border: #e6ebf2;
  --card: #ffffff;
  --shadow: 0 14px 34px rgba(16,42,80,.10);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'IRAN', Tahoma, 'Segoe UI', sans-serif; color: var(--text); direction: rtl; text-align: right;
  background: linear-gradient(125deg, #f8fbff 0%, #e3eefe 35%, #f8fbff 60%, #e8f1fd 100%);
  background-size: 260% 260%; animation: bodyBg 20s ease infinite;
}
body::after { content:''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity:.25;
  background-image: radial-gradient(rgba(31,111,235,.10) 1.8px, transparent 1.8px);
  background-size: 26px 26px; animation: dotsDrift 30s linear infinite;
}
body > * { position: relative; z-index: 1; }
@keyframes bodyBg { 0%,100%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } }
@keyframes dotsDrift { 0%{ background-position: 0 0; } 100%{ background-position: 130px 130px; } }
a { text-decoration: none; color: inherit; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 16px; }

/* Topbar */
.topbar { background: var(--blue-dark); color: #cfe0ff; font-size: 13px; padding: 7px 0; }
.topbar .container { display: flex; justify-content: space-between; }

/* Header */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 60; }
.header-inner { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.brand { font-size: 24px; font-weight: 700; color: var(--blue); }
.brand span { color: var(--text); }
.main-nav { display: flex; gap: 18px; margin-inline-start: auto; }
.main-nav a { color: var(--muted); font-weight: 500; transition: .2s; }
.main-nav a:hover { color: var(--blue); }
.search-box { flex: 1; max-width: 430px; position: relative; }
.search-box input { width: 100%; padding: 11px 40px 11px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); font-family: inherit; }
.search-box input:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.header-icons { display: flex; gap: 16px; align-items: center; }
.icon-link { position: relative; color: var(--muted); font-size: 20px; }
.badge { position: absolute; top: -8px; inset-inline-start: -10px; background: var(--blue); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; }
.menu-btn { display: none; background: none; border: none; font-size: 24px; color: var(--blue); cursor: pointer; }

/* Hero */
.hero { position: relative; color: #fff; padding: 72px 0 96px; border-radius: 0 0 32px 32px; overflow: hidden;
  background: #0d2f6b;
}
.hero::before { content:''; position:absolute; inset:0; background: url('/assets/img/product/hero-knauf.webp') center/cover no-repeat; transform: scale(1.05);
  animation: kenburns 18s ease-in-out infinite; filter: brightness(.5) saturate(1.1); pointer-events:none; will-change: transform; }
.hero { min-height: 78vh; display:flex; align-items:center; border-radius:0; }
.hero::after { content:''; position:absolute; inset:0; background: linear-gradient(120deg, rgba(13,47,107,.85) 0%, rgba(31,111,235,.55) 60%, rgba(77,141,240,.35) 100%); pointer-events:none; }
@keyframes kenburns { 0%,100%{ transform: scale(1.05) translate(0,0);} 50%{ transform: scale(1.12) translate(-2%,2%);} }
.hero > .container { position: relative; z-index: 3; }
.hero p { color: #e3ecff; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); margin: 0 0 12px; }
.hero p { color: #dbe7ff; margin: 0 0 24px; font-size: clamp(14px, 2vw, 17px); max-width: 560px; }
.hero .hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; background: #fff; color: var(--blue); padding: 12px 26px; border-radius: 14px; font-weight: 700; border: none; cursor: pointer; transition: .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; }
.btn-secondary { background:#fff; color:var(--blue); border:1.5px solid rgba(31,111,235,.35); box-shadow:0 3px 12px rgba(31,111,235,.10); }
.btn-secondary:hover { background:rgba(31,111,235,.08); transform:translateY(-2px); box-shadow:0 8px 18px rgba(31,111,235,.18); }

/* Sections */
.section { padding: 52px 0; }
.section-title { font-size: clamp(19px, 3vw, 24px); margin: 0 0 24px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 5px; height: 24px; background: var(--blue); border-radius: 4px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* Category cards */
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px; text-align: center; transition: .25s; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #bcd6fb; }
.cat-card .dot { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); margin: 0 auto 12px; }
.cat-card h3 { margin: 0; font-size: 16px; }

/* Product card */
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-img { height: 180px; background: #eef4fd; display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 14px; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 15px; margin: 0 0 6px; }
.product-body .brand { color: var(--muted); font-size: 12px; }
.price { margin-top: auto; font-weight: 700; color: var(--blue); font-size: 17px; }
.add-to-cart { margin-top: 10px; width: 100%; }

/* Feature strip */
.features { background: #fff; border-block: 1px solid var(--border); }
.features .grid { grid-template-columns: repeat(4,1fr); }
@media (max-width: 800px) { .features .grid { grid-template-columns: repeat(2,1fr); } }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.feature h4 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }

/* CTA banner */
.cta { background: linear-gradient(120deg, #0f3d91, var(--blue)); border-radius: 24px; color: #fff; padding: 48px 28px; text-align: center; }
.cta h2 { margin: 0 0 10px; font-size: clamp(20px,3vw,28px); }
.cta p { color: #dbe7ff; margin: 0 0 22px; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th, .table td { padding: 13px 12px; text-align: right; border-bottom: 1px solid var(--border); }
.table th { background: var(--blue-soft); }

/* Form inputs */
.inp { width: 100%; padding: 11px 12px; margin: 6px 0 14px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit; background: #fff; }
.inp:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }

/* Jalali date picker (select-based) */
.jdate-row { display: grid; grid-template-columns: 1.15fr 1.55fr 1fr; gap: 8px; }
.jdate-row .inp { margin: 0; padding: 11px 8px; text-align: center; }
.jdate-row .jd-note { font-size: 12px; color: #94a3b8; margin-top: 6px; }
@media (max-width: 480px) { .jdate-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } }

/* Footer */
.site-footer { position:relative; overflow:hidden; color:#33414f; padding:26px 0 18px; margin-top:16px; background:rgba(255,255,255,.28); }
.site-footer::before, .site-footer::after { content:''; position:absolute; inset:-18px 0 0; pointer-events:none; }
.site-footer::before {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='220' viewBox='0 0 1400 220'%3E%3Cg fill='none' stroke='%233b82f6' stroke-width='1.5' stroke-opacity='0.35' stroke-linecap='round'%3E%3Cpath d='M0,16 C145,-4 290,36 435,16 S725,-4 870,16 S1160,36 1305,16 S1400,10 1400,16'/%3E%3Cpath d='M0,46 C145,26 290,66 435,46 S725,26 870,46 S1160,66 1305,46 S1400,40 1400,46'/%3E%3Cpath d='M0,76 C145,56 290,96 435,76 S725,56 870,76 S1160,96 1305,76 S1400,70 1400,76'/%3E%3Cpath d='M0,106 C145,86 290,126 435,106 S725,86 870,106 S1160,126 1305,106 S1400,100 1400,106'/%3E%3Cpath d='M0,136 C145,116 290,156 435,136 S725,116 870,136 S1160,156 1305,136 S1400,130 1400,136'/%3E%3Cpath d='M0,166 C145,146 290,186 435,166 S725,146 870,166 S1160,186 1305,166 S1400,160 1400,166'/%3E%3Cpath d='M0,196 C145,176 290,216 435,196 S725,176 870,196 S1160,216 1305,196 S1400,190 1400,196'/%3E%3C/g%3E%3C/svg%3E") repeat;
  background-size: 1000px 220px; opacity:.6; animation: waveFall 30s linear infinite;
}
.site-footer::after {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='220' viewBox='0 0 1400 220'%3E%3Cg fill='none' stroke='%239ec6fd' stroke-width='1.2' stroke-opacity='0.3' stroke-linecap='round'%3E%3Cpath d='M0,24 C145,44 290,4 435,24 S725,44 870,24 S1160,4 1305,24 S1400,32 1400,24'/%3E%3Cpath d='M0,56 C145,76 290,36 435,56 S725,76 870,56 S1160,36 1305,56 S1400,64 1400,56'/%3E%3Cpath d='M0,88 C145,108 290,68 435,88 S725,108 870,88 S1160,68 1305,88 S1400,96 1400,88'/%3E%3Cpath d='M0,120 C145,140 290,100 435,120 S725,140 870,120 S1160,100 1305,120 S1400,128 1400,120'/%3E%3Cpath d='M0,152 C145,172 290,132 435,152 S725,172 870,152 S1160,132 1305,152 S1400,160 1400,152'/%3E%3Cpath d='M0,184 C145,204 290,164 435,184 S725,204 870,184 S1160,164 1305,184 S1400,192 1400,184'/%3E%3C/g%3E%3C/svg%3E") repeat;
  background-size: 1000px 220px; opacity:.45; animation: waveFall 18s linear infinite reverse;
}
@keyframes waveFall { 0% { background-position-x: 0; } 100% { background-position-x: -1000px; } }
.site-footer > .container { position:relative; z-index:2; }
.footer-grid { display:grid; grid-template-columns: 1.2fr 1fr; gap:18px; }
.footer-grid > div { background: rgba(255,255,255,.55); border:1px solid rgba(31,111,235,.13); border-radius:16px; padding:16px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 26px rgba(16,42,80,.06), inset 0 1px 0 rgba(255,255,255,.7); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color:#101821; margin:0 0 12px; font-size:16px; }
.f-desc { font-size:13.5px; line-height:2.1; color:#4b5a6d; margin:0 0 12px; }
.f-tags { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.f-chip { display:block; text-align:center; font-size:11px; padding:5px 8px; border-radius:999px; white-space:nowrap; color:#6b7a8c; background:rgba(148,163,184,.1); border:1px solid rgba(148,163,184,.22); cursor:default; user-select:none; pointer-events:none; }
.f-links { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.f-links a { padding:8px 12px; border-radius:12px; font-size:13.5px; color:#33414f; background:rgba(255,255,255,.55); border:1px solid rgba(31,111,235,.14); box-shadow: 0 2px 6px rgba(16,42,80,.04), inset 0 1px 0 rgba(255,255,255,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition:.2s; }
.f-links a:hover { background:#fff; color:var(--blue); transform:translateY(-2px); box-shadow:0 8px 18px rgba(31,111,235,.14); }
.f-contact { display:flex; flex-direction:column; gap:7px; align-items:stretch; }
.f-row { display:flex; gap:7px; flex-wrap:wrap; width:100%; }
.f-row > * { flex:1 1 0; min-width:0; }
.f-row .glass-pill { justify-content:center; padding:9px 10px; font-size:13px; }
.f-row .social-link { justify-content:center; }
.f-tel { flex-direction: column; gap: 2px; line-height: 1.45; }
.f-tel b { font-size: 12.5px; }
.f-tel span { font-size: 12px; color: #3b6fb5; direction: ltr; }
.f-address { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 2px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: #33414f; background: rgba(255,255,255,.55); border: 1px dashed rgba(31,111,235,.3); transition: .2s; }
.f-address:hover { background: #fff; color: var(--blue); }
.f-address .pin { font-size: 15px; }
.contact-head { text-align:center; margin: 4px 0 2px; }
.contact-head img { height: 76px; width: auto; max-width: 280px; object-fit: contain; }
.f-contact-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.f-contact-head h4 { margin:0; }
.f-logo-mini { height:48px; width:auto; max-width:175px; object-fit:contain; }
.cta-logo { display:inline-flex; background:#fff; border-radius:18px; padding:10px 20px; margin-bottom:16px; box-shadow:0 12px 30px rgba(0,0,0,.2); }
.cta-logo img { height:54px; width:auto; max-width:230px; object-fit:contain; display:block; }
.empty-logo { height:72px; width:auto; max-width:260px; object-fit:contain; margin:0 auto 12px; display:block; }
.confirm-logo { height:66px; width:auto; max-width:240px; object-fit:contain; margin:0 auto 14px; display:block; }
.f-meta { font-size:13px; color:#4b5a6d; margin:0; line-height:1.9; }
.glass-pill { display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:14px; color:#1553b8; font-weight:600; font-size:14px; background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(232,241,254,.55)); border:1px solid rgba(31,111,235,.22); box-shadow: 0 4px 14px rgba(16,42,80,.08), inset 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition:.2s; }
.glass-pill:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(31,111,235,.18); background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(232,241,254,.75)); }
.copyright { margin-top:18px; padding-top:12px; border-top:1px solid rgba(100,116,139,.14); text-align:center; color:var(--muted); font-size:12.5px; position:relative; z-index:2; line-height:2; }
.copyright a { color:var(--blue); font-weight:600; text-decoration:none; }
.copyright a:hover { color:#1553b8; text-decoration:underline; }

/* Animated motion (subtle, like reference site) */
@keyframes floatBlob {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-40px,30px) scale(1.12); }
}
@keyframes drift {
  0% { background-position: 0 0; }
  100% { background-position: 220px 220px; }
}
@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,111,235,.18); }
  50% { box-shadow: 0 0 0 10px rgba(31,111,235,0); }
}
.hero { animation: heroGrad 14s ease-in-out infinite; background-size: 200% 200%; }
@keyframes heroGrad {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.feature .ic { animation: pulseSoft 3.2s ease-in-out infinite; }
.cat-card .dot { background-image: linear-gradient(135deg, var(--blue-soft), #d5e6fd); }
.product-img img { transition: transform .5s ease; }
.product-card:hover .product-img img { transform: scale(1.06); }

.chapter { position: relative; min-height: 430px; display: flex; align-items: center; overflow: hidden; background-size: cover; background-position: center; background-attachment: fixed; margin: 24px 0; }
.chapter::before { content:''; position:absolute; inset:0; background: linear-gradient(to left, rgba(10,18,34,.88) 0%, rgba(10,18,34,.45) 60%, rgba(10,18,34,.25) 100%); }
.chapter > .container { position: relative; z-index: 2; padding: 38px 0; width: 100%; }
.chapter .section-title { color: #fff; }
.chapter .layer-tag { display:inline-flex; align-items:center; gap:8px; color:#e3ecff; border:1px solid rgba(255,255,255,.4); border-radius:999px; padding:10px 18px; transition:.2s; }
.chapter .layer-tag:hover { background: rgba(255,255,255,.15); color:#fff; }
.chapter-item { display:flex; align-items:center; gap:16px; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); border-radius:16px; padding:14px 18px; transition:.25s; color:#fff; }
.chapter-item:hover { background: rgba(255,255,255,.2); transform: translateX(6px); }
.chapter-item .num { font-size:22px; font-weight:700; color:#9cc0fb; min-width:44px; }
.chapter-list { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:22px; max-width:960px; }
@media (max-width: 860px) { .chapter-list { grid-template-columns:1fr; max-width:720px; } }
.supply-card { background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); border-radius:18px; padding:22px; color:#fff; }
.supply-card h3 { margin-top:0; }
.supply-card p { color:#dbe7ff; }
.supply-btn { display:inline-block; margin-top:12px; background:#fff; color:var(--blue); padding:10px 22px; border-radius:12px; font-weight:700; }

.reveal { opacity:0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity:1; transform: none; }

/* Projects */
.status-badge { display:inline-block; padding:5px 12px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.proj-filters { display:flex; gap:8px; flex-wrap:wrap; margin:20px 0 22px; }
.proj-filter { display:inline-flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px; border:1px solid #e2e8f2; background:#fff; color:#374151; font-size:14px; transition:.2s; }
.proj-filter span { background:#eef4ff; color:#1f6feb; border-radius:999px; padding:1px 9px; font-size:12px; font-weight:700; }
.proj-filter:hover { border-color:var(--blue); color:var(--blue); }
.proj-filter.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.proj-filter.active span { background:rgba(255,255,255,.22); color:#fff; }
.proj-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.proj-card { background:#fff; border:1px solid var(--border); border-radius:18px; overflow:hidden; box-shadow:0 8px 24px rgba(16,42,80,.06); transition:.25s; display:flex; flex-direction:column; }
.proj-card:hover { transform:translateY(-4px); box-shadow:0 16px 34px rgba(16,42,80,.12); }
.proj-img { position:relative; height:212px; background:#eef2f7; overflow:hidden; }
.proj-img img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s ease; }
.proj-card:hover .proj-img img { transform:scale(1.05); }
.proj-img-empty { height:100%; display:flex; align-items:center; justify-content:center; color:#9fb0c7; font-weight:700; letter-spacing:3px; font-size:14px; }
.proj-badge { position:absolute; top:12px; inset-inline-start:12px; }
.proj-body { padding:18px 20px 20px; display:flex; flex-direction:column; flex:1; }
.proj-body h3 { margin:0 0 8px; font-size:17px; color:#102a50; }
.proj-meta { display:flex; gap:14px; flex-wrap:wrap; color:#7b8794; font-size:13px; margin-bottom:8px; }
.proj-body p { margin:0 0 12px; color:#5b6779; font-size:14px; line-height:2; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.proj-link { color:var(--blue); font-size:14px; font-weight:700; text-decoration:none; margin-top:auto; }
.proj-link:hover { text-decoration:underline; }
@media (max-width: 860px) { .proj-grid { grid-template-columns:1fr; } .proj-img { height:190px; } }

/* Auth (login / forgot password) */
.auth-input { width:100%; padding:11px 12px; margin:6px 0 14px; border:1px solid #e6ebf2; border-radius:10px; font-family:inherit; font-size:15px; background:#fff; transition:border-color .2s, box-shadow .2s; }
.auth-input:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,235,.14); }
.auth-code { font-size:24px; letter-spacing:10px; text-align:center; font-weight:700; color:var(--blue); direction:ltr; }
.auth-msg { padding:9px 12px; border-radius:8px; font-size:14px; line-height:1.9; }
.auth-err { color:#b91c1c; background:#fee2e2; }
.auth-ok { color:#166534; background:#dcfce7; }
.auth-dev { background:#fff3cd; color:#664d03; }
.auth-resend { width:100%; background:transparent; border:1px dashed #b9c6dd; color:#1f6feb; padding:9px 12px; border-radius:10px; font-family:inherit; font-size:14px; cursor:pointer; transition:.2s; }
.auth-resend:hover { background:#eef4ff; border-color:var(--blue); }
@media (max-width: 520px) {
  .auth-input { font-size:16px; padding:12px; }
  .auth-code { font-size:22px; letter-spacing:7px; }
}

/* Mobile */
@media (max-width: 860px) {
  .main-nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; padding: 10px 20px 18px; gap: 12px; z-index: 55; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .menu-btn { display: inline-block; }
  .search-box { max-width: none; flex: 1; }
  .topbar .container { flex-direction: column; gap: 2px; }
}

/* ===== Admin panel ===== */
.admin-wrap { padding: 30px 0 70px; }
.admin-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.admin-title { font-size:clamp(19px,3vw,24px); margin:0; display:flex; align-items:center; gap:10px; }
.admin-title::before { content:''; width:5px; height:24px; background:var(--blue); border-radius:4px; }
.admin-tools { display:flex; gap:8px; flex-wrap:wrap; }

.admin-tabs { display:flex; flex-wrap:wrap; gap:10px; padding:14px; border-radius:18px; margin-bottom:22px;
  background:rgba(255,255,255,.5); border:1px solid rgba(31,111,235,.12);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:0 8px 26px rgba(16,42,80,.05), inset 0 1px 0 rgba(255,255,255,.7); }
.admin-tab { position:relative; display:inline-flex; align-items:center; justify-content:center; padding:10px 18px; border-radius:13px;
  color:#1553b8; font-size:13.5px; font-weight:600; background:rgba(255,255,255,.6);
  border:1px solid rgba(31,111,235,.16); transition:.2s; box-shadow:0 2px 8px rgba(16,42,80,.05); }
.admin-tab:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(31,111,235,.16); background:#fff; }
.admin-tab.on { background:linear-gradient(135deg, var(--blue), var(--blue-dark)); color:#fff; border-color:transparent; box-shadow:0 8px 18px rgba(31,111,235,.3); }
.nav-badge { position:absolute; top:-8px; inset-inline-end:-8px; min-width:20px; height:20px; padding:0 6px; border-radius:999px;
  background:linear-gradient(135deg, #ef4444, #dc2626); color:#fff; font-size:11px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
  box-shadow:0 4px 10px rgba(220,38,38,.35); border:2px solid rgba(255,255,255,.95); }
.admin-search { display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap; }
.admin-search .inp { max-width:430px; flex:1; min-width:220px; }
.admin-search-stats { font-size:13px; color:#7b8794; align-self:center; }

.admin-card { background:rgba(255,255,255,.6); border:1px solid rgba(31,111,235,.12); border-radius:18px;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:0 10px 30px rgba(16,42,80,.06), inset 0 1px 0 rgba(255,255,255,.7); padding:18px; }
.table-wrap { width:100%; overflow-x:auto; }
.table-wrap::-webkit-scrollbar { height:8px; }
.table-wrap::-webkit-scrollbar-thumb { background:rgba(31,111,235,.25); border-radius:999px; }
.admin-table { width:100%; border-collapse:collapse; min-width:760px; font-size:14px; }
.admin-table thead tr { background:linear-gradient(135deg, rgba(31,111,235,.10), rgba(232,241,254,.55)); }
.admin-table th { padding:13px 16px; text-align:right; font-size:13px; font-weight:700; color:#1553b8; white-space:nowrap; }
.admin-table td { padding:12px 16px; border-top:1px solid rgba(31,111,235,.08); vertical-align:middle; color:#374151; }
.admin-table tbody tr { transition:.15s; }
.admin-table tbody tr:hover { background:rgba(31,111,235,.045); }

.state { display:inline-flex; align-items:center; gap:7px; padding:5px 12px; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap; border:1px solid; }
.state::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.state.on { color:#166534; background:rgba(22,163,74,.10); border-color:rgba(22,163,74,.22); }
.state.off { color:#b42318; background:rgba(220,38,38,.07); border-color:rgba(220,38,38,.22); }

.row-actions { display:flex; gap:8px; flex-wrap:wrap; }
.btn-glass { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 16px; border-radius:999px;
  font-size:13px; font-weight:700; font-family:inherit; border:1px solid; cursor:pointer; text-decoration:none; transition:.2s; white-space:nowrap;
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.btn-glass.sm { padding:6px 13px; font-size:12.5px; }
.btn-glass.edit { color:#1553b8; background:linear-gradient(135deg, rgba(255,255,255,.85), rgba(232,241,254,.6)); border-color:rgba(31,111,235,.25); box-shadow:0 3px 10px rgba(31,111,235,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.btn-glass.edit:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(31,111,235,.22); background:#fff; }
.btn-glass.del { color:#b42318; background:linear-gradient(135deg, rgba(255,255,255,.9), rgba(254,242,242,.8)); border-color:rgba(220,38,38,.25); box-shadow:0 3px 10px rgba(220,38,38,.10), inset 0 1px 0 rgba(255,255,255,.9); }
.btn-glass.del:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(220,38,38,.2); background:#fff; }
.btn-glass.add { color:#fff; background:linear-gradient(135deg, var(--blue), var(--blue-dark)); border-color:transparent; box-shadow:0 6px 16px rgba(31,111,235,.28); }
.btn-glass.add:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(31,111,235,.35); }
.btn-glass.soft { color:#1553b8; background:rgba(31,111,235,.08); border-color:rgba(31,111,235,.2); }
.btn-glass.soft:hover { background:rgba(31,111,235,.16); transform:translateY(-2px); }

.admin-form .inp { width:100%; padding:11px 14px; margin:6px 0 16px; border:1px solid rgba(31,111,235,.18); border-radius:12px; font-family:inherit; font-size:14.5px; background:rgba(255,255,255,.7); box-sizing:border-box; transition:.2s; }
.admin-form .inp:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,235,.13); background:#fff; }
.admin-form select.inp, .admin-form textarea.inp { font-family:inherit; }
.admin-form label { display:block; font-size:13.5px; font-weight:600; color:#374151; margin:4px 0 2px; }
.admin-form .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.admin-form .chk { display:flex; align-items:center; gap:8px; font-weight:500; }
.admin-form .chk input { width:18px; height:18px; accent-color:var(--blue); }
.admin-form .img-preview { margin:10px 0 6px; }
.admin-form .img-preview img { width:100%; max-height:200px; object-fit:cover; border-radius:12px; border:1px solid rgba(31,111,235,.15); }
.thumb { width:64px; height:46px; object-fit:cover; border-radius:10px; border:1px solid rgba(31,111,235,.15); display:block; }
.thumb-empty { width:64px; height:46px; line-height:46px; text-align:center; color:#c3ccd9; background:rgba(148,163,184,.12); border-radius:10px; }

.inp { padding:10px 12px; border:1px solid #e6ebf2; border-radius:10px; font-family:inherit; font-size:14px; background:#fff; transition:.2s; box-sizing:border-box; }
.inp:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,235,.12); }
.admin-form label, .admin-card label { display:block; font-size:13.5px; font-weight:600; color:#374151; margin:10px 0 4px; }
.admin-card .inp { width:100%; }
.admin-card .chk { display:flex; align-items:center; gap:8px; font-weight:500; width:auto !important; }
.admin-card .chk input { width:18px; height:18px; accent-color:var(--blue); }

.discount-badge { position:absolute; top:10px; inset-inline-start:10px; z-index:3; background:linear-gradient(135deg,#e1143b,#ff4d6d); color:#fff; font-weight:800; font-size:13px; padding:5px 12px; border-radius:999px; box-shadow:0 6px 14px rgba(225,20,59,.4); }

.spec-table { border-radius:14px; overflow:hidden; border:1px solid rgba(31,111,235,.15); }
.spec-table table { width:100%; border-collapse:collapse; }
.spec-table th, .spec-table td { text-align:right; padding:10px 14px; font-size:14px; }
.spec-table th { background:rgba(31,111,235,.07); color:#1553b8; width:120px; font-weight:700; }
.spec-table td { color:#374151; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top:1px solid rgba(31,111,235,.1); }

.brand-logo { width:44px; height:44px; object-fit:contain; background:#fff; border:1px solid rgba(31,111,235,.15); border-radius:10px; padding:5px; }

/* Responsive inline grids */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.supply-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:22px; max-width:900px; }
.addr-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.dash-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width: 800px) { .detail-grid { grid-template-columns:1fr; } .dash-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 520px) { .supply-grid, .addr-grid { grid-template-columns:1fr; } .dash-grid { grid-template-columns:1fr; } }

@media (max-width: 520px) {
  .admin-form .form-grid { grid-template-columns:1fr; }
  .admin-tools { width:100%; }
  .admin-tools .btn-glass { flex:1; justify-content:center; }
  .admin-tab { flex:1; padding:10px 12px; font-size:13px; }
  .row-actions .btn-glass { flex:1; justify-content:center; }
}

/* ===== اجاره ابزار ===== */
.rent-page { width:100%; }
.rent-page > .container { width:100%; max-width:1360px; box-sizing:border-box; padding-inline:clamp(12px, 2vw, 28px); margin-inline:auto; }
.rent-page .rent-intro { color:var(--muted); max-width:800px; line-height:2; margin:0 0 16px; }
.rent-page .rent-cta { padding:12px 26px; }

.rent-group { margin-top:36px; }
.rent-group-title { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 4px; font-size:18px; color:var(--text); }
.rent-group-count { font-size:13px; font-weight:400; color:var(--muted); }

/* هر دسته گرید مستقل دارد؛ auto-placement در RTL از سمت راست شروع می‌شود. */
.rent-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  grid-auto-rows:1fr;
  grid-auto-flow:row;
  align-items:stretch;
  justify-content:start;
  direction:rtl;
  gap:18px;
  margin-top:18px;
}
@media (min-width:768px) and (max-width:1099.98px) {
  .rent-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
}
@media (max-width:767.98px) {
  .rent-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); grid-auto-rows:1fr; gap:12px; }
}
.rent-empty { text-align:center; padding:34px 0; color:var(--muted); }

.rent-card {
  position:relative;
  display:flex;
  flex-direction:column;
  height:100%;
  width:100%;
  min-width:0;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.rent-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.rent-card:focus-within { border-color:var(--blue); }

.rent-media { position:relative; aspect-ratio:16/10; background:#eef4fd; overflow:hidden; }
.rent-media img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.rent-card:hover .rent-media img { transform:scale(1.06); }
.rent-media::after { content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(to top, rgba(11,25,48,.30), rgba(11,25,48,0) 58%); }
.rent-ph { display:flex; align-items:center; justify-content:center; gap:8px; height:100%; color:var(--muted); font-size:13px; }
.rent-ph svg { width:26px; height:26px; }

.rent-badges { position:absolute; top:10px; inset-inline-start:10px; z-index:2; display:flex; flex-wrap:wrap; gap:6px; max-width:calc(100% - 20px); }
.rent-badge { font-size:11.5px; font-weight:700; border-radius:999px; padding:4px 10px; background:rgba(255,255,255,.94); color:var(--blue-dark); border:1px solid rgba(31,111,235,.25); }
.rent-badge.ok { color:#166534; background:rgba(220,252,231,.95); border-color:rgba(22,101,52,.30); }
.rent-badge.low { color:#b45309; background:rgba(254,243,199,.96); border-color:rgba(180,83,9,.30); }
.rent-badge.out { color:#6b7280; background:rgba(241,245,249,.96); border-color:rgba(107,114,128,.30); }

.rent-body { padding:14px; display:flex; flex-direction:column; gap:9px; flex:1; min-width:0; }
.rent-title { margin:0; font-size:17px; font-weight:800; line-height:1.7; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rent-desc { margin:0; font-size:12.5px; line-height:1.9; color:var(--muted);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

.rent-price-main { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px; }
.rent-price-main .amount { font-size:19px; font-weight:800; color:var(--blue); overflow-wrap:anywhere; }
.rent-price-main .unit { font-size:12.5px; color:var(--muted); }

.rent-chips { display:flex; flex-wrap:wrap; gap:8px; }
.rent-chip { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text); background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:5px 10px; }
.rent-chip b { font-weight:800; color:var(--blue-dark); }
.rent-chip .save { font-size:11px; font-weight:700; color:#166534; background:rgba(22,101,52,.10); border-radius:999px; padding:1px 7px; }
@media (min-width:768px) {
  .rent-chip { min-width:0; flex:1 1 100%; justify-content:space-between; flex-wrap:wrap; overflow-wrap:anywhere; }
  .rent-chip .save { white-space:normal; text-align:center; }
}

.rent-meta { display:flex; flex-direction:column; gap:6px; margin-top:0; padding-top:10px; border-top:1px dashed var(--border); font-size:12.5px; color:var(--muted); }
.rent-meta .item { display:flex; align-items:center; gap:7px; }
.rent-meta .item svg { width:15px; height:15px; flex:0 0 auto; color:var(--blue); }
.rent-meta .deposit { color:#b45309; }
.rent-meta .deposit svg { color:#b45309; }

.rent-action { display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; text-align:center; padding:9px 12px; margin:auto 0 0; }
.rent-card.is-out .rent-action { opacity:.5; }
.rent-type { display:inline-block; font-size:12px; color:var(--blue); background:rgba(31,111,235,.08); border-radius:20px; padding:3px 10px; }

/* کارت فشردهٔ دو ستونهٔ موبایل؛ قیمت‌ها زیر هم و متن بدون سرریز */
@media (max-width:520px) {
  .rent-grid { gap:10px; margin-top:14px; }
  .rent-body { padding:8px; gap:6px; }
  .rent-title { font-size:13px; line-height:1.55; }
  .rent-desc { font-size:11px; line-height:1.7; }
  .rent-price-main { flex-direction:column; align-items:flex-start; gap:2px; }
  .rent-price-main .amount { font-size:14px; line-height:1.5; }
  .rent-price-main .unit { font-size:10.5px; }
  .rent-chips { flex-direction:column; align-items:stretch; gap:5px; }
  .rent-chip { align-items:flex-start; flex-direction:column; justify-content:flex-start; font-size:10.5px; line-height:1.5; gap:2px; padding:4px 6px; min-width:0; overflow-wrap:anywhere; }
  .rent-chip b, .rent-chip .save { max-width:100%; overflow-wrap:anywhere; }
  .rent-chip .save { font-size:9.5px; padding:1px 5px; }
  .rent-meta { font-size:10.5px; line-height:1.55; gap:4px; padding-top:7px; }
  .rent-meta .item svg { width:13px; height:13px; }
  .rent-badges { top:7px; inset-inline-start:7px; gap:4px; }
  .rent-badge { font-size:10px; padding:3px 7px; }
  .rent-action { min-height:42px; padding:7px 4px; font-size:12px; }
}

/* کادر برجستهٔ شرایط تحویل در فرم اجاره */
.rent-notice {
  display:flex; align-items:flex-start; gap:10px;
  margin:14px 0 12px; padding:14px 16px;
  border-radius:12px; border:1px solid rgba(180,83,9,.35);
  background:rgba(254,243,199,.55); color:#7a4a06;
  font-size:14px; line-height:2; font-weight:700;
}
.rent-notice svg { width:20px; height:20px; flex:0 0 auto; margin-top:4px; }
html[data-theme="dark"] .rent-notice { color:#fcd34d; background:rgba(120,53,15,.30); border-color:rgba(252,211,77,.30); }
@media (max-width:520px) { .rent-notice { font-size:12.5px; padding:10px 12px; margin:10px 0 8px; } }

html[data-theme="dark"] .rent-media { background:#0f1b30; }
html[data-theme="dark"] .rent-badge { background:rgba(18,27,45,.94); color:#8ab4ff; border-color:rgba(138,180,255,.30); }
html[data-theme="dark"] .rent-badge.ok { color:#86efac; background:rgba(22,101,52,.25); border-color:rgba(134,239,172,.30); }
html[data-theme="dark"] .rent-badge.low { color:#fcd34d; background:rgba(120,53,15,.32); border-color:rgba(252,211,77,.30); }
html[data-theme="dark"] .rent-badge.out { color:#cbd5e1; background:rgba(30,41,59,.60); border-color:rgba(148,163,184,.30); }
html[data-theme="dark"] .rent-chip .save { color:#86efac; background:rgba(22,101,52,.22); }
html[data-theme="dark"] .rent-meta .deposit { color:#fcd34d; }
html[data-theme="dark"] .rent-meta .deposit svg { color:#fcd34d; }

/* ===== بنر اجاره ابزار (هم‌سبک با سکشن‌های chapter) ===== */
#rental-banner { text-align:right; }
.rental-cta { min-height:400px; }
.rental-cta .section-title { font-size:clamp(27px, 3.6vw, 46px); line-height:1.4; margin:14px 0 8px; }
.rental-cta p { color:#dce8ff; font-size:clamp(15px, 1.6vw, 20px); line-height:2.1; max-width:660px; margin:0; }
.rental-cta .rental-cta-btn { margin-top:26px; font-size:clamp(15px, 1.4vw, 18px); padding:15px 32px; border-radius:14px; }

/* ===== حالت استعلام قیمت ===== */
.inquiry-text { color:#0f3d8c; font-weight:800; }
.inquiry-badge { display:inline-block; font-size:12.5px; font-weight:700; color:#0f3d8c; background:rgba(31,111,235,.10); border:1px dashed rgba(31,111,235,.45); border-radius:10px; padding:4px 12px; }
.inquiry-cta { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:18px; }
.inquiry-cta .btn, .inquiry-cta .btn-glass { margin:0; }
.inquiry-banner { background:linear-gradient(90deg,#0f3d8c,#1f6feb); color:#fff; text-align:center; font-size:13.5px; font-weight:600; padding:9px 16px; }
.inquiry-banner a { color:#fff; text-decoration:underline; font-weight:800; }
html[data-theme="dark"] .inquiry-text { color:#8ab4ff; }
html[data-theme="dark"] .inquiry-badge { color:#8ab4ff; background:rgba(138,180,255,.12); border-color:rgba(138,180,255,.45); }

/* ===== ارسال بار (۴ عکس در ۲ ردیف دوتایی) ===== */
.shipping { padding:30px 0; }
.shipping .section-title { font-size:clamp(20px, 2.4vw, 30px); margin:0 0 6px; }
.shipping-sub { color:#7b8794; max-width:760px; line-height:1.9; margin:0; font-size:clamp(13px, 1.2vw, 16px); }
.ship-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; margin-top:18px; }
.ship-grid img { display:block; width:100%; height:100%; aspect-ratio:4 / 3; object-fit:cover; border-radius:16px; box-shadow:0 10px 24px rgba(16,42,80,.12); }
@media (min-width:701px) { .ship-grid img { aspect-ratio:auto; height:clamp(150px, 14vw, 200px); } }
@media (max-width:700px) { .ship-grid { gap:12px; margin-top:14px; } .ship-grid img { border-radius:12px; } }

/* ===== کاروسل پویا و پیوستهٔ ارسال بار ===== */
.shipping-carousel-section { padding:34px 0; }
.shipping-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px 24px; flex-wrap:wrap; }
.shipping-head .section-title { margin:0 0 6px; }
.shipping-badges { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.shipping-badges .glass-pill { padding:7px 12px; font-size:12.5px; border-radius:999px; }
html[data-theme="dark"] .shipping-sub { color:var(--muted); }

.ship-carousel { position:relative; isolation:isolate; width:100%; max-width:100%; margin-top:30px; }
.ship-ambient { position:absolute; z-index:-1; inset:-28px -3% -22px; overflow:hidden; pointer-events:none; }
.ship-waves { position:absolute; inset:auto -8% 0; width:116%; height:clamp(90px, 13vw, 165px); opacity:.22; }
.ship-wave { fill:var(--blue); transform-box:fill-box; transform-origin:center; }
.ship-wave-one { opacity:.22; animation:shipWave 20s ease-in-out infinite alternate; }
.ship-wave-two { opacity:.17; animation:shipWave 26s ease-in-out infinite alternate-reverse; }
.ship-wave-three { opacity:.13; animation:shipWave 32s ease-in-out infinite alternate; }
.ship-orb { position:absolute; display:block; width:clamp(90px, 14vw, 170px); aspect-ratio:1; border-radius:50%; filter:blur(34px); opacity:.2; background:radial-gradient(circle, var(--blue) 0%, transparent 72%); animation:shipFloat 12s ease-in-out infinite alternate; }
.ship-orb-one { inset-inline-start:8%; top:12%; }
.ship-orb-two { inset-inline-end:10%; bottom:6%; width:clamp(70px, 10vw, 130px); animation-delay:-5s; }
@keyframes shipWave { from { transform:translateX(-2%); } to { transform:translateX(2%); } }
@keyframes shipFloat { from { transform:translate3d(-8px, 4px, 0) scale(.94); } to { transform:translate3d(12px, -10px, 0) scale(1.08); } }
.ship-wave,.ship-orb { animation-play-state:paused; }
.shipping-carousel-section.is-in-view .ship-wave,.shipping-carousel-section.is-in-view .ship-orb { animation-play-state:running; }
.ship-track {
  --gap:16px;
  --slide-w:calc((100% - var(--gap)) / 2.2);
  position:relative;
  display:flex;
  align-items:center;
  gap:var(--gap);
  width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  padding-block:14px;
  scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  -ms-overflow-style:none;
  touch-action:pan-x pan-y;
  cursor:grab;
}
.ship-track::-webkit-scrollbar { display:none; }
.ship-track.is-enhanced { display:block; aspect-ratio:3.3 / 1; overflow:hidden; padding:0; scroll-snap-type:none; touch-action:pan-y; }
.ship-track.is-dragging { cursor:grabbing; user-select:none; }
.ship-track.is-dragging .ship-slide { transition:none; }
.ship-track:focus-visible { outline:3px solid var(--blue); outline-offset:3px; border-radius:20px; }
.ship-track.is-enhanced:focus-visible { outline-color:color-mix(in srgb,var(--blue) 68%,white); }
@supports (mask-image:linear-gradient(to right, transparent, #000)) {
  .ship-track { -webkit-mask-image:linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image:linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%); }
}
.ship-slide {
  position:relative;
  flex:0 0 var(--slide-w);
  min-width:0;
  aspect-ratio:3 / 2;
  scroll-snap-align:center;
  opacity:.78;
  transform:scale(.945);
  transform-origin:center;
  transition:opacity .28s ease, transform .28s ease;
  will-change:transform, opacity;
  backface-visibility:hidden;
}
.ship-slide.is-active { opacity:1; transform:scale(1); }
.ship-track.is-enhanced .ship-slide { position:absolute; top:50%; left:50%; width:var(--slide-w); flex:none; scroll-snap-align:none; opacity:var(--slide-opacity,.73); transform:translate3d(calc(-50% + var(--slide-x,0px)),-50%,0) perspective(1100px) rotateY(var(--slide-rotate,0deg)) scale(var(--slide-scale,.945)); }
.ship-track.is-enhanced .ship-slide.is-active { opacity:1; transform:translate3d(calc(-50% + var(--slide-x,0px)),-50%,0) perspective(1100px) rotateY(var(--slide-rotate,0deg)) scale(1); }
.ship-figure {
  position:relative;
  margin:0;
  aspect-ratio:3 / 2;
  overflow:hidden;
  border:1px solid transparent;
  border-radius:24px 40px 27px 36px;
  background:linear-gradient(var(--card),var(--card)) padding-box, linear-gradient(135deg,rgba(31,111,235,.2),rgba(255,255,255,.92),rgba(31,111,235,.7)) border-box;
  box-shadow:0 18px 38px rgba(16,42,80,.15),0 0 30px rgba(31,111,235,.08);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}
.ship-figure img { position:absolute; inset:1px; display:block; width:calc(100% - 2px); height:calc(100% - 2px); object-fit:cover; border-radius:inherit; transform:translateX(var(--parallax,0)) scale(1.015); transition:transform .55s ease; }
.ship-figure::after { content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:linear-gradient(to top,rgba(8,22,45,.17),transparent 48%),linear-gradient(112deg,transparent 18%,rgba(255,255,255,.36) 48%,transparent 64%); background-size:100% 100%,220% 100%; background-position:0 0,-140% 0; }
.ship-slide.is-active .ship-figure { box-shadow:0 20px 44px rgba(16,42,80,.19),0 0 34px rgba(31,111,235,.17); }
.ship-slide.is-active .ship-figure::after { animation:shipShine 1.1s ease-out both; animation-play-state:paused; }
.shipping-carousel-section.is-in-view .ship-slide.is-active .ship-figure::after { animation-play-state:running; }
@keyframes shipShine { to { background-position:0 0,140% 0; } }
@media (hover:hover) and (pointer:fine) {
  .ship-slide:hover .ship-figure img { transform:translateX(var(--parallax,0)) scale(1.055); }
  .ship-slide:hover .ship-figure { box-shadow:0 20px 44px rgba(16,42,80,.2),0 0 34px rgba(31,111,235,.17); }
}
.ship-nav { position:absolute; top:-24px; z-index:4; display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; padding:0; border:1px solid rgba(31,111,235,.36); border-radius:50%; color:var(--blue-dark); background:rgba(255,255,255,.72); box-shadow:0 8px 22px rgba(16,42,80,.12),inset 0 1px 0 rgba(255,255,255,.9); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); cursor:pointer; transition:transform .2s ease,box-shadow .2s ease,background .2s ease; }
.ship-nav svg { width:20px; height:20px; }
.ship-nav-prev { right:0; }
.ship-nav-next { left:0; }
.ship-nav:hover:not(:disabled) { transform:translateY(-2px) scale(1.05); box-shadow:0 12px 28px rgba(31,111,235,.22); }
.ship-nav:active:not(:disabled) { transform:scale(.94); }
.ship-nav:disabled { opacity:.4; cursor:default; }
.ship-nav:focus-visible,.ship-dot:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
html[data-theme="dark"] .ship-nav { color:#dbe8ff; background:rgba(15,23,40,.78); border-color:rgba(91,155,245,.5); }
.ship-dots { display:flex; justify-content:center; align-items:center; gap:3px; min-height:38px; margin:0 auto; }
.ship-dot { display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:36px; border:0; padding:0; background:transparent; cursor:pointer; }
.ship-dot::before { content:''; display:block; width:8px; height:8px; border-radius:999px; background:color-mix(in srgb,var(--blue) 34%,transparent); transition:width .25s ease,background .25s ease,box-shadow .25s ease; }
.ship-dot.is-active::before { width:21px; background:var(--blue); box-shadow:0 0 12px color-mix(in srgb,var(--blue) 42%,transparent); }
html[data-theme="dark"] .ship-dot::before { background:rgba(138,180,255,.4); }
html[data-theme="dark"] .ship-dot.is-active::before { background:var(--blue); }
html[data-theme="dark"] .ship-figure { box-shadow:0 18px 38px rgba(0,0,0,.42),0 0 28px rgba(91,155,245,.11); background:linear-gradient(var(--card),var(--card)) padding-box,linear-gradient(135deg,rgba(91,155,245,.26),rgba(255,255,255,.3),rgba(91,155,245,.78)) border-box; }

@media (max-width:1024px) { .ship-track { --slide-w:calc((100% - var(--gap)) / 1.5); } .ship-track.is-enhanced { aspect-ratio:2.25 / 1; } }
@media (max-width:640px) {
  .shipping-carousel-section { padding:26px 0; }
  .shipping-head { align-items:flex-start; }
  .shipping-badges .glass-pill { padding:6px 10px; font-size:11.5px; }
  .ship-carousel { margin-top:28px; }
  .ship-track { --gap:10px; --slide-w:calc((100% - var(--gap)) / 1.15); }
  .ship-track.is-enhanced { aspect-ratio:1.725 / 1; }
  .ship-figure { border-radius:17px 27px 18px 25px; }
  .ship-nav { top:-24px; width:44px; height:44px; }
  .ship-nav svg { width:18px; height:18px; }
  .ship-ambient { inset:-20px -2% -8px; }
  .ship-orb { filter:blur(26px); opacity:.15; }
  .ship-wave-two,.ship-wave-three { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .ship-wave,.ship-orb,.ship-slide,.ship-figure img,.ship-figure::after,.ship-nav,.ship-dot::before { animation:none!important; transition:none!important; }
  .ship-track { scroll-behavior:auto; }
}


/* ===== هیرو سبک‌تر در موبایل (کامپیوتر دست‌نخورده) ===== */
@media (max-width:700px) {
  .hero { min-height:auto; padding:64px 0 52px; animation:none; }
  .hero::before { animation: kenburns 24s ease-in-out infinite; transform: scale(1.06); will-change: transform; }
  .hero h1 { font-size:clamp(22px, 6.2vw, 28px); }
  .hero p { font-size:14px; margin:0 0 18px; }
  .hero .hero-btns { gap:10px; }
}

.rent-line { display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid #eef2f7; }
.rent-line .rl-img { width:64px; height:64px; border-radius:10px; overflow:hidden; background:#f4f6fa; }
.rent-line .rl-img img { width:100%; height:100%; object-fit:cover; }
.rent-line .rl-info b { display:block; color:#12294a; font-size:14px; }
.rent-line .rl-info span { font-size:12px; color:#6b7280; }
.rent-line .rl-qty { display:flex; align-items:center; gap:8px; }
.rent-line input[type=number] { width:64px; padding:8px; border:1px solid #e6ebf2; border-radius:10px; font-family:inherit; }
.rent-line .rl-avail { font-size:12px; color:#6b7280; }

.terms-box { background:#fffdf6; border:1px solid #f5e1b8; border-radius:12px; padding:16px; margin:14px 0; max-height:260px; overflow:auto; font-size:13.5px; line-height:2; color:#433; text-align:right; }
.terms-ok { font-size:14px; }

.sum-card { background:#fff; border:1px solid rgba(31,111,235,.12); border-radius:16px; padding:18px; margin-bottom:16px; }
.sum-card h3 { margin:0 0 12px; font-size:16px; color:#12294a; }
.sum-row { display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid #eef2f7; font-size:14px; }
.sum-row.total { border-bottom:none; color:#0f3d8c; font-weight:800; font-size:17px; }
.sum-detail { display:flex; gap:10px; align-items:center; padding:8px 0; border-bottom:1px dashed #eef2f7; }
.sum-detail img { width:46px; height:46px; border-radius:8px; object-fit:cover; }
.sum-detail .sd-info b { display:block; font-size:14px; }
.sum-detail .sd-info span { font-size:12.5px; color:#6b7280; }
.sum-detail .sd-total { margin-inline-start:auto; font-weight:700; color:#0f3d8c; }
@media (max-width:560px) { .rent-line { grid-template-columns:52px 1fr; } .rent-line .rl-qty { grid-column:1/-1; } }

.brands {
    padding: 40px 0;
    text-align: center;
}

.brands-title {
    margin-bottom: 24px;
}

.brands-slider {
    overflow: hidden;
    direction: ltr;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.brands-track {
    display: flex;
    width: max-content;
    animation: brands-scroll 30s linear infinite;
}

.brands-group {
    display: flex;
    align-items: center;
}

    .brands-group img {
        height: 60px;
        width: auto;
        margin-right: 60px;
        flex-shrink: 0;
    }

        .brands-group img[alt="Gypsiran"] {
            height: 45px;
        }

.brands-slider:hover .brands-track {
    animation-play-state: paused;
}

@keyframes brands-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    .brands-group img {
        height: 40px;
        margin-right: 36px;
    }

        .brands-group img[alt="Gypsiran"] {
            height: 30px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .brands-track {
        animation: none;
    }
}

/* ===== Company logo (header / footer) ===== */
.header-inner .brand { display: flex; align-items: center; }
.header-inner .brand .brand-mark { height: 54px; width: auto; max-width: 200px; object-fit: contain; display: block; }
@media (max-width: 640px) { .header-inner .brand .brand-mark { height: 42px; } }

.f-brand { display: inline-flex; align-items: center; margin-bottom: 12px; }
.f-brand img { height: 58px; width: auto; max-width: 210px; object-fit: contain; }

/* ===== Social links ===== */
.f-social { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; width: 100%; }
.social-link { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 12px; font-size: 13px;
    color: #33414f; background: rgba(255,255,255,.6); border: 1px solid rgba(31,111,235,.14);
    box-shadow: 0 2px 6px rgba(16,42,80,.04), inset 0 1px 0 rgba(255,255,255,.6); transition: .2s; }
.social-link:hover { background: #fff; color: var(--blue); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31,111,235,.14); }
.social-link img { width: 22px; height: 22px; border-radius: 7px; object-fit: contain; flex-shrink: 0; }
.social-link span { direction: ltr; font-weight: 600; letter-spacing: .3px; }

.f-location { display: flex; width: 100%; align-items: flex-start; gap: 8px; margin-top: 6px; font-size: 13px; color: #33414f;
    line-height: 1.9; background: rgba(255,255,255,.5); border: 1px dashed rgba(31,111,235,.3); border-radius: 12px; padding: 10px 12px; transition: .2s; }
.f-location:hover { background: #fff; color: var(--blue); }
.f-location .pin { font-size: 16px; line-height: 1.5; }

/* ===== Contact page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.contact-card h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-row { display: flex; gap: 8px; }
.contact-row > .contact-item { flex: 1 1 0; min-width: 0; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #33414f; padding: 9px 12px; border-radius: 12px;
    background: rgba(31,111,235,.05); border: 1px solid rgba(31,111,235,.12); transition: .2s; }
.contact-item b { font-weight: 700; }
.contact-item small { display: block; font-size: 12px; color: #5b6b7e; direction: ltr; }
.contact-item:hover { background: rgba(31,111,235,.1); color: var(--blue); transform: translateY(-2px); }
.contact-item img { width: 24px; height: 24px; border-radius: 7px; object-fit: contain; flex-shrink: 0; }
.contact-item .ci-ic { font-size: 19px; line-height: 1; }
.contact-map { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #eef4fd; }
.contact-map iframe { display: block; width: 100%; height: 440px; border: 0; }
@media (max-width: 900px) { .contact-map iframe { height: 340px; } }
.map-note { font-size: 13.5px; color: var(--muted); line-height: 1.9; margin: 0 0 14px; }
.map-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.topbar a { color: #cfe0ff; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* ===== Product filters (chips) ===== */
.filter-bar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); font-size: 13.5px; font-weight: 600; border: 1px solid var(--border);
  white-space: nowrap; transition: .2s; }
.chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,111,235,.16); }
.chip.on { background: var(--blue); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(31,111,235,.28); }
.price-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.price-filter .inp { width: 150px; margin: 0; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 8px 14px; }
  .price-filter .inp { flex: 1 1 0; width: auto; min-width: 0; }
  .price-filter .btn { width: 100%; }
}

/* ===== Category attributes (admin product form) ===== */
.attr-head { margin: 0 0 6px; font-size: 16px; }
.attr-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.attr-unit { font-weight: 400; color: var(--muted); font-size: 12px; }
.attr-empty { margin: 0; color: var(--muted); font-size: 13px; }

/* ===== Theme toggle button ===== */
.theme-toggle { background: none; border: none; padding: 0; cursor: pointer; font-size: 18px; line-height: 1; font-family: inherit; }
.theme-toggle:hover { transform: scale(1.12); transition: .2s; }

/* ===== Dark theme ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #5b9bf5;
  --blue-dark: #3f7fe0;
  --blue-soft: #1b2840;
  --bg: #0b1220;
  --text: #e7eef8;
  --muted: #95a4ba;
  --border: #26334d;
  --card: #121b2d;
  --shadow: 0 16px 36px rgba(0,0,0,.55);
}
html[data-theme="dark"] body { background: linear-gradient(125deg,#0a1120,#0e1a30 35%,#0a1120 60%,#0d1830 100%); }
html[data-theme="dark"] body::after { opacity: .1; }
html[data-theme="dark"] .topbar { background: #0a1730; color: #a9c0e6; }
html[data-theme="dark"] .topbar a { color: #a9c0e6; }
html[data-theme="dark"] .topbar a:hover { color: #fff; }
html[data-theme="dark"] .site-header { background: rgba(11,18,32,.92); }
html[data-theme="dark"] .brand span { color: var(--text); }

html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .inp,
html[data-theme="dark"] .auth-input,
html[data-theme="dark"] .admin-form .inp { background: #0f1728; color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .search-box input::placeholder,
html[data-theme="dark"] .inp::placeholder { color: var(--muted); }
html[data-theme="dark"] #liveResults { background: #121b2d !important; border-color: var(--border) !important; }
html[data-theme="dark"] .admin-form .inp:focus { background: #0f1728; }

html[data-theme="dark"] .features,
html[data-theme="dark"] .table,
html[data-theme="dark"] .proj-card,
html[data-theme="dark"] .rent-card,
html[data-theme="dark"] .sum-card,
html[data-theme="dark"] .proj-filter,
html[data-theme="dark"] .auth-resend { background: var(--card); border-color: var(--border); }
html[data-theme="dark"] .table th { background: #182440; }

html[data-theme="dark"] .product-img,
html[data-theme="dark"] .proj-img,
html[data-theme="dark"] .rent-img,
html[data-theme="dark"] .rent-line .rl-img,
html[data-theme="dark"] .contact-map { background: #0f1728; }
html[data-theme="dark"] .contact-map { background: #0f1728; border-color: var(--border); }

html[data-theme="dark"] .footer-grid > div,
html[data-theme="dark"] .f-links a,
html[data-theme="dark"] .social-link,
html[data-theme="dark"] .f-address,
html[data-theme="dark"] .f-location,
html[data-theme="dark"] .contact-item,
html[data-theme="dark"] .glass-pill,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-tabs,
html[data-theme="dark"] .admin-tab { background: rgba(255,255,255,.045); border-color: var(--border); color: var(--text); }
html[data-theme="dark"] .f-links a:hover,
html[data-theme="dark"] .social-link:hover,
html[data-theme="dark"] .f-address:hover,
html[data-theme="dark"] .f-location:hover,
html[data-theme="dark"] .contact-item:hover,
html[data-theme="dark"] .glass-pill:hover,
html[data-theme="dark"] .admin-tab:hover { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .glass-pill { color: #bcd4fb; }
html[data-theme="dark"] .site-footer { color: var(--text); background: rgba(255,255,255,.02); }
html[data-theme="dark"] .site-footer h4 { color: var(--text); }
html[data-theme="dark"] .f-desc, html[data-theme="dark"] .f-meta { color: var(--muted); }
html[data-theme="dark"] .f-chip { color: var(--muted); }

html[data-theme="dark"] .admin-table td { color: var(--text); border-top-color: rgba(255,255,255,.06); }
html[data-theme="dark"] .admin-table thead tr { background: rgba(91,155,245,.12); }
html[data-theme="dark"] .admin-table tbody tr:hover { background: rgba(91,155,245,.08); }
html[data-theme="dark"] .admin-table th { color: #bcd4fb; }
html[data-theme="dark"] .admin-form label,
html[data-theme="dark"] .admin-card label { color: var(--muted); }
html[data-theme="dark"] .spec-table th { background: rgba(91,155,245,.12); color: #bcd4fb; }
html[data-theme="dark"] .spec-table td { color: var(--text); }
html[data-theme="dark"] .spec-table { border-color: var(--border); }
html[data-theme="dark"] .spec-table tr + tr th,
html[data-theme="dark"] .spec-table tr + tr td { border-top-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .terms-box { background: #1a1a12; border-color: #40361c; color: #e6dfcd; }
html[data-theme="dark"] .btn { background: var(--card); color: var(--blue); border: 1px solid var(--border); }
html[data-theme="dark"] .btn-secondary { background: var(--card); }
html[data-theme="dark"] .rent-body h3,
html[data-theme="dark"] .sum-card h3,
html[data-theme="dark"] .proj-body h3,
html[data-theme="dark"] .rent-line .rl-info b { color: var(--text); }
html[data-theme="dark"] .rent-price,
html[data-theme="dark"] .rent-totals,
html[data-theme="dark"] .sum-detail .sd-info span { color: var(--muted); }
@media (max-width: 860px) {
  html[data-theme="dark"] .main-nav { background: #0f1728; border-bottom-color: var(--border); }
}

/* Inline-style colour overrides (views use hard-coded hex values) */
html[data-theme="dark"] [style*="#12294a"],
html[data-theme="dark"] [style*="#102a50"],
html[data-theme="dark"] [style*="#0f3d8c"],
html[data-theme="dark"] [style*="#1553b8"],
html[data-theme="dark"] [style*="#1c2733"],
html[data-theme="dark"] [style*="#33414f"],
html[data-theme="dark"] [style*="#374151"],
html[data-theme="dark"] [style*="#4b5a6d"],
html[data-theme="dark"] [style*="#5b6779"],
html[data-theme="dark"] [style*="#6b7280"],
html[data-theme="dark"] [style*="#7b8794"] { color: #cbd8ec !important; }
html[data-theme="dark"] [style*="#e8f1fe"] { background: rgba(91,155,245,.16) !important; }
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"] { background: var(--card) !important; }

/* ===== Gallery (product / project detail) ===== */
.product-media { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .proj-img-empty { border-radius: 16px; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 78px; height: 78px; padding: 0; border: 2px solid var(--border); border-radius: 12px;
  background: #eef4fd; overflow: hidden; cursor: pointer; transition: .2s; flex: 0 0 auto; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { border-color: var(--blue); transform: translateY(-2px); }
.gallery-thumb.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,235,.22); }
@media (max-width: 560px) {
  .gallery-thumb { width: 64px; height: 64px; }
  .gallery-main { height: 260px !important; }
}

/* ===== Admin image manager ===== */
.img-manage { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.img-manage-item { border: 2px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.img-manage-item.is-main { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,235,.18); }
.img-manage-item img { width: 100%; height: 96px; object-fit: cover; display: block; }
.img-manage-main, .img-manage-del { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 9px; color: var(--muted); cursor: pointer; margin: 0; }
.img-manage-del { border-top: 1px solid var(--border); }
.img-manage-main input, .img-manage-del input { margin: 0; }

/* clickable project cards */
a.proj-img { display: block; }
.proj-card-link { display: block; color: inherit; }
.proj-card-link:hover h3, h3 a:hover { color: var(--blue); }
h3 a { color: inherit; }

html[data-theme="dark"] .gallery-thumb { background: #0f1728; }

/* ===== ابزارهای گزارش‌های مالی (مرحله ۳) ===== */
.rlbl { color: var(--muted); }
.chip-row { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.filter-row { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.pager { display:flex; gap:6px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.pager .pg-on { padding:6px 12px; background:#0f3d8c; color:#fff; border-radius:8px; }
.pager .pg-off { padding:6px 12px; background:rgba(31,111,235,.12); color:inherit; border-radius:8px; text-decoration:none; }
.pager .pg-off:hover { background:rgba(31,111,235,.22); }
.print-head { display:none; }

/* ===== چاپ: فقط محتوای گزارش — بدون منو، دکمه و فرم (بدون !important) ===== */
@media print {
  @page { margin: 12mm; }

  /* حالت تیره هنگام چاپ به روشن برمی‌گردد تا متن روی کاغذ سفید خوانا بماند */
  html, html[data-theme="dark"] {
    color-scheme: light;
    --blue:#0f3d8c; --blue-dark:#0b2f6b; --blue-soft:#e8eefb;
    --bg:#fff; --text:#111827; --muted:#4b5563; --border:#d7dde7;
    --card:#fff; --shadow:none;
  }

  /* پس‌زمینه سفید حتی در حالت تیره */
  body, html[data-theme="dark"] body { background:#fff; }
  body::after { display:none; }

  /* حذف بنر، نوار بالا، هدر و منو، برندها، فوتر و ابزارهای تعاملی */
  .inquiry-banner, .topbar, .site-header, .main-nav, .brands, .site-footer,
  .admin-tabs, .admin-tools, .admin-search, .btn-glass, .row-actions,
  .pager, .no-print, .chip-row, .filter-row, .nav-badge { display:none; }

  /* سربرگ چاپیِ خودِ گزارش (فقط در چاپ دیده می‌شود) */
  .print-head { display:flex; align-items:center; gap:8px; margin-bottom:12px;
    padding:8px 12px; border-inline-start:4px solid #0f3d8c; background:#f4f7fd;
    border-radius:8px; font-size:14px; }

  /* چیدمان فشرده؛ جدول بدون برش افقی و با تکرار سرصفحه */
  .section, .admin-wrap { padding:0; }
  .container { max-width:none; padding:0; margin:0; }
  .admin-card { box-shadow:none; background:transparent; border-color:transparent; margin-bottom:10px; }
  .table-wrap { overflow:visible; }
  .admin-table { min-width:0; font-size:12px; }
  .admin-table thead { display:table-header-group; }
  .admin-table tr { page-break-inside:avoid; }
  .admin-table th, .admin-table td { padding:6px 8px; }

  /* رنگ‌های هاردکد حالت تیره که با متغیر درست نمی‌شوند */
  html[data-theme="dark"] .admin-table th { color:#1553b8; }
  html[data-theme="dark"] .admin-table td { border-top-color:rgba(31,111,235,.08); }
  html[data-theme="dark"] .admin-table thead tr { background:rgba(31,111,235,.10); }
  html[data-theme="dark"] .admin-card { background:transparent; }

  /* لینک‌ها بدون رنگ آبی و زیرخط در کاغذ */
  a { color:inherit; text-decoration:none; }
}

/* =====================================================================
   صفحهٔ محصولات — بازطراحی ظاهری (فقط استایل؛ منطق دست‌نخورده)
   همه رنگ‌ها از متغیرهای سراسری می‌آیند تا حالت روشن/تیره خودکار درست باشد.
   ===================================================================== */
.products-page { padding-top: 30px; }

/* ---------- هدر صفحه ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-title { font-size: clamp(22px, 3.4vw, 30px); margin: 0; display: flex; align-items: center; gap: 10px; }
.page-title::before { content: ''; width: 6px; height: 28px; background: linear-gradient(180deg, var(--blue), var(--blue-dark)); border-radius: 4px; }
.page-sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.page-head-count {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 84px; padding: 10px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.page-head-count .count-num { font-size: 24px; font-weight: 800; color: var(--blue); line-height: 1.1; }
.page-head-count .count-lbl { font-size: 12px; color: var(--muted); }

.cart-error { background: #fef3c7; color: #92400e; padding: 10px 14px; border-radius: 12px; border: 1px solid #fde68a; }

/* ---------- نوار فیلتر چسبان ---------- */
.filter-wrap { position: sticky; top: 74px; z-index: 40; margin-bottom: 22px; }
.filter-bar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: box-shadow .28s ease, background .28s ease, border-color .28s ease;
}
.filter-wrap.is-stuck .filter-bar {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 14px 30px rgba(16, 42, 80, .14);
  border-color: color-mix(in srgb, var(--blue) 24%, var(--border));
}
.filter-row { margin: 0; }

/* ---------- چیپ‌های دسته‌بندی ---------- */
.chip-row { scroll-behavior: smooth; }
.chip {
  gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--blue-soft) 70%, var(--card));
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.chip .chip-ic { display: inline-flex; width: 16px; height: 16px; }
.chip .chip-ic svg { width: 100%; height: 100%; }
.chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 111, 235, .16); }
.chip.on { box-shadow: 0 8px 20px rgba(31, 111, 235, .30); }
.chip.on .chip-ic { opacity: .95; }

/* ---------- جعبهٔ قیمت + مرتب‌سازی ---------- */
.filter-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.price-box, .sort-box {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 60%, var(--card));
  border: 1px solid var(--border);
}
.price-box-ic, .sort-box-ic { display: inline-flex; width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }
.price-box-ic svg, .sort-box-ic svg { width: 100%; height: 100%; }
.price-field { display: flex; align-items: center; gap: 6px; }
.price-field-lbl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.price-box .inp.price-inp { width: 118px; margin: 0; padding: 8px 10px; border-radius: 10px; text-align: center; }
.price-sep { width: 12px; height: 1px; background: var(--border); flex-shrink: 0; }
.sort-box .inp.sort-select { margin: 0; padding: 8px 10px; border-radius: 10px; width: auto; min-width: 130px; cursor: pointer; }
.filter-actions { display: flex; gap: 8px; align-items: center; }
.filter-actions .btn { padding: 10px 20px; border-radius: 12px; }
.filter-actions .btn.filter-clear {
  background: transparent; color: var(--muted); border: 1px solid var(--border); font-weight: 600;
}
.filter-actions .btn.filter-clear:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--border)); transform: none; box-shadow: none; }

/* ---------- گرید ---------- */
.products-page .grid.pcard-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 1100px) { .products-page .grid.pcard-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .products-page .grid.pcard-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 420px)  { .products-page .grid.pcard-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ---------- کارت محصول ---------- */
.pcard {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 42, 80, .06);
  transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(16, 42, 80, .16); border-color: color-mix(in srgb, var(--blue) 28%, var(--border)); }

.pcard-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(160deg, var(--blue-soft), color-mix(in srgb, var(--blue-soft) 40%, var(--card))); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pcard:hover .pcard-media img { transform: scale(1.07); }

/* placeholder زیبا برای محصول بدون عکس */
.pcard-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--blue-soft) 85%, var(--card)), color-mix(in srgb, var(--blue) 14%, var(--card))); }
.pcard-ph-initial { font-size: 46px; font-weight: 800; color: color-mix(in srgb, var(--blue) 70%, var(--text)); line-height: 1; opacity: .55; }
.pcard-ph-brand { font-size: 12.5px; color: var(--muted); max-width: 80%; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard:hover .pcard-ph-initial { transform: scale(1.07); transition: transform .5s ease; }

/* برچسب تخفیف */
.pcard-badge {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(135deg, #e1143b, #ff4d6d); color: #fff;
  box-shadow: 0 6px 14px rgba(225, 20, 59, .38);
}
.pcard-badge .pcard-badge-off { font-weight: 800; }
.pcard-badge.soft { background: color-mix(in srgb, var(--blue) 16%, var(--card)); color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--border)); box-shadow: none; }

.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; gap: 8px; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.pcard-tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--blue-soft) 70%, var(--card)); color: var(--blue); }
.pcard-tag.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.pcard-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.7; min-height: 3.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a { color: var(--text); transition: color .2s ease; }
.pcard:hover .pcard-title a { color: var(--blue); }

.pcard-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: auto; }
.pcard-price-old { font-size: 13.5px; color: #76818d; text-decoration: line-through; }
.pcard-price-final { display: inline-flex; align-items: baseline; gap: 5px; }
.pcard-price-final .num { font-size: 22px; font-weight: 800; color: var(--blue); letter-spacing: -.2px; }
.pcard-price-final .unit { font-size: 12.5px; color: #6b7783; font-weight: 500; }
.pcard-inquiry { font-size: 16px; font-weight: 800; color: color-mix(in srgb, var(--blue) 80%, var(--text)); }

.pcard-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pcard-cart-form { margin: 0; flex-shrink: 0; }
.pcard-icon-btn {
  position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; cursor: pointer; color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 75%, var(--card));
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border));
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pcard-icon-btn svg { width: 20px; height: 20px; }
.pcard-icon-btn .pcard-icon-plus { position: absolute; width: 12px; height: 12px; bottom: 7px; inset-inline-end: 7px; background: inherit; border-radius: 50%; }
.pcard-icon-btn:hover { background: var(--blue); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 111, 235, .30); }
.pcard-icon-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }

.pcard-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
  color: var(--blue); background: color-mix(in srgb, var(--blue-soft) 55%, var(--card));
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border));
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pcard-btn svg { width: 17px; height: 17px; transition: transform .2s ease; }
.pcard-btn:hover { background: var(--blue); color: #fff; box-shadow: 0 10px 22px rgba(31, 111, 235, .28); }
.pcard-btn:hover svg { transform: translateX(-3px); }
.pcard-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.pcard-btn.ghost { width: 100%; }

/* ---------- حالت خالی ---------- */
.empty-state { text-align: center; padding: 46px 20px; border-radius: 22px;
  background: var(--card); border: 1px dashed var(--border); }
.empty-state .empty-ic { display: inline-flex; width: 62px; height: 62px; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--blue); background: var(--blue-soft); margin-bottom: 12px; }
.empty-state .empty-ic svg { width: 30px; height: 30px; }
.empty-state h2 { margin: 0 0 8px; font-size: 19px; }
.empty-state p { margin: 0 auto 18px; color: var(--muted); font-size: 14px; max-width: 380px; line-height: 2; }

/* ---------- صفحه‌بندی ---------- */
.pager { align-items: center; }
.pager .pg-nav { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 12px; color: var(--blue); background: color-mix(in srgb, var(--blue-soft) 60%, var(--card));
  border: 1px solid var(--border); transition: background .2s ease, color .2s ease, transform .2s ease; }
.pager .pg-nav svg { width: 18px; height: 18px; }
.pager .pg-nav:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

/* ---------- Skeleton ---------- */
.pcard-skeleton { pointer-events: none; }
.sk-shim { position: relative; overflow: hidden; background: color-mix(in srgb, var(--border) 60%, var(--card)); }
.sk-shim::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 70%, transparent), transparent);
  animation: skShimmer 1.3s infinite; }
.pcard-skeleton .pcard-media { aspect-ratio: 1 / 1; }
.sk-line { height: 12px; border-radius: 6px; margin: 8px 0; }
.sk-40 { width: 40%; }
.sk-60 { width: 60%; }
.sk-90 { width: 90%; }
@keyframes skShimmer { 100% { transform: translateX(100%); } }

/* ---------- موبایل: چیپ‌های اسکرول افقی با محو لبه ---------- */
@media (max-width: 860px) {
  /* در این عرض هدر دیگر چسبان نیست؛ نوار فیلتر بدون فاصلهٔ خالی به بالای صفحه می‌چسبد. */
  .filter-wrap { top: 0; margin-bottom: 16px; }
  .filter-bar { padding: 10px 12px; gap: 10px; border-radius: 18px; }
  .filter-tools { gap: 10px; }
}
@media (max-width: 640px) {
  /* نوار فیلتر موبایل: فقط دو ردیف کوتاه (چیپ‌ها + ابزارها) و در حالت چسبان فقط یک ردیف. */
  .filter-wrap { top: 0; margin-bottom: 12px; }
  .filter-bar { padding: 8px 10px; gap: 8px; border-radius: 16px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head-count { flex-direction: row; gap: 6px; padding: 8px 14px; min-width: 0; }
  .chip-row {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 6px 11px; font-size: 12px; gap: 5px; }
  .chip .chip-ic { width: 14px; height: 14px; }

  /* ابزارهای قیمت و مرتب‌سازی در یک ردیف جمع‌وجور */
  .filter-tools { flex-wrap: wrap; gap: 6px; align-items: center; }
  .price-box {
    flex: 1 1 140px; min-width: 0; flex-wrap: nowrap;
    gap: 4px; padding: 3px 6px; border-radius: 12px;
  }
  .price-box-ic { display: none; }
  .price-field { flex: 1 1 0; min-width: 0; gap: 0; }
  .price-field-lbl { display: none; }
  .price-box .inp.price-inp {
    width: 100%; min-width: 0; margin: 0; padding: 6px 2px;
    font-size: 12px; border-radius: 8px;
  }
  .price-sep { width: 8px; margin: 0 1px; }
  .sort-box {
    flex: 0 0 auto; width: auto; gap: 0;
    padding: 3px 6px; border-radius: 12px;
  }
  .sort-box-ic { display: none; }
  .sort-box .inp.sort-select {
    width: 82px; min-width: 0; margin: 0; padding: 6px 2px;
    font-size: 12px; border-radius: 8px;
  }
  .filter-actions { width: auto; flex: 0 0 auto; gap: 4px; }
  .filter-actions .btn { flex: 0 0 auto; padding: 7px 12px; font-size: 12px; border-radius: 10px; }
  /* دکمهٔ پاک‌کردن در موبایل فقط یک ضربدر جمع‌وجور است (متن برای صفحه‌خوان‌ها می‌ماند). */
  .filter-actions .btn.filter-clear { padding: 6px 10px; font-size: 0; line-height: 1; }
  .filter-actions .btn.filter-clear::before { content: '×'; font-size: 17px; line-height: 1; }

  /* وقتی کاربر اسکرول می‌کند، ردیف دسته‌بندی‌ها جمع می‌شود تا فقط یک نوار باریک بماند. */
  .filter-wrap.is-stuck .filter-row { display: none; }
  .filter-wrap.is-stuck .filter-bar { padding: 6px 8px; }

  .pcard-title { font-size: 14px; min-height: 3.2em; }
  .pcard-price-final .num { font-size: 19px; }
}

/* ---------- دسترس‌پذیری: احترام به prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard-media img, .pcard-ph-initial, .pcard-btn, .pcard-btn svg,
  .pcard-icon-btn, .chip, .pg-nav, .filter-bar, .sk-shim::after {
    transition: none; animation: none;
  }
  .pcard:hover { transform: none; }
  .pcard:hover .pcard-media img, .pcard:hover .pcard-ph-initial { transform: none; }
}

/* ---------- حالت تیره: تنظیمات ظریف ---------- */
html[data-theme="dark"] .pcard { box-shadow: 0 8px 22px rgba(0, 0, 0, .40); }
html[data-theme="dark"] .pcard:hover { box-shadow: 0 22px 44px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .filter-wrap.is-stuck .filter-bar { box-shadow: 0 14px 30px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .pcard-ph { background: linear-gradient(150deg, #16223a, #1b2b47); }
html[data-theme="dark"] .pcard-ph-initial { color: color-mix(in srgb, var(--blue) 60%, #fff); opacity: .5; }
html[data-theme="dark"] .cart-error { background: rgba(120, 53, 15, .30); color: #fcd34d; border-color: rgba(252, 211, 77, .30); }
html[data-theme="dark"] .empty-state { background: var(--card); }
/* کنتراست کافی چیپ فعال در حالت تیره: پس‌زمینهٔ آبی تیره با متن روشن */
html[data-theme="dark"] .chip.on { background: #2456b0; color: #fff; border-color: transparent; }
html[data-theme="dark"] .chip.on .chip-ic { color: #fff; }

/* فیلتر یکپارچهٔ کارت‌های اجاره */
.rent-category-filters {
  display:flex; align-items:center; gap:9px; margin:20px 0 16px; padding:3px 1px 8px;
  overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch;
  scrollbar-width:thin; direction:rtl;
}
.rent-category-filter { flex:0 0 auto; min-height:44px; cursor:pointer; font:inherit; }
.rent-category-filter span { display:inline-flex; align-items:center; justify-content:center; min-width:22px; min-height:22px; padding-inline:5px; border-radius:999px; background:rgba(31,111,235,.12); font-size:.82em; }
.rent-category-filter.is-active { color:#fff; background:var(--blue); border-color:var(--blue); }
.rent-category-filter.is-active span { color:#fff; background:rgba(255,255,255,.2); }
.rent-grid-all { margin-top:0; grid-auto-flow:row; }
.rent-grid-all .rent-card { transition:opacity .15s ease, transform .15s ease, box-shadow .25s ease, border-color .25s ease; }
.rent-grid-all .rent-card.is-filtering-in,
.rent-grid-all .rent-card.is-filtering-out { opacity:0; transform:translateY(5px) scale(.985); }
@media (prefers-reduced-motion:reduce) {
  .rent-grid-all .rent-card, .rent-category-filter { transition:none!important; }
  .rent-grid-all .rent-card.is-filtering-in, .rent-grid-all .rent-card.is-filtering-out { transform:none; }
  .reveal { opacity:1!important; transform:none!important; transition:none!important; }
}

/* فقط کارت‌های بخش محصولات ویژهٔ صفحهٔ اصلی در موبایل دو ستونه می‌شوند. */
@media (max-width:767.98px) {
  .home-featured-products .grid.pcard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:stretch; }
  .home-featured-products .pcard { min-width:0; border-radius:15px; }
  .home-featured-products .pcard-media { aspect-ratio:1/1; }
  .home-featured-products .pcard-body { min-width:0; padding:9px; gap:6px; }
  .home-featured-products .pcard-tags { gap:4px; max-height:44px; overflow:hidden; }
  .home-featured-products .pcard-tag { max-width:100%; padding:2px 6px; font-size:9.5px; overflow-wrap:anywhere; }
  .home-featured-products .pcard-title { min-height:0; max-height:3.25em; font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
  .home-featured-products .pcard-price-old { font-size:10px; }
  .home-featured-products .pcard-price-final { flex-wrap:wrap; gap:2px 4px; max-width:100%; }
  .home-featured-products .pcard-price-final .num { font-size:clamp(13px,3.8vw,17px); letter-spacing:0; overflow-wrap:anywhere; }
  .home-featured-products .pcard-price-final .unit { font-size:10px; }
  .home-featured-products .pcard-inquiry { font-size:13px; }
  .home-featured-products .pcard-actions { min-width:0; gap:5px; margin-top:6px; }
  .home-featured-products .pcard-btn { min-width:0; padding:8px 5px; gap:4px; font-size:10.5px; line-height:1.4; overflow-wrap:anywhere; }
  .home-featured-products .pcard-btn svg { width:14px; height:14px; flex:0 0 auto; }
  .home-featured-products .pcard-cart-form { flex:0 0 38px; }
  .home-featured-products .pcard-icon-btn { width:38px; min-width:38px; height:40px; }
  .home-featured-products .pcard-icon-btn svg { width:17px; height:17px; }
  .home-featured-products .pcard-icon-btn .pcard-icon-plus { width:10px; height:10px; bottom:6px; inset-inline-end:6px; }
}
html[data-theme="dark"] .page-title { color: var(--text); }

/* =====================================================================
   صفحهٔ جزئیات محصول — بازطراحی ظاهری (فقط استایل؛ منطق دست‌نخورده)
   همان زبان بصری صفحهٔ محصولات: کارت‌های نرم، نسبت ۱:۱، حالت تیره.
   ===================================================================== */
.pdetail { padding-top: 22px; }

/* ---------- مسیر صفحه (breadcrumb) ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: color .2s ease; }
.breadcrumb a:hover { color: var(--blue); }
.crumb-sep { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.crumb-current { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }

.pdetail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }

/* ---------- ستون تصویر ---------- */
.pdetail-media { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 92px; }
.pdetail-main {
  position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 1 / 1; height: auto !important;
  background: linear-gradient(160deg, var(--blue-soft), color-mix(in srgb, var(--blue-soft) 40%, var(--card)));
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(16, 42, 80, .10);
}
.pdetail-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdetail-thumbs { gap: 10px; }
.pdetail-thumbs .gallery-thumb { width: 74px; height: 74px; border-radius: 14px; overflow: hidden; background: var(--card); cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }

/* ---------- ستون اطلاعات ---------- */
.pdetail-info { min-width: 0; display: flex; flex-direction: column; }
.pdetail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pcard-tag.feat { background: color-mix(in srgb, #16a34a 14%, var(--card)); color: #15803d; }
html[data-theme="dark"] .pcard-tag.feat { color: #6ee7a8; }

.pdetail-title { margin: 0 0 12px; font-size: clamp(21px, 3vw, 27px); line-height: 1.6; }
.pdetail-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; margin-bottom: 14px; flex-wrap: wrap; }
.pdetail-rating { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 6px; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 14%, var(--card)); color: #b45309; font-weight: 700; font-size: 12.5px; }
.pdetail-rating .stars { color: #f59e0b; letter-spacing: 1px; }
html[data-theme="dark"] .pdetail-rating { color: #fbbf24; }

.pdetail-desc { color: var(--muted); line-height: 2; margin: 0 0 18px; font-size: 14.5px; }

/* ---------- جعبهٔ قیمت ---------- */
.pdetail-pricebox {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
  padding: 16px 18px; margin-bottom: 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(16, 42, 80, .06);
}
.pdetail-price-old { font-size: 15px; color: #76818d; text-decoration: line-through; }
.pdetail-price-final { display: inline-flex; align-items: baseline; gap: 6px; }
.pdetail-price-final .num { font-size: 30px; font-weight: 800; color: var(--blue); letter-spacing: -.3px; }
.pdetail-price-final .unit { font-size: 14px; color: #6b7783; font-weight: 500; }
.pdetail-price-save { font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #e1143b, #ff4d6d);
  padding: 4px 11px; border-radius: 999px; }
.pdetail-price-inquiry { font-size: 19px; font-weight: 800; color: color-mix(in srgb, var(--blue) 80%, var(--text)); }

/* ---------- فرم سبد خرید ---------- */
.pdetail-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.qty-stepper input { width: 58px; border: 0; text-align: center; font-family: inherit; font-size: 15px; font-weight: 700; padding: 11px 0;
  background: transparent; color: var(--text); -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 42px; height: 44px; border: 0; background: transparent; color: var(--blue); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease; font-family: inherit; }
.qty-btn:hover { background: var(--blue-soft); }
.qty-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: -2px; }
.pdetail-cart .pcard-btn.solid { flex: 1; min-width: 190px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff;
  border-color: transparent; box-shadow: 0 8px 20px rgba(31, 111, 235, .28); }
.pdetail-cart .pcard-btn.solid:hover { color: #fff; box-shadow: 0 12px 26px rgba(31, 111, 235, .40); }

/* ---------- جدول مشخصات ---------- */
.pdetail-spec { border-radius: 18px; background: var(--card); }
.pdetail-spec th { width: 40%; }

/* ---------- نظرات ---------- */
.review-list { display: grid; gap: 12px; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; }
.review-stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: 6px; }
.review-text { margin: 0 0 8px; line-height: 1.9; color: var(--text); }
.review-meta { color: var(--muted); font-size: 12.5px; }
.review-form-card { margin-top: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; }
.review-form-card h3 { margin: 0 0 12px; }
.review-form-card label { display: block; margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.review-form-card select, .review-form-card textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit;
  background: var(--bg); color: var(--text); }
.review-form-card .btn { margin-top: 12px; padding: 11px 26px; border-radius: 12px; }
.form-error { background: color-mix(in srgb, #e1143b 12%, var(--card)); color: #b91c1c; padding: 10px 14px; border-radius: 12px; }
html[data-theme="dark"] .form-error { color: #fca5a5; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
  .pdetail-grid { grid-template-columns: 1fr; gap: 22px; }
  .pdetail-media { position: static; }
  .pdetail-main { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .pdetail-price-final .num { font-size: 25px; }
  .pdetail-main { aspect-ratio: 1 / 1; }
  .pdetail-cart .pcard-btn.solid { min-width: 0; }
}

/* ---------- دسترس‌پذیری ---------- */
@media (prefers-reduced-motion: reduce) {
  .pdetail-thumbs .gallery-thumb, .qty-btn, .breadcrumb a, .pdetail-main img { transition: none; }
}
html[data-theme="dark"] .pdetail-main { border-color: var(--border); box-shadow: 0 12px 32px rgba(0, 0, 0, .50); }
html[data-theme="dark"] .pdetail-pricebox { box-shadow: 0 8px 22px rgba(0, 0, 0, .40); }
html[data-theme="dark"] .pdetail-thumbs .gallery-thumb { background: var(--card); }
html[data-theme="dark"] .qty-btn:hover { background: var(--blue-soft); }
html[data-theme="dark"] .pdetail-price-final .unit { color: #9fb0c6; }
html[data-theme="dark"] .pdetail-price-old { color: #8b98a8; }
html[data-theme="dark"] .pdetail-desc { color: #a7b6cb; }
html[data-theme="dark"] .breadcrumb, html[data-theme="dark"] .breadcrumb a { color: #9fb0c6; }


/* ---------- محصولات ویژه صفحه اصلی (پنل ادمین) ---------- */
.featured-msg { padding:10px 14px; border-radius:10px; margin:0 0 14px; font-size:13.5px; }
.featured-msg.ok { color:#166534; background:#dcfce7; }
.featured-msg.err { color:#b42318; background:#fee4e2; }
.featured-tag { display:inline-block; margin-inline-start:8px; padding:2px 9px; border-radius:999px; font-size:11.5px;
  font-weight:700; color:#1553b8; background:rgba(31,111,235,.10); border:1px solid rgba(31,111,235,.22); }
.featured-search { display:flex; flex-direction:column; gap:8px; max-height:320px; overflow-y:auto;
  padding:4px; }
.featured-search-row { display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:9px 12px; border-radius:10px; background:rgba(31,111,235,.05); border:1px solid rgba(31,111,235,.10); }
.featured-search-row > span { font-size:13.5px; }
.featured-hint { font-size:12.5px; color:#7b8794; margin:6px 0 0; }
html[data-theme="dark"] .featured-search-row { background:rgba(91,155,245,.10); border-color:rgba(91,155,245,.16); }
html[data-theme="dark"] .featured-msg.ok { color:#86efac; background:rgba(22,101,52,.25); }
html[data-theme="dark"] .featured-msg.err { color:#fca5a5; background:rgba(180,35,24,.25); }

/* ===== Shared glass system ===== */
:root {
  --glass-bg: rgba(255,255,255,.62);
  --glass-bg-strong: rgba(255,255,255,.82);
  --glass-border: rgba(255,255,255,.72);
  --glass-highlight: rgba(255,255,255,.86);
  --glass-blur: 8px;
  --glass-shadow: 0 8px 24px rgba(16,42,80,.08), inset 0 1px 0 rgba(255,255,255,.72);
  --glass-shadow-hover: 0 12px 28px rgba(16,42,80,.14), inset 0 1px 0 rgba(255,255,255,.82);
  --glass-blue: rgba(31,111,235,.14);
  --glass-blue-border: rgba(31,111,235,.30);
  --glass-red: rgba(220,38,38,.14);
  --glass-red-border: rgba(220,38,38,.34);
  --glass-green: rgba(22,163,74,.14);
  --glass-green-border: rgba(22,163,74,.30);
}
html[data-theme="dark"] {
  --glass-bg: rgba(15,23,40,.74);
  --glass-bg-strong: rgba(15,23,40,.9);
  --glass-border: rgba(203,216,236,.2);
  --glass-highlight: rgba(255,255,255,.12);
  --glass-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
  --glass-shadow-hover: 0 12px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);
}

.glass-surface {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-card { border-radius: 18px; padding: 18px; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-surface {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
  }
}
html[data-theme="dark"] .glass-surface { background: rgba(15,23,40,.94); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-theme="dark"] .glass-surface { background: var(--glass-bg); }
}

.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--blue-dark);
  background: rgba(255,255,255,.78);
  box-shadow: var(--glass-shadow);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-button { background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); }
}
.glass-button:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-1px); box-shadow: var(--glass-shadow-hover); }
.glass-button:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(0); }
.glass-button:focus-visible, .glass-surface:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 68%, white); outline-offset: 2px; }
.glass-button:disabled, .glass-button[aria-disabled="true"] { opacity: .58; cursor: not-allowed; box-shadow: none; transform: none; }
.glass-button.is-blue { color: #fff; background: linear-gradient(135deg, rgba(31,111,235,.94), rgba(21,83,184,.90)); border-color: rgba(255,255,255,.56); }
.glass-button.is-red { color: #991b1b; background: rgba(220,38,38,.18); border-color: var(--glass-red-border); }
.glass-button.is-green { color: #166534; background: rgba(22,163,74,.16); border-color: var(--glass-green-border); }

/* Existing site components share the same surface and state tokens. */
.btn, .btn-glass, .admin-tab, .pcard-btn, .pcard-icon-btn, .icon-link, .menu-btn, .theme-toggle, .qty-btn, .gallery-thumb {
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn, .btn-glass { min-height: 44px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.btn { background: rgba(255,255,255,.8); }
.btn-primary, .btn-glass.add, .pcard-btn.solid { background: linear-gradient(135deg, rgba(31,111,235,.95), rgba(21,83,184,.92)); border-color: rgba(255,255,255,.58); }
.btn-danger, .btn-glass.danger, .btn-glass.del { color: #991b1b; background: rgba(220,38,38,.18); border-color: var(--glass-red-border); }
.btn-success { color: #166534; background: rgba(22,163,74,.16); border-color: var(--glass-green-border); }
.btn:hover:not(:disabled), .btn-glass:hover:not(:disabled), .admin-tab:hover, .pcard-btn:hover, .pcard-icon-btn:hover, .icon-link:hover, .gallery-thumb:hover {
  box-shadow: var(--glass-shadow-hover);
}
.btn:focus-visible, .btn-glass:focus-visible, .admin-tab:focus-visible, .pcard-btn:focus-visible,
.pcard-icon-btn:focus-visible, .icon-link:focus-visible, .menu-btn:focus-visible, .theme-toggle:focus-visible,
.qty-btn:focus-visible, .gallery-thumb:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 68%, white);
  outline-offset: 2px;
}
.btn:disabled, .btn-glass:disabled, .pcard-btn:disabled, .pcard-icon-btn:disabled { opacity: .58; cursor: not-allowed; transform: none; }

.inp, .search-box input, .review-form-card select, .review-form-card textarea {
  color: var(--text);
  background: rgba(255,255,255,.76);
  border-color: rgba(31,111,235,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .inp, .search-box input, .review-form-card select, .review-form-card textarea {
    background: rgba(255,255,255,.62);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
}
.inp:focus, .search-box input:focus, .review-form-card select:focus, .review-form-card textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--blue) 25%, transparent);
  outline-offset: 1px;
  border-color: var(--blue);
}

.cat-card, .product-card, .pcard, .contact-card, .rent-card, .review-card, .review-form-card,
.admin-card, .contact-map, .proj-card, .sum-card, .auth-resend, .pdetail-pricebox, .addr-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.84);
  box-shadow: var(--glass-shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cat-card, .product-card, .pcard, .contact-card, .rent-card, .review-card, .review-form-card,
  .admin-card, .contact-map, .proj-card, .sum-card, .auth-resend, .pdetail-pricebox, .addr-card {
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
  }
}
.badge, .nav-badge, .discount-badge, .pcard-badge, .rent-badge, .rent-type, .featured-tag, .state {
  box-shadow: 0 4px 12px rgba(16,42,80,.10), inset 0 1px 0 rgba(255,255,255,.55);
}
.icon-link, .menu-btn, .theme-toggle, .pcard-icon-btn, .qty-btn, .gallery-thumb { min-width: 44px; min-height: 44px; }

html[data-theme="dark"] .btn, html[data-theme="dark"] .inp, html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .review-form-card select, html[data-theme="dark"] .review-form-card textarea {
  color: var(--text);
  background: rgba(15,23,40,.82);
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-glass.add, html[data-theme="dark"] .pcard-btn.solid {
  color: #fff;
  background: linear-gradient(135deg, rgba(31,111,235,.92), rgba(21,83,184,.90));
}
html[data-theme="dark"] .btn-danger, html[data-theme="dark"] .btn-glass.danger, html[data-theme="dark"] .btn-glass.del {
  color: #fecaca;
  background: rgba(185,28,28,.32);
}
html[data-theme="dark"] .btn-success { color: #bbf7d0; background: rgba(22,101,52,.30); }
html[data-theme="dark"] .cat-card, html[data-theme="dark"] .product-card,
html[data-theme="dark"] .pcard, html[data-theme="dark"] .contact-card, html[data-theme="dark"] .rent-card,
html[data-theme="dark"] .review-card, html[data-theme="dark"] .review-form-card, html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .contact-map, html[data-theme="dark"] .proj-card, html[data-theme="dark"] .sum-card,
html[data-theme="dark"] .auth-resend, html[data-theme="dark"] .pdetail-pricebox, html[data-theme="dark"] .addr-card {
  background: rgba(15,23,40,.78);
  border-color: var(--glass-border);
}

/* فرم مدیریت اقلام اجاره: خلاصهٔ فشرده و ویرایش بازشونده با سطح شیشه‌ای سایت */
.rental-admin-page { max-width: 1180px; }
.rental-admin-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.rental-admin-heading h1 { margin:0; }
.rental-admin-heading p { margin:.4rem 0 0; color:var(--muted); }
.rental-notice, .rental-admin-create, .rental-admin-item { background:var(--glass-bg); border:1px solid var(--glass-border); -webkit-backdrop-filter:blur(var(--glass-blur)); backdrop-filter:blur(var(--glass-blur)); box-shadow:var(--glass-shadow); }
.rental-notice { margin:14px 0; padding:12px 16px; border-radius:14px; }
.rental-admin-create { margin:16px 0; }
.rental-admin-list { display:grid; gap:12px; }
.rental-admin-item { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:start; gap:14px; padding:16px; border-radius:18px; min-width:0; }
.rental-admin-thumb { width:82px; height:82px; object-fit:cover; border-radius:14px; }
.rental-admin-thumb-empty { display:grid; place-items:center; color:var(--muted); background:rgba(148,163,184,.12); font-weight:700; }
.rental-admin-summary, .rental-admin-form { min-width:0; }
.rental-admin-item-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; min-width:0; }
.rental-admin-item-head strong { overflow-wrap:anywhere; font-size:1.05rem; }
.rental-admin-item-head .glass-badge { display:inline-flex; align-items:center; min-height:28px; padding:3px 10px; border-radius:999px; border:1px solid var(--glass-border); background:var(--glass-bg-strong); color:var(--text); font-size:.82rem; }
.rental-admin-item-head .glass-badge.success { color:#166534; border-color:rgba(22,101,52,.28); background:rgba(220,252,231,.72); }
.rental-admin-item-head .glass-badge.muted { color:var(--muted); }
.rental-admin-facts { display:flex; flex-wrap:wrap; gap:8px 18px; margin:12px 0; }
.rental-admin-facts > div { display:flex; gap:5px; min-width:0; }
.rental-admin-facts dt { color:var(--muted); }
.rental-admin-facts dd { margin:0; font-weight:600; overflow-wrap:anywhere; }
.rental-admin-item-actions, .rental-admin-item-actions form { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rental-admin-panel { min-width:0; overflow:hidden; padding-top:14px; border-top:1px solid var(--glass-border); margin-top:14px; animation:rental-panel-in .18s ease-out; }
.rental-admin-panel[hidden] { display:none; }
@keyframes rental-panel-in { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.rental-admin-form .detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.rental-admin-form .detail-grid > div { min-width:0; }
.rental-admin-form label { display:block; margin-bottom:5px; }
.rental-admin-form .inp { width:100%; max-width:100%; min-width:0; }
.rental-admin-form .rental-description { grid-column:span 2; }
.rental-form-errors { color:#991b1b; background:rgba(220,38,38,.12); border:1px solid var(--glass-red-border); border-radius:12px; padding:10px 14px; margin:0 0 12px; }
.rental-active-check { display:flex!important; align-items:center; gap:9px; margin-top:12px; min-height:44px; }
.rental-admin-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; }
.rental-admin-actions .btn-glass, .rental-admin-item-actions .btn-glass { min-height:44px; }
@media (max-width:900px) { .rental-admin-form .detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
  .rental-admin-item { grid-template-columns:48px minmax(0,1fr); gap:9px; padding:12px; }
  .rental-admin-thumb { width:48px; height:48px; }
  .rental-admin-facts { gap:5px 12px; font-size:.92rem; }
  .rental-admin-form .detail-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
  .rental-admin-form .rental-description { grid-column:auto; }
  .rental-admin-item-actions, .rental-admin-item-actions form, .rental-admin-item-actions .btn-glass { width:100%; }
  .rental-admin-actions { align-items:stretch; }
  .rental-admin-actions .btn-glass { width:100%; }
}
@media (prefers-reduced-motion:reduce) { .rental-admin-panel { animation:none; } }

@media (max-width: 640px) {
  :root { --glass-blur: 4px; }
  .glass-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-button, .btn, .btn-glass, .admin-tab, .pcard-btn, .pcard-icon-btn, .icon-link, .menu-btn,
  .theme-toggle, .qty-btn, .gallery-thumb { transition: none; }
}

/* Profile address cards */
.profile-addresses-page > .addresses-container { width:100%; max-width:1180px; margin-inline:auto; }
.addresses-head { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:18px; }
.addresses-head .section-title { margin:0; }
.addresses-add { min-width:190px; }
.addresses-message, .addresses-empty { margin:14px 0; padding:14px 18px; border-radius:14px; line-height:1.9; }
.addresses-message { color:#166534; border-color:rgba(22,163,74,.3); background:rgba(220,252,231,.82); }
.addresses-empty { text-align:center; color:var(--muted); }
.addr-grid { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:18px; }
.addr-card { display:flex; flex-direction:column; min-width:0; min-height:250px; text-align:start; border-radius:20px; }
.addr-card.is-default { border-color:rgba(31,111,235,.48); box-shadow:0 10px 28px rgba(31,111,235,.14), inset 0 1px 0 rgba(255,255,255,.8); }
.addr-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.addr-card-head h3 { min-width:0; margin:0; color:var(--text); font-size:17px; line-height:1.7; overflow-wrap:anywhere; }
.addr-default-badge { flex:0 0 auto; padding:5px 11px; border:1px solid var(--glass-blue-border); border-radius:999px; background:rgba(31,111,235,.13); color:var(--blue-dark); font-size:12px; font-weight:800; }
.addr-card p { margin:8px 0 0; color:var(--muted); line-height:1.9; overflow-wrap:anywhere; }
.addr-card .addr-full { color:var(--text); }
.addr-card .addr-phone { direction:ltr; text-align:right; font-variant-numeric:tabular-nums; }
.addr-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; padding-top:18px; }
.addr-actions form { display:inline-flex; margin:0; }
.addr-actions .btn-glass { min-width:110px; }
html[data-theme="dark"] .addr-card.is-default { border-color:rgba(91,155,245,.65); }
html[data-theme="dark"] .addr-default-badge { color:#cfe0ff; background:rgba(91,155,245,.22); }
html[data-theme="dark"] .addresses-message { color:#bbf7d0; background:rgba(22,101,52,.24); }
@media (max-width:900px) { .addr-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) {
  .addresses-head { align-items:stretch; }
  .addresses-add { width:100%; }
  .addr-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .addr-card { min-height:0; padding:16px; }
  .addr-actions > * { flex:1 1 calc(50% - 8px); }
  .addr-actions .btn-glass { width:100%; min-width:0; }
}

/* ===== منوی پروفایل و سفارش‌های مشتری ===== */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.profile-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.profile-nav-link {
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:9px 14px;
  border:1px solid var(--glass-border); border-radius:14px;
  background:rgba(255,255,255,.72); color:var(--blue-dark);
  box-shadow:var(--glass-shadow); font-weight:700; font-size:14px; text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.profile-nav-link svg { width:18px; height:18px; flex:0 0 auto; }
.profile-nav-link:hover { transform:translateY(-1px); box-shadow:var(--glass-shadow-hover); }
.profile-nav-link.is-active { color:#fff; background:linear-gradient(135deg, rgba(31,111,235,.94), rgba(21,83,184,.90)); border-color:rgba(255,255,255,.56); }
html[data-theme="dark"] .profile-nav-link { background:var(--glass-bg); color:#cfe0ff; }
html[data-theme="dark"] .profile-nav-link.is-active { color:#fff; }

.myorders-container { max-width:1040px; margin-inline:auto; }
.myorders-head { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.myorders-head .section-title { margin:0; }
.myorders-count { padding:8px 14px; border-radius:999px; font-size:13px; font-weight:700; color:var(--blue-dark); }
.myorders-table-wrap { border-radius:18px; overflow:hidden; }
.myorders-table { width:100%; border-collapse:collapse; font-size:14px; }
.myorders-table th {
  padding:14px 16px; text-align:right; font-size:13px; font-weight:700; color:var(--muted);
  background:rgba(31,111,235,.06); white-space:nowrap;
}
.myorders-table td { padding:13px 16px; border-top:1px solid var(--border); vertical-align:middle; }
.myorders-table tbody tr:hover { background:rgba(31,111,235,.04); }
.myorders-num { display:inline-block; color:var(--blue-dark); font-weight:800; text-decoration:none; }
.myorders-num:hover { color:var(--blue); text-decoration:underline; }
.myorders-qty { white-space:nowrap; }
.myorders-muted { color:var(--muted); font-size:12.5px; }
.myorders-amount { font-weight:800; white-space:nowrap; }
.myorders-unit { font-size:12px; font-weight:600; color:var(--muted); }
.myorders-details { min-height:44px; padding:8px 14px; white-space:nowrap; }
.myorders-cards { display:none; }
.myorders-card { display:flex; flex-direction:column; gap:12px; padding:16px; border-radius:18px; }
.myorders-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.myorders-card-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
.myorders-card-meta div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.myorders-card-meta span { font-size:12px; color:var(--muted); }
.myorders-card-meta b { font-size:13.5px; color:var(--text); line-height:1.8; overflow-wrap:anywhere; }
.myorders-card-amount { grid-column:1 / -1; border-top:1px dashed var(--border); padding-top:8px; }
.myorders-empty { text-align:center; padding:40px 20px; border-radius:20px; }
.myorders-empty-ic { display:inline-flex; width:58px; height:58px; color:var(--blue); opacity:.8; margin-bottom:10px; }
.myorders-empty-ic svg { width:100%; height:100%; }
.myorders-empty h3 { margin:0 0 6px; font-size:18px; color:var(--text); }
.myorders-empty p { margin:0 0 16px; color:var(--muted); font-size:14px; }
html[data-theme="dark"] .myorders-table th { background:rgba(91,155,245,.1); }
html[data-theme="dark"] .myorders-table tbody tr:hover { background:rgba(91,155,245,.08); }

.invoice-container { max-width:920px; margin-inline:auto; }
.invoice-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.invoice-head .section-title { margin:0; }
.invoice-sub { margin:8px 0 0; color:var(--muted); font-size:13.5px; }
.invoice-actions { display:flex; gap:8px; flex-wrap:wrap; }
.invoice-sheet { border-radius:22px; padding:22px; }
.invoice-doc-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; flex-wrap:wrap; padding-bottom:16px; border-bottom:1px solid var(--border); }
.invoice-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.invoice-logo { width:54px; height:54px; object-fit:contain; border-radius:14px; background:#fff; border:1px solid var(--border); padding:4px; flex:0 0 auto; }
.invoice-brand h2 { margin:0; font-size:19px; color:var(--text); }
.invoice-brand p { margin:3px 0 0; color:var(--muted); font-size:12.5px; }
.invoice-meta { display:flex; flex-wrap:wrap; gap:8px 22px; margin:0; }
.invoice-meta div { display:flex; flex-direction:column; gap:3px; }
.invoice-meta dt { font-size:12px; color:var(--muted); }
.invoice-meta dd { margin:0; font-size:13.5px; font-weight:700; color:var(--text); }
.invoice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:16px 0; }
.invoice-panel { min-width:0; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:rgba(255,255,255,.55); }
.invoice-panel h3, .invoice-history h3 { margin:0 0 8px; font-size:14px; color:var(--blue-dark); }
.invoice-panel p { margin:4px 0; font-size:13.5px; line-height:1.9; color:var(--muted); overflow-wrap:anywhere; }
.invoice-lbl { color:var(--muted); }
.invoice-address { color:var(--text) !important; }
.invoice-missing { padding:10px 12px; border:1px dashed rgba(180,83,9,.4); border-radius:12px; background:rgba(254,243,199,.6); color:#92400e !important; font-size:13px !important; }
.invoice-payments { list-style:none; margin:10px 0 0; padding:10px 0 0; border-top:1px dashed var(--border); display:grid; gap:6px; }
.invoice-payments li { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--text); }
.invoice-payments small { color:var(--muted); }
.invoice-table-wrap { margin-top:4px; }
.invoice-table { width:100%; border-collapse:collapse; font-size:14px; }
.invoice-table th { padding:11px 10px; text-align:right; font-size:12.5px; color:var(--muted); font-weight:700; border-bottom:1px solid var(--border); white-space:nowrap; }
.invoice-table td { padding:12px 10px; border-top:1px solid var(--border); vertical-align:middle; }
.invoice-cell-prod { width:52%; }
.invoice-prod { display:flex; align-items:center; gap:10px; min-width:0; }
.invoice-prod img { width:46px; height:46px; border-radius:10px; object-fit:cover; border:1px solid var(--border); flex:0 0 auto; }
.invoice-prod-ph { display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:10px; background:var(--blue-soft); color:var(--blue); font-weight:800; flex:0 0 auto; }
.invoice-prod span:last-child { overflow-wrap:anywhere; }
.invoice-totals { max-width:340px; margin:16px 0 0 auto; display:grid; gap:8px; }
.invoice-total-row { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13.5px; color:var(--muted); }
.invoice-total-row b { color:var(--text); white-space:nowrap; }
.invoice-total-row.is-final { margin-top:2px; padding-top:10px; border-top:1px solid var(--border); font-size:16px; color:var(--text); font-weight:800; }
.invoice-discount b { color:#b45309; }
.invoice-free { color:#166534 !important; }
.invoice-history { margin-top:22px; padding-top:18px; border-top:1px solid var(--border); }
.invoice-timeline { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.invoice-timeline li { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.5); }
.invoice-timeline-dot { width:9px; height:9px; margin-top:7px; border-radius:50%; background:var(--blue); flex:0 0 auto; }
.invoice-timeline div { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.invoice-timeline small { color:var(--muted); font-size:12.5px; }
.invoice-muted { margin:0; color:var(--muted); font-size:13.5px; }
html[data-theme="dark"] .invoice-panel, html[data-theme="dark"] .invoice-timeline li { background:rgba(15,23,40,.5); }
html[data-theme="dark"] .invoice-missing { background:rgba(120,53,15,.24); color:#fcd34d !important; }

@media (max-width: 760px) {
  .myorders-table-wrap { display:none; }
  .myorders-cards { display:grid; gap:12px; }
  .profile-nav { gap:6px; margin-bottom:14px; }
  .profile-nav-link { flex:1 1 calc(50% - 6px); justify-content:flex-start; padding:9px 12px; font-size:13px; }
}
@media (max-width: 640px) {
  .invoice-head { align-items:stretch; }
  .invoice-actions > * { flex:1 1 calc(50% - 8px); }
  .invoice-sheet { padding:16px; border-radius:18px; }
  .invoice-grid { grid-template-columns:minmax(0,1fr); }
  .invoice-doc-head { gap:12px; }
  .invoice-meta { width:100%; gap:8px 16px; }
  .invoice-table thead { display:none; }
  .invoice-table, .invoice-table tbody, .invoice-table tr, .invoice-table td { display:block; width:100%; }
  .invoice-table tr { margin-top:10px; padding:12px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.5); }
  .invoice-table td { padding:5px 0; border:0; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; }
  .invoice-table td::before { content:attr(data-label); flex:0 0 auto; color:var(--muted); font-size:12.5px; }
  .invoice-table td.invoice-cell-prod { display:block; padding:0 0 8px; }
  .invoice-table td.invoice-cell-prod::before { content:none; }
  .invoice-cell-prod { width:100%; }
  .invoice-totals { max-width:none; }
  html[data-theme="dark"] .invoice-table tr { background:rgba(15,23,40,.5); }
}

@media print {
  .profile-nav, .invoice-actions, .myorders-count, .myorders-details, .pager { display:none !important; }
  .invoice-sheet { padding:0; border:0; border-radius:0; background:#fff; box-shadow:none; }
  .invoice-panel { background:#fff; border-color:#cbd5e1; }
  .invoice-table tr { break-inside:avoid; }
  .invoice-table th, .invoice-table td { border-color:#cbd5e1; }
  .invoice-history { break-inside:avoid; }
  .invoice-timeline li { background:#fff; border-color:#cbd5e1; }
}

/* ===== Responsive guardrails shared by storefront and management pages ===== */
html, body { max-width:100%; }
body { overflow-x:clip; }
img, video, canvas, svg { max-width:100%; }
iframe { max-width:100%; }
input, select, textarea, button { max-width:100%; }
.container, .admin-wrap, .admin-wrap > .container { min-width:0; }
.admin-card, .admin-form, .contact-card, .sum-card, .addr-card, .rent-card,
.product-card, .proj-card, .table-wrap, .cart-table-wrap { min-width:0; }
.table-wrap, .cart-table-wrap { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
.table-wrap table, .cart-table-wrap table { width:max-content; min-width:100%; }
.cart-table-wrap table { min-width:680px; }
.admin-table { min-width:760px; }
.contact-map iframe { max-width:100%; }
.admin-form input, .admin-form select, .admin-form textarea { box-sizing:border-box; }
.addr-card, .admin-card, .sum-card, .contact-card, .rent-card, .product-card, .proj-card {
  overflow-wrap:anywhere;
}
.hero { min-height:78vh; min-height:78dvh; }

@media (max-width: 860px) {
  .site-header { position:relative; }
  .header-inner { min-width:0; gap:10px; }
  .header-icons { flex:0 0 auto; }
  .main-nav { max-height:calc(100vh - 76px); max-height:calc(100dvh - 76px); overflow-y:auto; }
  .search-box { min-width:0; }
}
@media (max-width: 600px) {
  .section { padding-inline:0; }
  .admin-wrap { padding:18px 0 42px; }
  .admin-card, .contact-card, .sum-card { padding:14px; }
  .cart-table-wrap { margin-inline:-4px; width:calc(100% + 8px); }
  .cart-table-wrap th, .cart-table-wrap td { padding:10px !important; }
  .cart-table-wrap + div { align-items:stretch !important; flex-direction:column; gap:12px; }
  .cart-table-wrap + div > * { max-width:100%; }
  .admin-tools > *, .admin-search > * { flex:1 1 100%; min-width:0 !important; }
  .admin-tabs { gap:8px; padding:10px; }
  .admin-tab { flex:1 1 auto; min-height:44px; padding-inline:12px; }
}
@media (max-width: 380px) {
  .container { padding-inline:12px; }
  .header-inner { gap:7px; }
  .header-icons { gap:4px; }
  .icon-link, .menu-btn { min-width:40px; min-height:44px; }
  .search-box input { font-size:14px; }
}

/* ===== Header icon controls ===== */
.header-icons { gap:8px; }
.icon-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border:1px solid var(--glass-border);
  border-radius:14px;
  color:var(--muted);
  background:rgba(255,255,255,.58);
  box-shadow:var(--glass-shadow);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  text-decoration:none;
  transition:color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.header-icon-svg { display:block; width:21px; height:21px; flex:0 0 auto; }
.icon-link:hover { color:var(--blue); background:var(--glass-bg-strong); border-color:var(--glass-blue-border); transform:translateY(-2px); box-shadow:var(--glass-shadow-hover); }
.icon-link:active { transform:translateY(0) scale(.96); }
.icon-link:focus-visible, .menu-btn:focus-visible { outline:3px solid color-mix(in srgb, var(--blue) 60%, white); outline-offset:2px; }
.icon-link[aria-current="page"] { color:var(--blue); border-color:var(--glass-blue-border); background:var(--glass-blue); }
.icon-link .badge { inset-inline-start:-5px; top:-5px; min-width:19px; height:19px; display:inline-flex; justify-content:center; align-items:center; border:2px solid var(--glass-bg-strong); font-size:10px; line-height:1; }
.menu-btn { width:44px; min-width:44px; height:44px; padding:0; border:1px solid var(--glass-border); border-radius:14px; background:var(--glass-bg); box-shadow:var(--glass-shadow); }
.menu-btn .header-icon-svg { width:22px; height:22px; }
.theme-icon-stack { position:relative; display:block; width:22px; height:22px; }
.theme-icon-stack .header-icon-svg { position:absolute; inset:0; transition:opacity .22s ease, transform .28s ease; }
.theme-sun-icon { opacity:0; transform:rotate(-80deg) scale(.55); }
html[data-theme="dark"] .theme-moon-icon { opacity:0; transform:rotate(80deg) scale(.55); }
html[data-theme="dark"] .theme-sun-icon { opacity:1; transform:rotate(0) scale(1); }
html[data-theme="dark"] .icon-link, html[data-theme="dark"] .menu-btn { color:var(--text); background:rgba(15,23,40,.72); border-color:var(--glass-border); }
html[data-theme="dark"] .icon-link:hover { color:#9cc0fb; background:rgba(20,34,58,.94); }
@keyframes header-cart-bounce { 0%,100% { transform:translateY(0) rotate(0); } 32% { transform:translateY(-5px) rotate(-7deg); } 62% { transform:translateY(1px) rotate(4deg); } }
@keyframes header-badge-pop { 0%,100% { transform:scale(1); } 45% { transform:scale(1.22); } }
.cart-icon-link.is-added .cart-icon-svg { animation:header-cart-bounce .55s ease-out; }
.cart-icon-link.is-added .badge { animation:header-badge-pop .5s ease-out; }
@media (max-width:420px) {
  .header-inner { flex-wrap:wrap; gap:8px; padding-block:10px; }
  .header-icons { order:1; gap:5px; margin-inline-start:auto; }
  .search-box { order:2; flex:1 0 100%; max-width:none; }
  .main-nav { top:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .icon-link, .menu-btn, .theme-icon-stack .header-icon-svg { transition:none; }
  .cart-icon-link.is-added .cart-icon-svg, .cart-icon-link.is-added .badge { animation:none; }
}

/* ===== Contact page ===== */
.contact-page { padding-block:clamp(24px,4vw,52px); }
.contact-hero { max-width:820px; margin:0 auto 26px; text-align:center; }
.contact-eyebrow { display:inline-flex; padding:5px 13px; border:1px solid var(--glass-blue-border); border-radius:999px; color:var(--blue-dark); background:var(--glass-blue); font-size:12px; font-weight:800; }
.contact-hero h1 { margin:12px 0 6px; font-size:clamp(25px,4vw,38px); color:var(--text); }
.contact-hero p { margin:0; color:var(--muted); line-height:2; }
.contact-layout { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); align-items:start; gap:20px; }
.contact-info-card, .contact-form-card { min-width:0; padding:clamp(16px,2.2vw,24px); border-radius:22px; }
.contact-info-card h2, .contact-form-card h2 { margin:0 0 8px; color:var(--text); font-size:clamp(17px,2vw,21px); }
.contact-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.contact-method { display:flex; align-items:center; gap:11px; min-width:0; min-height:66px; padding:11px 12px; border:1px solid var(--glass-blue-border); border-radius:15px; color:var(--text); background:rgba(255,255,255,.34); text-decoration:none; transition:transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.contact-method:hover { color:var(--blue-dark); background:var(--glass-blue); border-color:rgba(31,111,235,.42); transform:translateY(-2px); box-shadow:var(--glass-shadow); }
.contact-method:focus-visible, .contact-social-link:focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
.contact-method-icon { width:22px; height:22px; flex:0 0 22px; color:var(--blue); }
.contact-method > span { display:block; min-width:0; overflow-wrap:anywhere; }
.contact-method b { display:block; margin-bottom:2px; font-size:13px; }
.contact-method small { display:block; color:var(--muted); font-size:11.5px; line-height:1.7; overflow-wrap:anywhere; }
.contact-method-wide { grid-column:1/-1; }
.contact-method-missing { border-style:dashed; cursor:default; }
.contact-method-missing:hover { transform:none; color:var(--text); background:rgba(255,255,255,.34); box-shadow:none; }
.contact-method-static { cursor:default; }
.contact-method-static:hover { transform:none; color:var(--text); background:rgba(255,255,255,.34); box-shadow:none; }
.contact-social-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.contact-social-link { display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:6px 10px; border:1px solid var(--glass-border); border-radius:12px; color:var(--muted); background:var(--glass-bg); font-size:12px; }
.contact-social-link:hover { color:var(--blue); border-color:var(--glass-blue-border); }
.contact-social-link img { width:19px; height:19px; object-fit:contain; }
.contact-form-intro { margin:0 0 14px; color:var(--muted); font-size:13px; line-height:1.9; }
.contact-message-form { display:grid; gap:12px; }
.contact-message-form > label { display:grid; gap:6px; color:var(--text); font-size:13px; font-weight:700; }
.contact-optional { color:var(--muted); font-size:11px; font-weight:400; }
.contact-message-form .inp { box-sizing:border-box; width:100%; min-width:0; min-height:46px; margin:0; }
.contact-message-form textarea.inp { min-height:130px; resize:vertical; }
.contact-message-form .inp:focus:invalid { border-color:#dc2626; outline-color:rgba(220,38,38,.2); }
.contact-submit { min-height:46px; justify-self:start; gap:8px; }
.contact-submit svg, .contact-directions svg { width:19px; height:19px; }
.contact-feedback { padding:11px 14px; border:1px solid transparent; border-radius:13px; line-height:1.9; }
.contact-feedback.success { color:#166534; border-color:rgba(22,163,74,.3); background:rgba(220,252,231,.78); }
.contact-feedback.error { color:#991b1b; border-color:rgba(220,38,38,.3); background:rgba(254,226,226,.82); }
.contact-directions { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-top:18px; padding:14px 18px; border-radius:16px; color:var(--muted); }
.contact-directions .glass-button { gap:8px; }
html[data-theme="dark"] .contact-eyebrow { color:#cfe0ff; }
html[data-theme="dark"] .contact-method { background:rgba(15,23,40,.34); }
html[data-theme="dark"] .contact-method:hover { color:#cfe0ff; background:rgba(91,155,245,.18); }
html[data-theme="dark"] .contact-method-missing:hover { background:rgba(15,23,40,.34); color:var(--text); }
html[data-theme="dark"] .contact-feedback.success { color:#bbf7d0; background:rgba(22,101,52,.24); }
html[data-theme="dark"] .contact-feedback.error { color:#fecaca; background:rgba(127,29,29,.26); }
@media (max-width:900px) { .contact-layout { grid-template-columns:minmax(0,1fr); } }
@media (max-width:520px) {
  .contact-page { padding-block:20px 34px; }
  .contact-hero { margin-bottom:18px; text-align:start; }
  .contact-info-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
  .contact-method { min-height:58px; }
  .contact-submit { width:100%; justify-self:stretch; }
  .contact-directions { align-items:stretch; flex-direction:column; padding:13px; }
  .contact-directions .glass-button { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .contact-method, .contact-social-link { transition:none; }
  .contact-method:hover { transform:none; }
}

/* ===== Shopkeeper workspace ===== */
.shopkeeper-actions { display:flex; justify-content:flex-start; margin:0 0 18px; }
.shopkeeper-actions .btn-glass { position:relative; padding-inline:18px; }
.shopkeeper-rentals .shopkeeper-rental-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:stretch; }
.shopkeeper-rentals > .container { width:min(100% - 32px, 1440px); max-width:1440px; }
.shopkeeper-rental-card { display:flex; flex-direction:column; gap:16px; min-width:0; }
.shopkeeper-rental-card, .shopkeeper-rental-card * { overflow-wrap:anywhere; }
.shopkeeper-rental-head, .shopkeeper-rental-dates, .shopkeeper-order-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.shopkeeper-rental-head h3 { margin:0 0 5px; font-size:17px; }
.shopkeeper-phone { direction:ltr; display:inline-flex; align-items:center; min-height:32px; color:var(--blue); }
.shopkeeper-order-meta { justify-content:flex-end; }
.shopkeeper-rental-dates { justify-content:flex-start; color:var(--muted); font-size:13px; }
.shopkeeper-items { padding:12px; border:1px solid var(--glass-border); border-radius:14px; background:var(--glass-bg); }
.shopkeeper-items ul { margin:8px 0 0; padding-inline-start:22px; display:grid; gap:5px; }
.shopkeeper-rental-operations { display:grid; gap:12px; margin-top:auto; }
.shopkeeper-status-form, .shopkeeper-delivery-form, .shopkeeper-return-form { display:flex; align-items:flex-end; flex-wrap:wrap; gap:10px; padding:12px; border:1px solid var(--glass-border); border-radius:14px; background:var(--glass-bg); min-width:0; }
.shopkeeper-status-form label, .shopkeeper-delivery-form label, .shopkeeper-return-form label { display:grid; gap:5px; flex:1 1 150px; min-width:0; font-size:12px; color:var(--muted); }
.shopkeeper-status-form .inp, .shopkeeper-delivery-form .inp, .shopkeeper-return-form .inp { margin:0; min-width:0; width:100%; }
.shopkeeper-delivery-form > strong, .shopkeeper-returns > strong { flex:1 0 100%; color:var(--text); }
.shopkeeper-returns { display:grid; gap:9px; }
.shopkeeper-return-form > span { flex:1 1 100%; font-size:13px; font-weight:700; }
.shopkeeper-damaged { display:flex !important; align-items:center; min-height:44px; }
.shopkeeper-message { padding:12px 16px; border:1px solid var(--glass-border); border-radius:14px; }
.shopkeeper-message.success { color:#166534; background:rgba(220,252,231,.8); }
.shopkeeper-message.error { color:#991b1b; background:rgba(254,226,226,.85); }
.shopkeeper-empty { text-align:center; color:var(--muted); }
html[data-theme="dark"] .shopkeeper-message.success { color:#bbf7d0; background:rgba(22,101,52,.24); }
html[data-theme="dark"] .shopkeeper-message.error { color:#fecaca; background:rgba(127,29,29,.26); }
html[data-theme="dark"] .shopkeeper-items, html[data-theme="dark"] .shopkeeper-status-form,
html[data-theme="dark"] .shopkeeper-delivery-form, html[data-theme="dark"] .shopkeeper-return-form { background:var(--glass-bg); }
@media (max-width:900px) { .shopkeeper-rentals .shopkeeper-rental-list { grid-template-columns:1fr; } }
@media (max-width:600px) {
  .shopkeeper-rentals { width:100%; min-width:0; overflow-x:clip; box-sizing:border-box; }
  .shopkeeper-rentals > .container { width:100%; max-width:none; min-width:0; margin:0; padding-inline:12px; box-sizing:border-box; }
  .shopkeeper-rentals .shopkeeper-rental-list { width:100%; min-width:0; grid-template-columns:minmax(0,1fr); }
  .shopkeeper-rentals .shopkeeper-rental-card,
  .shopkeeper-rentals .shopkeeper-rental-card * { min-width:0; max-width:100%; box-sizing:border-box; }
  .shopkeeper-rentals .admin-head { align-items:stretch; gap:10px; }
  .shopkeeper-rentals .admin-head, .shopkeeper-rentals .admin-tools { flex-direction:column; }
  .shopkeeper-order-meta { justify-content:flex-start; }
  .shopkeeper-rental-dates { display:grid; grid-template-columns:1fr; }
  .shopkeeper-rentals .shopkeeper-rental-list { gap:12px; }
  .shopkeeper-rental-card { padding:14px; }
  .shopkeeper-status-form, .shopkeeper-delivery-form, .shopkeeper-return-form { align-items:stretch; flex-direction:column; }
  .shopkeeper-status-form > *, .shopkeeper-delivery-form > *, .shopkeeper-return-form > * { width:100%; max-width:100%; box-sizing:border-box; }
  .shopkeeper-rentals .inp { display:block; }
  .shopkeeper-rentals .inp, .shopkeeper-rentals .btn-glass { min-height:44px; }
  .shopkeeper-rentals .shopkeeper-items li { line-height:1.8; }
  .shopkeeper-actions .btn-glass { width:100%; justify-content:center; }
}
/* Shopkeeper forms: use a single track on narrow viewports so RTL controls
   cannot retain a flex intrinsic width and push the card toward inline-start. */
@media (max-width:767px) {
  .shopkeeper-rentals,
  .shopkeeper-rentals *,
  .shopkeeper-rentals *::before,
  .shopkeeper-rentals *::after { box-sizing:border-box; }
  .shopkeeper-rentals .shopkeeper-rental-list,
  .shopkeeper-rentals .shopkeeper-rental-card,
  .shopkeeper-rentals .shopkeeper-rental-operations,
  .shopkeeper-rentals .shopkeeper-returns { min-inline-size:0; max-inline-size:100%; }
  .shopkeeper-rentals .shopkeeper-rental-list { grid-template-columns:minmax(0,1fr); }
  .shopkeeper-rentals .shopkeeper-status-form,
  .shopkeeper-rentals .shopkeeper-delivery-form,
  .shopkeeper-rentals .shopkeeper-return-form {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    inline-size:100%; min-inline-size:0; max-inline-size:100%;
  }
  .shopkeeper-rentals .shopkeeper-status-form > *,
  .shopkeeper-rentals .shopkeeper-delivery-form > *,
  .shopkeeper-rentals .shopkeeper-return-form > *,
  .shopkeeper-rentals .shopkeeper-status-form label,
  .shopkeeper-rentals .shopkeeper-delivery-form label,
  .shopkeeper-rentals .shopkeeper-return-form label {
    min-inline-size:0; max-inline-size:100%; inline-size:100%;
  }
  .shopkeeper-rentals input:not([type="hidden"]),
  .shopkeeper-rentals select,
  .shopkeeper-rentals textarea,
  .shopkeeper-rentals button { min-inline-size:0; max-inline-size:100%; }
  .shopkeeper-rentals input[type="date"] { display:block; inline-size:100%; }
}
/* Unified RTL finance and customer area */
.finance-page .finance-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:14px 0}
.finance-filter label{display:grid;gap:5px;min-width:150px}
.finance-cards,.finance-profile-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;margin:14px 0}
.finance-cards>.admin-card,.finance-profile-summary>.admin-card{display:flex;flex-direction:column;gap:8px;min-width:0}
.finance-cards strong,.finance-profile-summary strong{font-size:1.2rem;color:var(--text,#17365d);overflow-wrap:anywhere}
.finance-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:14px;margin:14px 0}
.finance-grid>.admin-card{min-width:0}
.finance-chart{height:220px;max-width:100%;overflow:hidden;background:rgba(255,255,255,.35);border:1px solid rgba(255,255,255,.55);border-radius:14px;padding:8px}
.finance-chart svg{width:100%;height:100%;overflow:visible}
.finance-chart polyline{fill:none;stroke-width:4;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.finance-chart .line-sales{stroke:#2563eb}.finance-chart .line-rental{stroke:#16a34a}.finance-chart .line-profit{stroke:#d97706}
.finance-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:8px}.finance-legend span:before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;background:#2563eb;margin-inline-end:6px}.finance-legend span:nth-child(2):before{background:#16a34a}.finance-legend span:nth-child(3):before{background:#d97706}
.finance-dl{display:grid;grid-template-columns:1fr auto;gap:10px}.finance-dl dd{margin:0;font-weight:700}
.finance-status{display:inline-flex;padding:5px 10px;border-radius:999px;border:1px solid currentColor;white-space:nowrap;font-size:.85rem}.finance-status.debtor{color:#b91c1c;background:rgba(254,226,226,.68)}.finance-status.creditor{color:#15803d;background:rgba(220,252,231,.68)}.finance-status.active{color:#1d4ed8;background:rgba(219,234,254,.72)}.finance-status.waiting{color:#a16207;background:rgba(254,243,199,.72)}.finance-status.settled{color:#475569;background:rgba(226,232,240,.72)}
.finance-phone{display:block;color:#64748b;margin-top:4px}
.finance-pages,.finance-subtabs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:14px 0}
.finance-alert{padding:12px 15px;margin:10px 0;border:1px solid rgba(217,119,6,.4);border-radius:12px;background:rgba(254,243,199,.8);color:#854d0e}
.txn-copy{max-width:260px;border:0;background:transparent;color:inherit;cursor:pointer;min-height:36px}.txn-copy bdi{direction:ltr;unicode-bidi:plaintext;overflow-wrap:anywhere}
@media(max-width:767px){.finance-grid{grid-template-columns:minmax(0,1fr)}.finance-filter>*{flex:1 1 100%;min-width:0}.finance-filter .btn-glass{min-height:44px}.finance-tabs{display:flex;overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start}.finance-tabs .admin-tab{flex:0 0 auto}.finance-chart{height:180px}}

/* Friendly error and not-found pages */
.error-page{max-width:760px;margin-inline:auto;text-align:center;padding:clamp(24px,6vw,64px) 16px}.error-page__icon{font-size:clamp(48px,10vw,76px);line-height:1;color:var(--primary,#1f6feb)}.error-page__code{margin:8px 0;color:#758195;font-weight:800;letter-spacing:.08em}.error-page .section-title{justify-content:center}.error-page__text{color:#64748b;line-height:2}.error-page__search{display:flex;gap:10px;max-width:540px;margin:24px auto;flex-wrap:wrap}.error-page__search input{flex:1 1 220px;min-width:0;min-height:44px;padding:10px 14px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#172033}.error-page__actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:20px}.error-page__actions .btn,.error-page__search .btn{min-height:44px}.error-page__trace{margin-top:28px;color:#64748b;font-size:.85rem;overflow-wrap:anywhere}@media(max-width:480px){.error-page__search{flex-direction:column}.error-page__search .btn{width:100%}}
