/* brand-v15: the DentMarket logo (brand pack) in the header and on the home page, day and night. */
.brand-logo{display:inline-flex;align-items:center;line-height:0}
.site-logo{display:block;height:40px;width:auto}
.home-page .home-brand .site-logo{height:64px}
.logo-night{display:none}
[data-theme=dark] .logo-day{display:none}
[data-theme=dark] .logo-night{display:block}
@media(max-width:760px){.site-logo{height:32px}.home-page .home-brand .site-logo{height:48px}}

/* Desktop bar of main categories under the header (Torob-style); also internal links for search engines. */
.group-bar{display:none}
@media(min-width:761px){
 .group-bar{display:block;background:var(--panel);border-bottom:1px solid var(--line)}
 .group-bar-inner{max-width:1400px;margin:0 auto;padding:0 24px;display:flex;gap:20px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;align-items:center;min-height:44px}
 .group-bar-inner::-webkit-scrollbar{display:none}
 .group-bar a{font-size:13.5px;flex-shrink:0;color:var(--muted-2);padding:10px 0;white-space:nowrap}
 .group-bar a:hover{color:var(--accent)}
 .group-bar .group-bar-all{margin-right:auto;color:var(--blue)}
 .home-page .group-bar{background:var(--bg);border-bottom:0}
}

/* Home price-drop band (Digikala «شگفت‌انگیز» style): red band, title panel beside the cards. */
.home-page .deals-band{background:linear-gradient(120deg,#b5122e,#e2264d);border:0;color:#fff}
.deals-band .section-heading h2,.deals-band .shelf-caption{color:#fff}
.deals-band .section-heading a{background:#fff;color:#b5122e!important;border-radius:999px;padding:6px 16px;font-weight:600}
.deals-band .deal-badge{background:#fff;color:#b5122e}
.deals-band .card{border-color:transparent}
@media(min-width:761px){
 .home-page .deals-band{display:grid;grid-template-columns:200px minmax(0,1fr);gap:18px;align-items:center}
 .deals-band .section-heading{flex-direction:column;align-items:center;text-align:center;gap:14px;margin:0}
 .deals-band .section-heading::before{content:'٪';display:block;font-size:64px;font-weight:800;line-height:1;color:#fff}
 .deals-band .section-heading h2{font-size:24px}
}

/* Product page: the factual price summary. */
.price-summary p{font-size:15px;line-height:2.1;margin:0}

/* Main-group icons: solid colour circles with a white pictogram (Digikala-style), one colour per group. */
.group-badge,.browse-strip>a>.group-badge,.browse-strip>a:nth-child(n)>.group-badge{display:grid;place-items:center;flex-shrink:0;border-radius:50%;
  width:44px;height:44px;padding:0;border:0;box-shadow:0 3px 10px #0000001f}
.group-badge .dm-icon,.mega-tab .group-badge .dm-icon,.category-rail .group-badge .dm-icon{width:72%;height:72%;color:#fff;fill:#ffffff47;
  background:none;border:0;padding:0;border-radius:0}
/* !important: older sheets give these wrappers a pale background and inner padding. */
.group-badge{padding:0!important;border:0!important}
.gb-endo{background:#e2264d!important}.gb-restorative{background:#1e88e5!important}.gb-prosthetic{background:#8e24aa!important}.gb-surgery{background:#00897b!important}
.gb-handpiece{background:#f4511e!important}.gb-equipment{background:#3949ab!important}.gb-infection{background:#43a047!important}.gb-consumables{background:#f59e0b!important}
.gb-imaging{background:#546e7a!important}.gb-ortho{background:#d81b60!important}.gb-whitening{background:#0ea5e9!important}.gb-oral-hygiene{background:#14b8a6!important}
.browse-strip>a>.group-badge{width:72px;height:72px;margin:4px auto 9px}
.browse-strip>a:hover>.group-badge{transform:translateY(-2px);box-shadow:0 6px 16px #0000002e}
.mega-tab .group-badge{width:34px;height:34px}
.category-rail .group-badge{width:40px;height:40px}

/* Subcategory pictograms: larger glyphs, stronger ink and tint, so their shapes read clearly. */
:root:not([data-theme=dark]){--icon-ink:#1f2937;--icon-tint:#f3a5b8;--icon-bg:#fff1f4}
:root{--icon-ink:#f1f5f7;--icon-tint:#b4415f}
.category-body .subcategory-icon,.subcategory-links>a:nth-child(n) .subcategory-icon{width:68px;height:68px;padding:7px;border-radius:18px}
.subcategory-icon .dm-icon{width:100%;height:100%}

/* Mobile categories page: Torob-style lists instead of the two-column browser. */
.cat-mobile{display:none}
@media(max-width:760px){
 .category-browser{display:none}
 .cat-mobile{display:block;padding:12px 12px 90px}
 .cat-mobile h1{font-size:19px;font-weight:650;margin:6px 4px 12px}
 .cat-back{display:inline-block;color:var(--blue);font-size:14px;margin:2px 4px 4px}
 .cat-row{display:flex;align-items:center;gap:14px;background:var(--panel);border-bottom:1px solid var(--line);padding:12px 14px;font-size:15px;color:var(--text)}
 .cat-row:first-of-type{border-radius:14px 14px 0 0}
 .cat-row>span:not(.group-badge):not(.cat-photo){flex:1}
 .cat-row::after{content:'‹';color:var(--muted);font-size:20px;line-height:1}
 .cat-group .group-badge{width:46px;height:46px}
 .cat-row>.product-icon{width:40px;height:40px;background:var(--icon-bg);border-radius:12px;padding:3px;border:1px solid var(--line)}
 .cat-all{color:var(--accent);font-weight:600}
 .cat-section{background:var(--panel);border:1px solid var(--line);border-radius:14px;margin:10px 0;overflow:hidden}
 .cat-section>summary{padding:14px 16px;font-size:16px;font-weight:650;cursor:pointer;list-style:none;display:flex;justify-content:space-between}
 .cat-section>summary::-webkit-details-marker{display:none}
 .cat-section>summary::after{content:'+';color:var(--muted);font-weight:400}
 .cat-section[open]>summary::after{content:'−'}
 .cat-section .cat-row{border-radius:0;border-bottom:0;border-top:1px solid var(--line)}
 .browse-strip>a>.group-badge{width:60px;height:60px}
}

/* v16 — desktop categories page as in the header's mega menu: group circles with a chevron on the right,
   bold section headings, plain text lists of subcategories (no subcategory pictograms on desktop). */
@media(min-width:761px){
 .category-body .subcategory-icon,.category-body .subcategory-links>a:nth-child(n) .subcategory-icon{display:none!important}
 .category-body .category-sections{grid-template-columns:repeat(4,minmax(0,1fr));gap:26px 18px;margin-top:22px}
 .category-body .category-section h2{font-size:16px;line-height:1.8;margin-bottom:10px}
 .category-body .subcategory-links{display:flex;flex-direction:column;gap:0}
 .category-body .subcategory-links>a{flex-direction:row;text-align:right;font-size:14px;line-height:1.9;padding:6px 0;gap:0;min-height:32px;color:var(--muted-2)}
 .category-body .subcategory-links>a:hover{color:var(--accent)}
 .category-rail>a{display:flex;align-items:center;gap:12px;padding:14px 16px}
 .category-rail>a>span:not(.group-badge){flex:1}
 .category-rail>a::after{content:'‹';color:var(--muted);font-size:20px;line-height:1}
 .category-rail .selected::after{color:var(--accent)}
 .category-rail .group-badge{width:46px;height:46px}
}
@media(min-width:761px) and (max-width:1100px){.category-body .category-sections{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v17 — home first screen in the spirit of Google Shopping: logo, one wide rounded search box,
   popular searches and the main groups as chips; no menu rows or shortcut tiles above the fold. */
.home-page .desktop-navigation{display:none}
.home-page .home-brand{margin-top:42px}
.home-page .top-inner{max-width:760px}
.home-page .searchbar{height:58px;border-radius:29px;border:1px solid var(--line);box-shadow:0 1px 6px #20212447;padding:0 22px;background:var(--panel)}
.home-page .searchbar:focus-within{box-shadow:0 2px 10px #2021245c}
.home-page .hero-meta{padding:10px 16px 0}
.home-page .chip-strip{justify-content:center;flex-wrap:wrap;gap:8px;margin:12px auto 0;max-width:860px;padding:0 16px}
.chip-label{font-size:13px;color:var(--muted);align-self:center}
.home-page .chip-strip .chip{font-size:13px;padding:4px 14px}
.group-pills{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:1040px;margin:22px auto 26px;padding:0 16px}
.group-pills>a{display:inline-flex;align-items:center;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:5px 14px 5px 6px;font-size:14px;color:var(--text);transition:box-shadow .15s,border-color .15s}
.group-pills>a:hover{border-color:var(--accent);box-shadow:0 2px 8px var(--shadow)}
.group-pills .group-badge{width:32px;height:32px;box-shadow:none}
@media(max-width:760px){
 .home-page .home-brand{margin-top:14px}
 .home-page .searchbar{height:50px;border-radius:25px;padding:0 14px}
 .home-page .chip-strip{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto}
 .chip-label{display:none}
 .group-pills{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;margin:14px 0 16px;padding:0 12px}
 .group-pills::-webkit-scrollbar{display:none}
 .group-pills>a{flex-shrink:0;font-size:13px}
}

/* v18 — Net32-style category pictures: a real product photo on white; the coloured pictogram stays
   underneath and shows if the store image cannot load (market.js marks it .image-failed). */
.cat-photo{position:relative;display:inline-grid;place-items:center;flex-shrink:0;overflow:hidden;border-radius:50%;background:#fff;border:1px solid var(--line)}
.cat-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:10%;background:#fff;z-index:1}
.cat-photo>img.image-failed{display:none}
.cat-photo>.group-badge{width:100%!important;height:100%!important;box-shadow:none!important}
.cat-photo>.product-icon{width:80%;height:80%}
.group-photo{width:44px;height:44px}
.mega-tab .group-photo{width:36px;height:36px}
.category-rail .group-photo{width:46px;height:46px}
.group-pills .group-photo{width:34px;height:34px}
.browse-strip .group-photo{width:72px;height:72px}
.item-photo{width:40px;height:40px;border-radius:12px}
.top-categories{max-width:1180px;margin:6px auto 22px;padding:0 24px}
.top-categories h2{font-size:20px;font-weight:700;text-align:center;margin:0 0 14px}
.top-categories-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.top-categories-grid>a{display:flex;flex-direction:column;align-items:center;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px 10px;color:var(--text);text-align:center}
.top-categories-grid>a:hover{border-color:var(--accent);box-shadow:0 4px 14px var(--shadow)}
.top-categories-grid .group-photo{width:120px;height:120px;border-radius:14px;border:0}
.top-categories-grid .group-photo>img{padding:4%}
.top-categories-grid strong{font-size:14px;font-weight:600;line-height:1.7}
@media(max-width:1100px){.top-categories-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){
 .top-categories{padding:0 10px}
 .top-categories h2{font-size:17px}
 .top-categories-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .top-categories-grid .group-photo{width:96px;height:96px}
 .cat-group .group-photo{width:46px;height:46px}
}

/* v18 — contact form, sign-in, alerts, mailbox */
.contact-form{max-width:none}
.member-card .primary{align-self:flex-start;margin-top:4px}
.member-card form{margin-top:8px}
.alert-form{margin-top:2px}
.mail-unread td{font-weight:650}
.mail-body{white-space:pre-wrap;font-family:inherit;font-size:14px;line-height:2;background:var(--input);border-radius:10px;padding:12px 14px;max-height:70vh;overflow:auto}

/* v18 — search suggestions under the search box (phone first) */
form.searchbar{position:relative}
.suggest-box{position:absolute;top:calc(100% + 6px);right:0;left:0;z-index:60;background:var(--panel);border:1px solid var(--line);
  border-radius:16px;box-shadow:0 10px 30px var(--shadow);padding:6px 0;max-height:min(70vh,520px);overflow-y:auto;text-align:right}
.suggest-heading{font-size:12px;color:var(--muted);padding:8px 16px 4px}
.suggest-item{display:flex;align-items:center;gap:12px;padding:9px 16px;color:var(--text);min-height:44px}
.suggest-item:hover,.suggest-item.active{background:var(--input)}
.suggest-item img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:8px;border:1px solid var(--line);flex-shrink:0}
.suggest-text{display:flex;flex-direction:column;min-width:0}
.suggest-text b{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.suggest-text small{font-size:12px;color:var(--muted)}
.suggest-category b::before{content:'⌕ ';color:var(--muted)}
.suggest-all{color:var(--blue);font-size:14px;border-top:1px solid var(--line);margin-top:4px}
.did-you-mean{margin-top:22px}
.did-you-mean h2{font-size:17px;font-weight:650;margin:0 0 12px}
@media(max-width:760px){.suggest-box{max-height:calc(100dvh - 160px);border-radius:14px}}

/* v18 — sorting applies on change; page numbers give way to infinite scroll when JavaScript runs */
.js .js-hidden{display:none!important}
.js nav.pagination.infinite{display:none}
.infinite-sentinel{height:1px}
.infinite-sentinel.loading{height:56px;background:radial-gradient(circle at center,var(--accent) 0 5px,transparent 6px) center/22px 22px no-repeat;opacity:.6}

/* v18 — compact product page: packages and long sections collapse to one line each */
.variant-picker{margin:14px 0 4px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.variant-picker>summary{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;list-style:none;font-size:14px}
.variant-picker>summary::-webkit-details-marker{display:none}
.variant-picker>summary span{color:var(--muted)}
.variant-picker>summary b{font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.variant-picker>summary small{color:var(--blue);flex-shrink:0}
.variant-picker>summary::after{content:'▾';color:var(--muted)}
.variant-picker[open]>summary::after{content:'▴'}
.variant-picker .variants{padding:0 12px 12px;max-height:220px;overflow-y:auto}
.spec-box>summary,.price-summary>summary{font-size:16px;font-weight:600;cursor:pointer;padding:2px 0}
.spec-box[open]>summary,.price-summary[open]>summary{margin-bottom:10px}
/* Product actions (save / compare / price alert) share one row; the package note is shorter. */
.product-info .save-form{display:inline-flex;align-items:center;margin:4px 0 0 16px;vertical-align:middle}
.product-info .save-form .save-button{padding:6px 0;font-size:14px}
.product-info .compare-form .compare-open{margin-right:8px;font-size:13px}
.product-info .package-note{font-size:13px;line-height:1.9;padding:8px 12px;margin:10px 0}
@media(max-width:760px){
 .product-info .save-form{margin:2px 0 0 12px}
 .product-info .save-form .save-button{font-size:13px}
 .detail-image{min-height:220px}
}
/* Phone: categories as one horizontally scrolling row of round photos (Digikala-style), so product
   shelves start right after the search box. */
@media(max-width:760px){
 .top-categories{margin:4px 0 10px;padding:0}
 .top-categories h2{display:none}
 .top-categories-grid{display:flex;overflow-x:auto;gap:12px;padding:6px 12px 10px;scrollbar-width:none;scroll-snap-type:x proximity}
 .top-categories-grid::-webkit-scrollbar{display:none}
 .top-categories-grid>a{flex:0 0 84px;background:none;border:0;padding:0;gap:6px;scroll-snap-align:start}
 .top-categories-grid>a:hover{box-shadow:none}
 .top-categories-grid .group-photo{width:72px;height:72px;border-radius:50%;border:1px solid var(--line);background:#fff}
 .top-categories-grid strong{font-size:11.5px;font-weight:500;line-height:1.6}
 .home-page .chip-strip{margin-top:10px}
}
/* Offers whose price is probably stale: listed last, muted. */
.suspicious-offers{opacity:.85}
.suspicious-offers h2{color:var(--note-text)}
.suspicious-tag{color:var(--note-text)!important}
/* Home: the search box stays at the top while the shelves scroll (phone and desktop). */
.home-page header.top{position:sticky;top:0;z-index:40;background:var(--bg);box-shadow:0 6px 12px -10px var(--shadow)}
/* Home: one Torob-style line under the search box says what the site is. */
.home-pitch{text-align:center;margin:12px 16px 0;font-size:15px;color:var(--muted-2)}
.home-pitch b{color:var(--accent);font-weight:700}
@media(max-width:760px){.home-pitch{font-size:13px;margin-top:8px}}

/* v19 — phone categories page like Digikala: groups in a column on the right, the selected group's
   subcategories as a photo grid; each column scrolls by itself inside the fixed page. */
@media(max-width:760px){
 .category-browser{display:grid!important;grid-template-columns:92px minmax(0,1fr);height:100%;min-height:0}
 .category-rail{overflow-y:auto;-webkit-overflow-scrolling:touch;background:var(--panel);border-left:1px solid var(--line)}
 .category-rail>a{flex-direction:column;gap:6px;padding:12px 4px;min-height:0;font-size:11px;line-height:1.6;text-align:center;border-right:3px solid transparent}
 .category-rail>a::after{display:none}
 .category-rail .group-photo,.category-rail .group-badge{width:48px;height:48px}
 .category-rail .selected{background:var(--bg);border-right-color:var(--accent);color:var(--accent);font-weight:600}
 .category-body{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 10px 90px}
 .category-heading{padding-bottom:10px}
 .category-heading h1{font-size:16px;margin:0 0 6px}
 .category-body .category-sections{grid-template-columns:minmax(0,1fr);gap:18px;margin-top:14px}
 .category-body .category-section h2{font-size:14px;margin-bottom:10px}
 .category-body .subcategory-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 8px}
 .category-body .subcategory-links>a{flex-direction:column;align-items:center;text-align:center;gap:6px;font-size:11.5px;line-height:1.6;color:var(--text)}
 .category-body .subcategory-icon,.category-body .subcategory-links>a:nth-child(n) .subcategory-icon{display:grid!important;place-items:center;width:64px;height:64px;padding:0;border-radius:50%;background:#fff;border:1px solid var(--line)}
 .category-body .subcategory-icon .item-photo{width:62px;height:62px;border:0;border-radius:50%}
 .category-body .subcategory-icon>.product-icon{width:44px;height:44px}
}

/* Desktop home: categories as one slim row of small photos and names. */
@media(min-width:761px){
 .top-categories{margin:4px auto 10px}
 .top-categories h2{display:none}
 .top-categories-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px}
 .top-categories-grid>a{flex:0 0 auto;width:96px;background:none;border:0;padding:4px 0;gap:6px}
 .top-categories-grid>a:hover{box-shadow:none;color:var(--accent)}
 .top-categories-grid .group-photo{width:64px;height:64px;border-radius:50%;border:1px solid var(--line)}
 .top-categories-grid strong{font-size:12.5px;font-weight:500;line-height:1.6}
}

/* Phone product page: the cheapest offer stays in view above the bottom menu (Digikala-style buy bar). */
.buy-bar{display:none}
@media(max-width:760px){
 .detail-page .buy-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;right:0;left:0;z-index:35;
   bottom:calc(var(--bottom,62px) + env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line);
   box-shadow:0 -6px 16px var(--shadow);padding:8px 14px}
 .buy-bar>div{display:flex;flex-direction:column;min-width:0}
 .buy-bar small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .buy-bar b{font-size:17px;font-weight:700;color:var(--strong)}
 .buy-bar .primary{border-radius:10px;padding:10px 18px;font-size:14px;flex-shrink:0}
 .detail-page main{padding-bottom:84px}
}

/* cats-v19: Digikala day palette — one red, quiet greys, cyan links; the «شگفت‌انگیز» band is the only loud block. */
:root:not([data-theme=dark]){--accent:#ef4056;--text:#3f4064;--muted:#81858b;--line:#e0e0e2;--blue:#0a7f99;--stock:#00a049;
      --soft:#fdeef0;--band-a:#ef4056;--band-b:#ef4056;--icon-tint:#f7a8b4}
:root:not([data-theme=dark]) .home-page .deals-band{background:#ef4056;border-radius:16px}
:root:not([data-theme=dark]) .deals-band .section-heading a{color:#ef4056!important}
:root:not([data-theme=dark]) .deals-band .card{background:#fff;border-radius:8px}
:root:not([data-theme=dark]) .deal-badge,:root:not([data-theme=dark]) .deals-band .deal-badge{background:#d32f2f;color:#fff}
:root:not([data-theme=dark]) .shelf:not(.deals-band) .section-heading h2{color:#080a38}
/* cats-v19: filters scroll on their own beside the product grid (desktop) */
@media(min-width:761px){.filters{max-height:calc(100dvh - 146px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}}
/* cats-v19: rail photos keep their round size (flex:1 on rail spans used to stretch them into ovals) */
.category-rail>a>span.cat-photo{flex:0 0 auto}
.category-rail .group-photo{width:56px;height:56px}
.category-rail .group-photo>img{padding:5%}
@media(max-width:760px){.category-rail .group-photo{width:48px;height:48px}}
