/* Stage 4 — Catalog + Product page */

/* Breadcrumbs */
.am-breadcrumbs{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:28px 0 10px;font-size:13px;color:var(--am-text-dim)}
.am-breadcrumbs a:hover{color:var(--am-accent)}
.am-breadcrumbs span[aria-current]{color:var(--am-text-muted)}

/* Catalog hero */
.am-catalog-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;padding:20px 0 36px;border-bottom:1px solid var(--am-border);margin-bottom:28px;flex-wrap:wrap}
.am-catalog-hero .am-h2{margin-bottom:12px}
.am-catalog-hero__lead{max-width:720px;line-height:1.75}
.am-catalog-hero__count{font-size:14px;color:var(--am-text-dim);white-space:nowrap}

/* Layout */
.am-catalog-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:32px;align-items:start;padding-bottom:64px}

/* Filters */
.am-filters{
  position:sticky;top:96px;padding:24px;border-radius:var(--am-radius-lg);
  background:var(--am-surface-glass);border:1px solid var(--am-border);
  backdrop-filter:blur(16px) saturate(120%);-webkit-backdrop-filter:blur(16px) saturate(120%);
}
.am-filters__head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--am-border)}
.am-filters__title{font-size:1rem;font-weight:600;margin:0;color:var(--am-text)}
.am-filter-group{padding:16px 0;border-bottom:1px solid var(--am-border)}
.am-filter-group:last-of-type{border-bottom:0}
.am-filter-group__label{font-size:13px;font-weight:600;color:var(--am-text);margin:0 0 12px;display:block}
.am-filter-group__summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center}
.am-filter-group__summary::-webkit-details-marker{display:none}
.am-filter-group__summary::after{content:"+";color:var(--am-text-dim);font-size:18px;line-height:1}
details[open] .am-filter-group__summary::after{content:"–"}
.am-filter-options{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.am-filter-options .am-check{font-size:14px}
.am-filter-price{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.am-filter-price .am-input{min-height:46px;padding:10px 12px}
.am-filter-chips{display:flex;gap:10px;flex-wrap:wrap}
.am-chip{position:relative;cursor:pointer}
.am-chip input{position:absolute;opacity:0;pointer-events:none}
.am-chip span{
  display:inline-flex;padding:10px 14px;border-radius:999px;border:1px solid var(--am-border);
  font-size:13px;color:var(--am-text-muted);background:rgba(255,255,255,.02);transition:all var(--am-transition)
}
.am-chip input:checked + span{color:#1a140d;background:var(--am-accent);border-color:var(--am-accent)}
.am-chip input:focus-visible + span{outline:2px solid var(--am-accent);outline-offset:2px}
.am-filters__apply{padding-top:20px}
.am-filters-toggle{display:none}

/* Toolbar */
.am-catalog-toolbar{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:20px}
.am-catalog-sort{display:flex;align-items:center;gap:12px}
.am-catalog-sort .am-label{margin:0;white-space:nowrap}
.am-select{min-height:44px;padding:10px 42px 10px 14px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cfc6ba' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;cursor:pointer}
.am-select option{background:#171513;color:#f5efe7}
.am-catalog-toolbar__count{margin-left:auto;font-size:14px}
.am-active-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}
.am-active-filter{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  background:rgba(227,180,106,.1);border:1px solid rgba(227,180,106,.25);color:var(--am-accent-2);font-size:13px
}
.am-active-filter button{background:none;border:0;color:inherit;font-size:16px;cursor:pointer;padding:0;line-height:1}

.am-products-grid--catalog{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width: 1200px){.am-products-grid--catalog{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 640px){.am-products-grid--catalog{grid-template-columns:1fr}}

/* Pagination / more */
.am-catalog-more{padding:40px 0 16px;text-align:center}
.am-pagination{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;padding:16px 0}
.am-pagination__item{
  min-width:44px;height:44px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;border:1px solid var(--am-border);color:var(--am-text-muted);font-size:14px
}
.am-pagination__item:hover{border-color:rgba(227,180,106,.35);color:var(--am-text)}
.am-pagination__item.is-active{background:var(--am-accent);color:#1a140d;border-color:var(--am-accent);font-weight:600}
.am-pagination__dots{color:var(--am-text-dim);padding:0 6px}

@media (max-width: 1000px){
  .am-catalog-layout{grid-template-columns:1fr}
  .am-filters{position:static;display:none}
  .am-filters.is-open{display:block}
  .am-filters-toggle{display:inline-flex}
}

/* ===================== PRODUCT PAGE ===================== */
.am-product-page{padding-bottom:40px}
.am-product{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:48px;align-items:start;padding:16px 0 32px}

/* Gallery */
.am-gallery__main{
  position:relative;aspect-ratio:4/5;background:#1a1816;border-radius:var(--am-radius-lg);overflow:hidden;border:1px solid var(--am-border);
}
.am-gallery__main img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.am-gallery__main:hover img{transform:scale(1.02)}
.am-gallery__badge{position:absolute;top:18px;left:18px;z-index:2}
.am-gallery__zoom{
  position:absolute;right:18px;bottom:18px;width:48px;height:48px;border-radius:50%;border:1px solid var(--am-border);
  background:rgba(14,13,11,.55);color:var(--am-text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
.am-gallery__zoom:hover{color:var(--am-accent);border-color:rgba(227,180,106,.35)}
.am-gallery__thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}
.am-gallery__thumb{
  aspect-ratio:1;border-radius:10px;overflow:hidden;border:1px solid var(--am-border);padding:0;background:#1a1816;cursor:pointer;opacity:.55;transition:all var(--am-transition)
}
.am-gallery__thumb img{width:100%;height:100%;object-fit:cover}
.am-gallery__thumb:hover,.am-gallery__thumb.is-active{opacity:1;border-color:var(--am-accent)}

/* Product info */
.am-product__title{font-family:var(--am-font-display);font-size:clamp(2rem,4vw,3.4rem);line-height:1.1;font-weight:400;margin:0 0 10px}
.am-product__sku{font-size:14px;color:var(--am-text-dim);margin:0 0 24px}
.am-product__price-block{display:flex;align-items:baseline;gap:14px;margin-bottom:16px}
.am-product__price{font-size:2rem;font-weight:600;color:var(--am-text)}
.am-product__status{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:24px}

.am-product__maker{
  display:flex;gap:16px;padding:20px;border-radius:var(--am-radius);background:rgba(227,180,106,.07);
  border:1px solid rgba(227,180,106,.2);margin-bottom:28px;
}
.am-product__maker-icon{color:var(--am-accent);flex-shrink:0;margin-top:2px}
.am-product__maker-title{font-weight:600;margin:0 0 4px;color:var(--am-text)}
.am-product__maker-text{margin:0;font-size:14px;line-height:1.7;color:var(--am-text-muted)}

.am-product__buy{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap;margin-bottom:18px}
.am-qty{display:inline-flex;align-items:center;border:1px solid var(--am-border);border-radius:var(--am-radius-pill);overflow:hidden;background:rgba(255,255,255,.02)}
.am-qty__btn{width:48px;height:52px;background:none;border:0;color:var(--am-text);font-size:20px;cursor:pointer}
.am-qty__btn:hover{color:var(--am-accent);background:rgba(255,255,255,.04)}
.am-qty__input{width:56px;height:52px;text-align:center;background:transparent;border:0;color:var(--am-text);font-size:16px;-moz-appearance:textfield}
.am-qty__input::-webkit-outer-spin-button,.am-qty__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.am-product__add{flex:1;min-width:200px}
.am-product__fav-btn{
  width:52px;height:52px;border-radius:50%;border:1px solid var(--am-border);background:transparent;color:var(--am-text-muted);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0
}
.am-product__fav-btn:hover{color:var(--am-accent);border-color:rgba(227,180,106,.35)}
.am-product__secondary-actions{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:28px}

/* Quick specs */
.am-product__quick-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid var(--am-border);border-bottom:1px solid var(--am-border);padding:8px 0;margin-bottom:24px}
.am-quick-spec{display:flex;justify-content:space-between;gap:16px;padding:12px 0;font-size:14px}
.am-quick-spec:nth-child(odd){padding-right:20px;border-right:1px solid var(--am-border)}
.am-quick-spec:nth-child(even){padding-left:20px}
.am-quick-spec__label{color:var(--am-text-dim)}
.am-quick-spec__value{color:var(--am-text);text-align:right}

.am-product__trust{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.am-trust-item{display:flex;gap:10px;font-size:14px;color:var(--am-text-muted);align-items:flex-start}
.am-trust-item__icon{color:var(--am-accent);font-weight:700;line-height:1.4}
.am-trust-item a{color:var(--am-text-muted);text-decoration:underline;text-underline-offset:3px}
.am-trust-item a:hover{color:var(--am-accent)}

/* Tabs/specs */
.am-product-tabs{padding:24px 0}
.am-tabs{display:flex;gap:8px;border-bottom:1px solid var(--am-border);margin-bottom:28px;overflow:auto}
.am-tab{
  padding:14px 18px;background:none;border:0;border-bottom:2px solid transparent;color:var(--am-text-muted);
  font-size:15px;cursor:pointer;white-space:nowrap;margin-bottom:-1px
}
.am-tab:hover{color:var(--am-text)}
.am-tab.is-active{color:var(--am-accent);border-bottom-color:var(--am-accent)}
.am-tab-panel{display:none}
.am-tab-panel.is-active{display:block}

.am-specs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px}
.am-specs__title{font-size:1rem;font-weight:600;margin:0 0 16px;color:var(--am-text)}
.am-specs__list{margin:0;display:flex;flex-direction:column}
.am-specs__row{display:flex;justify-content:space-between;gap:20px;padding:10px 0;border-bottom:1px solid rgba(245,239,231,.06);font-size:14px}
.am-specs__row dt{color:var(--am-text-dim)}
.am-specs__row dd{margin:0;color:var(--am-text);text-align:right}
.am-delivery-info{max-width:720px;color:var(--am-text-muted);line-height:1.8}
.am-delivery-info p{margin:0 0 14px}

@media (max-width: 1100px){
  .am-product{grid-template-columns:1fr;gap:28px}
  .am-specs{grid-template-columns:1fr;gap:28px}
}
@media (max-width: 640px){
  .am-product__quick-specs{grid-template-columns:1fr}
  .am-quick-spec:nth-child(odd){padding-right:0;border-right:0}
  .am-quick-spec:nth-child(even){padding-left:0}
  .am-product__trust{grid-template-columns:1fr}
  .am-product__buy .am-qty{width:100%;justify-content:space-between}
  .am-product__buy .am-product__add{width:100%;flex:none}
  .am-catalog-hero{padding:12px 0 24px}
  .am-catalog-toolbar{gap:12px}
  .am-catalog-toolbar__count{width:100%;margin-left:0}
  .am-catalog-sort{width:100%}
  .am-catalog-sort .am-select{flex:1}
  .am-gallery__thumbs{grid-template-columns:repeat(4,1fr);gap:8px}
  .am-product__title{font-size:2rem}
  .am-product__price{font-size:1.7rem}
  .am-tabs{gap:0}
  .am-tab{padding:12px 12px;font-size:14px}
}