/* AMZ Store — catalog: filters, cards, brand pages, compare. */

/* Header: compare counter, mega menu */
.icon-btn--count { position: relative; }
.icon-btn__badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amzs-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.icon-btn__badge[hidden] { display: none; }
.primary-nav .menu > li > a { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 600; }
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .6; }
.primary-nav .sub-menu__all a { color: var(--amzs-accent); font-weight: 600; }
.menu-item--mega { position: static !important; }
.primary-nav .mega { position: absolute; left: 0; right: 0; top: 100%; padding: 26px 32px; background: var(--amzs-bg); border-top: 1px solid var(--amzs-border); border-bottom: 1px solid var(--amzs-border); box-shadow: 0 24px 40px rgba(0,0,0,.08); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.primary-nav .menu-item--mega:hover > .mega, .primary-nav .menu-item--mega:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.mega__list { columns: 5 160px; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.mega__list a { padding: 5px 0 !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; }
.mega__all { display: inline-block !important; margin-top: 14px; color: var(--amzs-accent) !important; font-weight: 600 !important; }

/* Product cards */
.amzl-pcard { position: relative; border-radius: var(--amzs-radius); border-color: var(--amzs-border); }
.amzl-pcard__media { position: relative; padding: 0; background: #fff; }
.amzl-pcard__media > a { display: block; height: 100%; padding: 18px; }
.amzl-pcard__media img { transition: transform .35s; }
.amzl-pcard:hover .amzl-pcard__media img { transform: scale(1.04); }
.amzl-pcard__brand { color: var(--amzs-text); font-weight: 700; }
.amzl-pcard__title { font-family: var(--amzs-font-body); font-weight: 500; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amzl-pcard__cat { margin: 0; color: var(--amzs-muted); font-size: .82rem; }
.amzl-pcard__price { margin: 0; font-size: .9rem; }
.amzl-pcard .amzl-buy { background: var(--amzs-primary); color: var(--amzs-on-primary); border-radius: calc(var(--amzs-radius) - 4px); }
.amzl-tier { letter-spacing: .06em; color: var(--amzs-border); font-weight: 700; }
.amzl-tier b { color: var(--amzs-text); }
.amzl-tier__label { color: var(--amzs-muted); font-size: .85em; }
.amzl-price { font-weight: 700; font-size: 1.05em; }
.amzl-price__list { color: var(--amzs-muted); font-size: .85em; }
.amzl-price__date { color: var(--amzs-muted); font-size: .75em; }

.amzl-compare-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; padding: 11px 16px; width: 100%; border: 1px solid var(--amzs-border); border-radius: var(--amzs-radius); background: var(--amzs-bg); color: var(--amzs-text); font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.amzl-compare-btn:hover { border-color: var(--amzs-primary); }
.amzl-compare-btn.is-active { background: var(--amzs-accent-soft); border-color: var(--amzs-accent); color: var(--amzs-accent); }
.amzl-compare-btn--icon { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; margin: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.amzl-compare-btn--icon .amzl-compare-btn__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.amzl-compare-btn--icon.is-active { background: var(--amzs-accent); border-color: var(--amzs-accent); color: #fff; }

/* Shop layout */
.page-hero .breadcrumbs { margin-bottom: 14px; }
.page-hero--brand { background: var(--amzs-primary); color: var(--amzs-on-primary); }
.page-hero--brand .page-hero__title, .page-hero--brand a, .page-hero--brand .breadcrumbs { color: var(--amzs-on-primary); }
.page-hero--brand .page-hero__text { color: rgba(255,255,255,.75); margin-left: 0; }
.page-hero--brand .eyebrow { color: rgba(255,255,255,.6); }
.page-hero--left .page-hero__text { margin-left: 0; }
.brand-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .95rem; opacity: .9; }
.brand-facts b { font-size: 1.25rem; }
.shop__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.shop-sidebar { position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.shop-sidebar__head { display: none; }
.filter { border-bottom: 1px solid var(--amzs-border); }
.filter__title { display: flex; align-items: center; gap: 8px; padding: 15px 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; list-style: none; }
.filter__title::-webkit-details-marker { display: none; }
.filter__title::after { content: ""; width: 7px; height: 7px; margin-left: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.filter[open] > .filter__title::after { transform: rotate(-135deg); }
.filter__badge { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--amzs-primary); color: var(--amzs-on-primary); font-size: 11px; line-height: 20px; text-align: center; letter-spacing: 0; }
.filter__search { width: 100%; margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--amzs-border); border-radius: calc(var(--amzs-radius) - 4px); background: var(--amzs-bg); font-size: .9rem; }
.filter__list { margin: 0 0 12px; padding: 0; list-style: none; }
.filter__list.is-collapsed:not(.is-searching) .is-extra { display: none; }
.filter__item label { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: .93rem; }
.filter__item input { width: 17px; height: 17px; margin: 0; accent-color: var(--amzs-primary); flex: none; }
.filter__item a { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--amzs-text); text-decoration: none; }
.filter__item a:hover { color: var(--amzs-accent); }
.filter__item--child { padding-left: 22px; }
.filter__item.is-empty { opacity: .45; }
.filter__count { color: var(--amzs-muted); font-size: .8rem; }
.filter__more { margin: -4px 0 14px; padding: 0; border: 0; background: none; color: var(--amzs-accent); font-weight: 600; font-size: .88rem; cursor: pointer; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); background: #ccc; flex: none; }
.swatch--black { background: #111; } .swatch--white { background: #fff; } .swatch--brown { background: #7b4a2a; } .swatch--tan-camel { background: #c19a6b; }
.swatch--beige-cream { background: #eadcc4; } .swatch--grey { background: #9a9a9a; } .swatch--blue { background: #2f5ea8; } .swatch--navy { background: #1d2b4f; }
.swatch--red { background: #c0262d; } .swatch--pink { background: #f2a7bf; } .swatch--purple { background: #7b4ea3; } .swatch--green { background: #3f7d4e; }
.swatch--yellow { background: #f1cb3b; } .swatch--orange { background: #ec7a2b; } .swatch--gold { background: linear-gradient(135deg, #d4af37, #f7e7a1); } .swatch--silver { background: linear-gradient(135deg, #b9b9b9, #f1f1f1); }
.swatch--multicolor { background: conic-gradient(#e44, #fc3, #4c6, #39f, #a4f, #e44); } .swatch--print { background: repeating-linear-gradient(45deg, #7b4a2a 0 3px, #c19a6b 3px 6px); }

.shop-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.shop-toolbar__filters { display: none; }
.shop-toolbar__count { margin: 0; color: var(--amzs-muted); }
.shop-toolbar__sort { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: .9rem; color: var(--amzs-muted); }
.shop-toolbar__sort select { padding: 9px 34px 9px 12px; border: 1px solid var(--amzs-border); border-radius: calc(var(--amzs-radius) - 4px); background: var(--amzs-bg); color: var(--amzs-text); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.pill--x span[aria-hidden] { margin-left: 6px; font-size: 1.1em; line-height: 1; }
.active-filters__clear { margin-left: 6px; color: var(--amzs-muted); font-size: .9rem; }
.shop .pagination { margin-top: 36px; }

/* Brands A–Z */
.brand-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
.brand-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 16px 20px; border: 1px solid var(--amzs-border); border-radius: var(--amzs-radius); background: #fff; color: var(--amzs-text); text-decoration: none; text-align: center; transition: border-color .2s, box-shadow .2s; }
.brand-tile:hover { border-color: var(--amzs-primary); box-shadow: 0 10px 26px rgba(0,0,0,.06); color: var(--amzs-text); }
.brand-tile img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 8px; }
.brand-tile__name { font-family: var(--amzs-font-heading); font-size: 1.2rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.brand-tile__count { color: var(--amzs-muted); font-size: .85rem; }
.az-index { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 28px; padding: 10px 0; background: var(--amzs-bg); border-bottom: 1px solid var(--amzs-border); }
.az-index a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 6px; color: var(--amzs-text); font-weight: 600; text-decoration: none; }
.az-index a:hover { background: var(--amzs-primary); color: var(--amzs-on-primary); }
.az-list { columns: 3 260px; column-gap: 40px; }
.az-list__group { break-inside: avoid; margin-bottom: 26px; scroll-margin-top: 140px; }
.az-list__letter { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--amzs-border); font-size: 1.5rem; }
.az-list ul { margin: 0; padding: 0; list-style: none; }
.az-list li { padding: 5px 0; }
.az-list a { color: var(--amzs-text); font-weight: 500; text-decoration: none; }
.az-list a:hover { color: var(--amzs-accent); }
.az-list a span { color: var(--amzs-muted); font-size: .8rem; font-weight: 400; }
.az-list small { display: block; color: var(--amzs-muted); font-size: .8rem; }

/* Product page */
.gallery { flex-direction: column; gap: 14px; }
.gallery__main { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 380px; }
.gallery__img { max-height: 500px; width: auto; object-fit: contain; }
.gallery__thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gallery__thumb { width: 64px; height: 64px; padding: 4px; border: 1px solid var(--amzs-border); border-radius: 8px; background: #fff; cursor: pointer; }
.gallery__thumb.is-active { border-color: var(--amzs-primary); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product__price { margin: 0 0 14px; font-size: 1.1rem; }

/* Compare dock + toast */
.compare-dock { position: fixed; left: 50%; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--amzs-primary); color: var(--amzs-on-primary); box-shadow: 0 14px 40px rgba(0,0,0,.25); transform: translate(-50%, 140%); transition: transform .3s; }
.compare-dock.is-visible { transform: translate(-50%, 0); }
.compare-dock .btn { background: var(--amzs-on-primary); color: var(--amzs-primary); border-color: var(--amzs-on-primary); border-radius: 999px; }
.compare-dock__clear { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.toast { position: fixed; left: 50%; top: 90px; z-index: 70; padding: 12px 20px; border-radius: 10px; background: var(--amzs-text); color: var(--amzs-bg); font-size: .92rem; opacity: 0; transform: translate(-50%, -10px); transition: .25s; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Compare page */
.compare-page__title { margin: 6px 0 22px; }
.compare-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--amzs-border); }
.compare-tabs__tab { margin-bottom: -1px; padding: 10px 18px; border-bottom: 2px solid transparent; color: var(--amzs-muted); font-weight: 600; text-decoration: none; }
.compare-tabs__tab span { margin-left: 4px; padding: 1px 7px; border-radius: 9px; background: var(--amzs-surface); font-size: 12px; }
.compare-tabs__tab.is-active { border-color: var(--amzs-primary); color: var(--amzs-text); }
.compare-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-bottom: 16px; }
.compare-bar-top__link { padding: 0; border: 0; background: none; color: var(--amzs-accent); font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; }
.compare-bar-top__link--muted { color: var(--amzs-muted); margin-left: auto; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { width: 18px; height: 18px; accent-color: var(--amzs-primary); }
.compare-scroll { overflow-x: auto; border: 1px solid var(--amzs-border); border-radius: var(--amzs-radius); }
.compare-table { width: 100%; min-width: calc(220px + var(--cols) * 220px); border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .93rem; }
.compare-table th, .compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--amzs-border); text-align: left; vertical-align: top; }
.compare-table td + td, .compare-table th + td, .compare-table thead th + th { border-left: 1px solid var(--amzs-border); }
.compare-table tbody th { position: sticky; left: 0; z-index: 1; width: 220px; background: var(--amzs-surface); color: var(--amzs-muted); font-weight: 600; }
.compare-table thead th { position: sticky; top: 0; z-index: 2; background: var(--amzs-bg); }
.compare-table__corner { left: 0; z-index: 3 !important; width: 220px; background: var(--amzs-surface) !important; vertical-align: bottom !important; color: var(--amzs-muted); font-weight: 600; }
.compare-card { position: relative; font-weight: 400; }
.compare-card__remove { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--amzs-surface); color: var(--amzs-muted); cursor: pointer; }
.compare-card__remove:hover { background: var(--amzs-primary); color: var(--amzs-on-primary); }
.compare-card__img { display: block; height: 170px; margin-bottom: 10px; }
.compare-card__img img { width: 100%; height: 100%; object-fit: contain; }
.compare-card__brand { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.compare-card__title { display: -webkit-box; margin: 4px 0 6px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--amzs-text); font-weight: 600; text-decoration: none; min-height: 2.6em; line-height: 1.3; }
.compare-card__rating, .compare-card__price { display: block; margin-bottom: 8px; font-size: .88rem; }
.compare-row.is-same td { color: var(--amzs-muted); }
.only-diff .compare-row.is-same { display: none; }
.compare-table td.is-best { background: #eef8ef; font-weight: 700; }
.compare-table__none { color: var(--amzs-border); }
.compare-row--features ul { margin: 0; padding-left: 18px; color: var(--amzs-muted); font-size: .85rem; }
.compare-row--features li { margin-bottom: 6px; }
.compare-page__note { margin-top: 14px; color: var(--amzs-muted); font-size: 12px; }

@media (max-width: 1100px) {
  .shop__layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .shop .amzl-grid { --amzl-cols: 2 !important; }
  .brand-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shop__layout { grid-template-columns: 1fr; }
  .shop-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(340px, 88vw); max-height: none; padding: 0 20px 30px; background: var(--amzs-bg); transform: translateX(-105%); transition: transform .3s; }
  .filters-open .shop-sidebar { transform: none; }
  .shop-sidebar__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; background: var(--amzs-bg); border-bottom: 1px solid var(--amzs-border); }
  .shop-sidebar__head h2 { margin: 0; font-size: 1.2rem; }
  .shop-sidebar-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; transition: .3s; }
  .filters-open .shop-sidebar-backdrop { opacity: 1; visibility: visible; }
  .shop-toolbar__filters { display: inline-flex; }
  .shop-toolbar { flex-wrap: wrap; }
  .shop-toolbar__sort span { display: none; }
  .primary-nav .mega { position: static; opacity: 1; visibility: visible; transform: none; padding: 8px 0 8px 16px; border: 0; box-shadow: none; }
  .mega__list { columns: 2; }
}
@media (max-width: 640px) {
  .shop-toolbar__count { order: 3; width: 100%; }
  .compare-table { min-width: calc(130px + var(--cols) * 170px); font-size: .85rem; }
  .compare-table tbody th, .compare-table__corner { width: 130px; }
  .compare-card__img { height: 120px; }
  .compare-dock { left: 12px; right: 12px; transform: translateY(140%); justify-content: space-between; }
  .compare-dock.is-visible { transform: none; }
}
