/* ==========================================================================
   Shop: product card (same everywhere), product background stage, archive toolbar,
   single product (gallery, buy box, tabs), related, sticky bar, empty cart.
   Path: wp-content/themes/arch-research/assets/css/shop.css — New file
   ========================================================================== */

/* ---------- Product background stage (same backdrop behind every transparent product image) ---------- */
.arc-stage { position: relative; display: grid; place-items: center; aspect-ratio: 6 / 5; overflow: hidden; background: #EAF2F9 var(--arc-product-bg) center / cover no-repeat; }
.arc-stage__img, .arc-stage img { position: relative; width: 82%; height: 92%; object-fit: contain; object-position: center bottom; transition: transform .5s var(--ease); filter: drop-shadow(0 18px 18px rgba(10, 43, 84, .18)); }
.arc-stage--xl { aspect-ratio: 1 / 1; border-radius: var(--r-lg); cursor: zoom-in; }
.arc-stage--xl .arc-stage__img { width: 64%; height: 80%; object-position: center; }
.arc-stage--mini { aspect-ratio: 1 / 1.08; border-radius: 10px; }
.arc-stage--mini img { width: 86%; height: 90%; filter: none; }
.arc-stage--coa { aspect-ratio: 16 / 10; }
.arc-stage--icon { color: var(--teal); }
.arc-stage--icon .arc-i { width: 44px; height: 44px; }

/* ---------- Product card ---------- */
.arc-card { position: relative; display: flex; flex-direction: column; border: 1px solid rgba(var(--teal-rgb), .55); border-radius: 18px; background: #fff; overflow: hidden; transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .3s; }
.arc-card:hover { box-shadow: 0 22px 44px -26px rgba(var(--navy-rgb), .45); transform: translateY(-3px); border-color: var(--teal); }
.arc-card:hover .arc-stage__img { transform: scale(1.04); }
.arc-card__media { display: block; position: relative; }
.arc-card__media .arc-stage { border-radius: 18px 18px 0 0; }
.arc-card__flag { position: absolute; left: 14px; top: 14px; padding: 5px 12px; border-radius: 99px; background: #fff; color: var(--navy); font: 600 12.5px/1.2 var(--font-head); box-shadow: var(--shadow-sm); }
.arc-card__flag--sale { background: var(--grad); color: #fff; }
.arc-card__flag--out { background: var(--ink); color: #fff; }
.arc-card__body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: clamp(18px, 2vw, 26px) clamp(18px, 2.2vw, 30px) clamp(18px, 2vw, 24px); }
.arc-card__title { font-family: var(--font-head) !important; font-weight: 700 !important; font-size: clamp(20px, 1.85vw, 26px) !important; line-height: 1.25 !important; margin: 0 !important; color: var(--ink); text-transform: none; }
.arc-card__title a { color: inherit !important; transition: color .2s; }
.arc-card__title a:hover { color: var(--navy) !important; }
.arc-card__price { margin: 0 0 6px !important; font-size: clamp(20px, 1.7vw, 24px); color: var(--ink); }
.arc-card__btn { --bh: 54px; margin-top: auto; font-size: 18px; }
.arc-card.is-out .arc-stage__img { opacity: .7; }
.arc-grid--4 .arc-card__title { font-size: clamp(18px, 1.5vw, 22px) !important; }
.arc-grid--4 .arc-card__price { font-size: 20px; }
.arc-grid--4 .arc-card__btn { --bh: 48px; font-size: 16px; }

/* WooCommerce [products] shortcode / blocks using the theme card */
.arc ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.arc ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arc ul.products::before, .arc ul.products::after { display: none; }
.arc-li { display: flex; }
.arc-li > .arc-card { width: 100%; }
@media (max-width: 991px) { .arc ul.products, .arc ul.products.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .arc ul.products, .arc ul.products.columns-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Archive ---------- */
.arc-section--shop { padding-top: clamp(32px, 4vw, 56px); }
.arc-shophead { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.arc-shophead__text { max-width: 760px; }
.arc-shophead__text .arc-lead { margin: 0; }
.arc-shophead__coa { display: inline-flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--grad-soft); transition: border-color .2s, transform .2s; }
.arc-shophead__coa:hover { border-color: var(--teal); transform: translateY(-1px); }
.arc-shophead__coa > .arc-i:first-child { width: 30px; height: 30px; color: var(--teal); }
.arc-shophead__coa span { display: grid; font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.arc-shophead__coa strong { font-family: var(--font-head); color: var(--ink); font-size: 15px; }
.arc-shophead__coa > .arc-i:last-child { width: 18px; height: 18px; color: var(--navy); }
.arc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.arc-chiprow { display: flex; gap: 8px; flex-wrap: wrap; }
.arc-count { margin: 0 !important; color: var(--muted); font-size: 15px; }
.arc-count p { margin: 0; }
.arc-toolbar__end { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.arc-minisearch { position: relative; display: flex; align-items: center; }
.arc-minisearch .arc-i { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.arc-minisearch input { height: 46px; width: 230px; padding: 0 16px 0 44px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: #fff; outline: 0; font-size: 15px; }
.arc-minisearch input:focus { border-color: var(--teal); box-shadow: var(--focus); }
.arc .woocommerce-ordering { margin: 0; }
.arc .woocommerce-result-count { margin: 0; }
@media (max-width: 640px) { .arc-toolbar__end, .arc-minisearch, .arc-minisearch input, .arc .woocommerce-ordering, .arc .orderby { width: 100%; } }

/* ---------- Single product ---------- */
.arc-section--pdp { padding-top: clamp(32px, 4vw, 64px); padding-bottom: clamp(32px, 4vw, 56px); }
.arc-pdp__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 72px); align-items: start; }
@media (max-width: 991px) { .arc-pdp__top { grid-template-columns: minmax(0, 1fr); } }

.arc-gallery { position: sticky; top: var(--arc-sticky-top); display: grid; gap: 14px; }
@media (max-width: 991px) { .arc-gallery { position: static; } }
.arc-gallery__main { position: relative; border-radius: var(--r-lg); border: 1px solid rgba(var(--teal-rgb), .55); overflow: hidden; }
.arc-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.arc-gallery__track::-webkit-scrollbar { display: none; }
.arc-gallery__slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
.arc-gallery__slide .arc-stage { border-radius: 0; }
.arc-stage.is-zoomed { cursor: zoom-out; }
.arc-stage.is-zoomed .arc-stage__img { transform: scale(1.9); transition: transform .2s; }
.arc-gallery__zoom { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--navy); pointer-events: none; box-shadow: var(--shadow-sm); }
.arc-gallery__zoom .arc-i { width: 18px; height: 18px; }
.arc-gallery__main .arc-card__flag { z-index: 2; }
.arc-gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; }
.arc-gallery__thumb { flex: 0 0 84px; height: 92px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--arc-product-bg) center / cover; overflow: hidden; }
.arc-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.arc-gallery__thumb.is-active { border: 2px solid var(--teal); }

.arc-buy { display: grid; gap: 16px; align-content: start; }
.arc-buy__cat { margin: 0 !important; font: 600 13px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; }
.arc-buy__cat a { color: var(--teal-text) !important; }
.arc-buy__title { font-family: var(--font-head) !important; font-size: clamp(30px, 3.4vw, 48px) !important; line-height: 1.12 !important; text-transform: uppercase; }
.arc-buy .arc-line { margin: -2px 0 0; }
.arc-buy__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.arc-buy__price { font-size: clamp(26px, 2.4vw, 34px); font-weight: 400; }
.arc-buy__price.is-swap { opacity: 0; transition: opacity .12s; }
.arc-stock { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; }
.arc-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(19, 121, 91, .15); }
.arc-stock.is-out { background: var(--bad-bg); color: var(--bad); }
.arc-buy__short { color: #2A3445; font-size: 16.5px; }
.arc-buy__short ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.arc-buy__short li { position: relative; padding-left: 26px; }
.arc-buy__short li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--grad); }
.arc-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.arc-buy__chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--mist); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.arc-buy__chips li strong { color: var(--ink); }
.arc-buy__chips li .arc-i { width: 17px; height: 17px; color: var(--teal); }
.arc-buy__chips li.is-ok { background: var(--teal-tint); border-color: transparent; }
.arc-buy__chips li.is-ok a { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-text) !important; font-weight: 600; }
.arc-buy__form { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--mist); border: 1px solid var(--line); }
.arc-buy__actions { display: flex; gap: 12px; }
.arc-buy__add { flex: 1; }
@media (max-width: 420px) { .arc-buy__actions { flex-direction: column; } .arc-buy__actions .arc-qty { align-self: flex-start; } }
.arc-opts { border: 0; padding: 0; margin: 0; }
.arc-opts legend { font: 600 14px/1 var(--font-head); margin-bottom: 10px; }
.arc-opts__list { display: flex; flex-wrap: wrap; gap: 8px; }
.arc-opt input { position: absolute; opacity: 0; }
.arc-opt span { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; transition: all .2s; }
.arc-opt input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.arc-opt input:focus-visible + span { box-shadow: var(--focus); }
.arc-opt.is-out span { opacity: .45; text-decoration: line-through; }
.arc-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.arc-trust li { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 14px 10px; border-radius: var(--r); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.arc-trust .arc-i { width: 26px; height: 26px; color: var(--teal); }
@media (max-width: 480px) { .arc-trust { grid-template-columns: 1fr; } .arc-trust li { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; } }
.arc-ruo { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: #FFF8EC; border: 1px solid #F3DDB3; font-size: 14px; color: #6B4A10; }
.arc-ruo .arc-i { color: #B7791F; margin-top: 2px; }
.arc-ruo p { margin: 0 !important; }
.arc-buy__meta { display: grid; gap: 6px; font-size: 14.5px; padding-top: 6px; border-top: 1px solid var(--line); }
.arc-buy__meta > div { display: flex; gap: 8px; }
.arc-buy__meta dt { color: var(--muted); min-width: 80px; }
.arc-buy__meta dd a { color: var(--teal-text) !important; }

/* Tabs */
.arc-section--tabs { padding-top: 0; padding-bottom: clamp(32px, 4vw, 64px); }
.arc-ptabs { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.arc-ptabs__list { display: flex; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid var(--line); background: var(--mist); overflow-x: auto; scrollbar-width: none; }
.arc-ptabs__list::-webkit-scrollbar { display: none; }
.arc-ptabs__btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 22px; border: 0; border-radius: 14px 14px 0 0; background: transparent; font: 600 15.5px/1 var(--font-head); color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.arc-ptabs__btn:hover { color: var(--navy); }
.arc-ptabs__btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 0 #fff; }
.arc-ptabs__btn.is-active::after { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
.arc-ptabs__count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--teal-tint); color: var(--teal-text); font-size: 12px; }
.arc-ptabs__panel { padding: clamp(22px, 3.2vw, 40px); animation: arcrise .35s var(--ease); }
.arc-spec { border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; max-width: 860px; }
.arc-spec th, .arc-spec td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--line); font-size: 15.5px; vertical-align: top; }
.arc-spec tr:first-child th, .arc-spec tr:first-child td { border-top: 0; }
.arc-spec th { width: 34%; background: var(--mist); font-weight: 600; color: var(--muted); }
.arc-pdpcoa { display: grid; gap: 16px; max-width: 860px; }
.arc-pdpcoa__item { padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--mist)); }
.arc-pdpcoa__lib { margin-top: 18px !important; }
.arc-prev { margin-top: 18px; max-width: 860px; border: 1px solid var(--line); border-radius: var(--r); }
.arc-prev summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.arc-prev summary::-webkit-details-marker { display: none; }
.arc-prev[open] summary .arc-i { transform: rotate(180deg); }
.arc-prev ul { list-style: none; margin: 0; padding: 0 18px 12px; }
.arc-prev li { display: grid; grid-template-columns: 1fr 1fr 80px auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.arc-disclaimer { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px 18px; border-radius: var(--r); background: var(--mist); color: var(--muted); font-size: 13.5px; }
.arc-disclaimer .arc-i { color: var(--teal); margin-top: 2px; }
.arc-disclaimer p { margin: 0 !important; }
.arc-ptabs .arc-panel h3 { margin-bottom: 12px !important; }

/* Related */
.arc-related { padding-top: clamp(24px, 3vw, 40px); background: linear-gradient(180deg, #fff, var(--mist)); }

/* Sticky add bar (mobile & after scrolling past the buy box) */
.arc-stickybuy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(10, 43, 84, .35); transform: translateY(110%); transition: transform .35s var(--ease); }
.arc-stickybuy.is-show { transform: none; }
.arc-stickybuy__in { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.arc-stickybuy .arc-stage { width: 52px; flex: none; }
.arc-stickybuy__txt { flex: 1; min-width: 0; display: grid; }
.arc-stickybuy__txt strong { font-family: var(--font-head); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-stickybuy .arc-btn { --bh: 46px; }

/* ---------- Empty cart (block + classic) ---------- */
.arc-emptycart { display: grid; gap: clamp(28px, 4vw, 48px); }
.arc-emptycart__box { display: grid; justify-items: center; gap: 12px; text-align: center; padding: clamp(32px, 5vw, 56px) 20px; border-radius: var(--r-lg); background: var(--grad-soft); border: 1px solid var(--line); }
.arc-emptycart__icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 0 0 10px rgba(var(--teal-rgb), .12); margin-bottom: 6px; }
.arc-emptycart__icon .arc-i { width: 34px; height: 34px; }
.arc-emptycart__box p { max-width: 54ch; }
.arc-emptycart .arc-sechead { margin-bottom: 0; }
.wp-block-woocommerce-empty-cart-block .arc-emptycart { text-align: left; }
