/* GIWU shop: product pages, basket, order received, pay an invoice.
   Header, footer and typeface come from css/layout.css. */

*, *::before, *::after { box-sizing: border-box; }
body.shop-page { margin: 0; background: #fff; color: var(--gx-ink, #14181f); font-size: 16px; line-height: 1.65; }
.shop-page img { max-width: 100%; height: auto; display: block; }
.shop-page h1, .shop-page h2, .shop-page h3 { margin: 0; line-height: 1.2; font-weight: 800; color: var(--gx-ink); }
.shop-page p { margin: 0 0 1em; }
.shop-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.shop-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* breadcrumb */
.shop-crumbs { padding-top: 18px; font-size: 13.5px; color: var(--gx-grey); }
.shop-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.shop-crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: #a4acb1; }
.shop-crumbs a { color: var(--gx-grey); text-decoration: none; }
.shop-crumbs a:hover { color: var(--gx-green); text-decoration: underline; }

/* buttons */
.shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 13px 22px; border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.shop-btn:active { transform: translateY(1px); }
.shop-btn--gold { background: var(--gx-gold); color: var(--gx-ink); }
.shop-btn--gold:hover { background: var(--gx-gold-dark); color: #fff; }
.shop-btn--green { background: var(--gx-green-dark); color: #fff; }
.shop-btn--green:hover { background: var(--gx-green); }
.shop-btn--line { background: #fff; color: var(--gx-ink); box-shadow: inset 0 0 0 1.5px var(--gx-line); }
.shop-btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--gx-green); color: var(--gx-green); }
.shop-btn--block { width: 100%; }
.shop-btn[disabled] { opacity: .55; cursor: not-allowed; }
.shop-btn svg { width: 19px; height: 19px; flex: 0 0 auto; }

/* product page */
.pd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding: 26px 0 64px; align-items: start; }
.pd-gallery-main { position: relative; border-radius: 18px; overflow: hidden; background: #eef0ea; aspect-ratio: 4 / 3; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.pd-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.pd-thumb { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #eef0ea; aspect-ratio: 4 / 3; outline-offset: 2px; box-shadow: inset 0 0 0 2px transparent; opacity: .78; transition: opacity .2s, box-shadow .2s; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { opacity: 1; }
.pd-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--gx-green); }
.pd-note { margin-top: 10px; font-size: 13px; color: var(--gx-grey); }

.pd-info { position: sticky; top: calc(var(--gx-header-h, 76px) + 20px); }
.pd-tag { display: inline-block; margin-bottom: 12px; padding: 5px 11px; border-radius: 999px; background: #eaf3e4; color: var(--gx-green-dark); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pd-info h1 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 14px; }
.pd-summary { font-size: 17px; color: #3a434a; }
.pd-price { margin: 20px 0; padding: 18px 20px; border-radius: 16px; background: var(--gx-soft); }
.pd-price .from { display: block; font-size: 13px; font-weight: 700; color: var(--gx-grey); text-transform: uppercase; letter-spacing: .08em; }
.pd-price .amount { display: block; font-size: 32px; font-weight: 900; color: var(--gx-green-dark); line-height: 1.15; }
.pd-price .terms { display: block; font-size: 13.5px; color: var(--gx-grey); margin-top: 4px; }
.pd-price .amount--quote { font-size: 24px; }
.pd-buy { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--gx-line); background: #fff; }
.qty button { width: 44px; height: 50px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--gx-ink); border-radius: 12px; }
.qty button:hover { color: var(--gx-green); background: var(--gx-soft); }
.qty input { width: 46px; height: 50px; border: 0; text-align: center; font: inherit; font-weight: 800; font-size: 16px; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-actions-2 { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-actions-2 .shop-btn { flex: 1 1 160px; }
.pd-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.pd-list li { position: relative; padding-left: 30px; }
.pd-list li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: #eaf3e4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7b11' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pd-assure { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; font-size: 13.5px; color: #3a434a; }
.pd-assure div { padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--gx-line); }
.pd-assure strong { display: block; color: var(--gx-ink); font-size: 14px; }

.shop-section { padding: 60px 0; border-top: 1px solid var(--gx-line); }
.shop-section--soft { background: var(--gx-soft); border-top: 0; }
.shop-eyebrow { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gx-green); }
.shop-section h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 22px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec { padding: 20px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--gx-line); }
.spec h3 { font-size: 16px; margin-bottom: 6px; }
.spec p { margin: 0; font-size: 15px; color: #3a434a; }
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: s; padding: 20px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--gx-line); font-size: 15px; }
.steps li::before { content: counter(s); display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin-bottom: 10px; border-radius: 50%; background: var(--gx-green-dark); color: #fff; font-weight: 900; }
.faq details { border-bottom: 1px solid var(--gx-line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 800; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 26px; font-weight: 400; color: var(--gx-green); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: #3a434a; max-width: 820px; }

/* product cards (related, shop listings) */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--gx-line); text-decoration: none; color: inherit; transition: box-shadow .25s, transform .25s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--gx-line), 0 18px 36px rgba(20,24,31,.1); }
.pcard-img { aspect-ratio: 4 / 3; background: #eef0ea; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--gx-ease, ease); }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-tag { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gx-green); }
.pcard-name { font-size: 17px; font-weight: 800; }
.pcard-price { margin-top: auto; padding-top: 8px; font-weight: 800; color: var(--gx-green-dark); }
.pcard-price small { font-weight: 600; color: var(--gx-grey); }

/* toast after adding to the basket */
.shop-toast { position: fixed; left: 50%; bottom: 24px; z-index: 3000; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(460px, calc(100% - 32px)); padding: 12px 12px 12px 18px; border-radius: 14px; background: var(--gx-ink); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.25); transform: translate(-50%, 140%); transition: transform .3s var(--gx-ease, ease); font-weight: 700; font-size: 15px; }
.shop-toast.show { transform: translate(-50%, 0); }
.shop-toast a { flex: 0 0 auto; padding: 9px 14px; border-radius: 10px; background: var(--gx-gold); color: var(--gx-ink); text-decoration: none; font-weight: 800; }

/* mobile buy bar on product pages */
.pd-bar { display: none; }

/* basket */
.basket-head { padding: 30px 0 8px; }
.basket-head h1 { font-size: clamp(28px, 3vw, 38px); }
.basket-head p { color: var(--gx-grey); margin: 8px 0 0; }
.basket { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; padding: 24px 0 70px; align-items: start; }
.bl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gx-line); }
.bl-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--gx-line); }
.bl-img { width: 92px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #eef0ea; display: flex; align-items: center; justify-content: center; color: var(--gx-green); }
.bl-img img { width: 100%; height: 100%; object-fit: cover; }
.bl-img svg { width: 34px; height: 34px; }
.bl-name { font-weight: 800; text-decoration: none; color: inherit; }
a.bl-name:hover { color: var(--gx-green); text-decoration: underline; }
.bl-meta { font-size: 14px; color: var(--gx-grey); }
.bl-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bl-remove { border: 0; background: none; color: var(--gx-grey); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 6px; }
.bl-remove:hover { color: #b3261e; }
.bl-line { text-align: right; font-weight: 800; white-space: nowrap; }
.bl-line small { display: block; font-weight: 600; color: var(--gx-grey); font-size: 12.5px; }
.basket-empty { padding: 40px 28px; border-radius: 18px; background: var(--gx-soft); text-align: center; }
.basket-empty h2 { font-size: 22px; margin-bottom: 8px; }
.basket-empty .shop-btn { margin: 8px 6px 0; }
.bsum { position: sticky; top: calc(var(--gx-header-h, 76px) + 20px); padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--gx-line), 0 18px 40px rgba(20,24,31,.06); }
.bsum h2 { font-size: 20px; margin-bottom: 14px; }
.bsum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.bsum-row.total { border-top: 1px solid var(--gx-line); margin-top: 6px; padding-top: 12px; font-weight: 900; font-size: 18px; }
.bsum-note { font-size: 13px; color: var(--gx-grey); margin: 8px 0 18px; }
.oform { display: grid; gap: 14px; }
.oform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oform label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.oform label span.opt { font-weight: 500; color: var(--gx-grey); }
.oform input, .oform textarea, .oform select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--gx-line); border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--gx-ink); transition: border-color .2s, box-shadow .2s; }
.oform textarea { min-height: 96px; resize: vertical; }
.oform input:focus, .oform textarea:focus, .oform select:focus { outline: 0; border-color: var(--gx-green); box-shadow: 0 0 0 3px rgba(46,123,17,.15); }
.oform .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.oform .fine { font-size: 12.5px; color: var(--gx-grey); margin: 0; }
.form-error { display: none; padding: 12px 14px; border-radius: 12px; background: #fdecea; color: #8a1c13; font-size: 14px; font-weight: 700; }
.form-error.show { display: block; }

/* order received / pay pages */
.done { max-width: 760px; margin: 0 auto; padding: 56px 0 80px; }
.done-badge { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: #eaf3e4; color: var(--gx-green); margin-bottom: 18px; }
.done-badge svg { width: 32px; height: 32px; }
.done h1 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 12px; }
.done .ref { display: inline-block; margin: 6px 0 18px; padding: 8px 14px; border-radius: 10px; background: var(--gx-soft); font-weight: 900; letter-spacing: .04em; }
.done-list { margin: 0 0 24px; padding: 18px 20px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--gx-line); }
.done-list ul { margin: 0; padding-left: 18px; }
.done .steps { grid-template-columns: repeat(3, 1fr); margin: 26px 0; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; padding: 30px 0 80px; align-items: start; }
.pay-card { padding: 26px; border-radius: 18px; box-shadow: 0 0 0 1px var(--gx-line), 0 18px 40px rgba(20,24,31,.06); }
.pay-notice { padding: 14px 16px; border-radius: 12px; background: #fff7e6; color: #6b4b00; font-size: 14.5px; margin-bottom: 16px; }
.pay-notice[hidden] { display: none; }
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; padding: 0; list-style: none; }
.pay-methods li { padding: 6px 12px; border-radius: 999px; background: var(--gx-soft); font-size: 13px; font-weight: 700; }
.pay-result { padding: 22px; border-radius: 16px; background: var(--gx-soft); }
.pay-result[data-state="ok"] { background: #eaf3e4; }
.pay-result[data-state="fail"] { background: #fdecea; }

@media (max-width: 1000px) {
  .pd { grid-template-columns: 1fr; gap: 26px; }
  .pd-info { position: static; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .basket { grid-template-columns: 1fr; }
  .bsum { position: static; }
  .pay { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .shop-wrap { padding: 0 18px; }
  .pd { padding-top: 14px; }
  .pd-thumbs { gap: 8px; }
  .spec-grid, .steps, .done .steps { grid-template-columns: 1fr; }
  .pd-assure { grid-template-columns: 1fr; }
  .bl-item { grid-template-columns: 72px minmax(0, 1fr); }
  .bl-img { width: 72px; }
  .bl-line { grid-column: 2; text-align: left; }
  .oform .two { grid-template-columns: 1fr; }
  .shop-section { padding: 44px 0; }
  body.has-pd-bar { padding-bottom: 84px; }
  body.has-pd-bar .shop-toast { bottom: 92px; }
  body.has-pd-bar .giwu-chat-launch { bottom: 96px !important; }
  .pd-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(20,24,31,.1); }
  .pd-bar .pd-bar-price { flex: 1; font-size: 13px; color: var(--gx-grey); line-height: 1.3; }
  .pd-bar .pd-bar-price strong { display: block; font-size: 17px; color: var(--gx-green-dark); }
  .pd-bar .shop-btn { min-height: 48px; padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard-img img, .shop-toast, .pd-gallery-main img { transition: none; }
}

/* Prefab Shop page cards (prefab-shop.html) */
.shop-card-img { display: block; overflow: hidden; }
.shop-card-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--gx-ease, ease); }
.shop-card:hover .shop-card-img img { transform: scale(1.03); }
.shop-card h3 a { color: inherit; text-decoration: none; }
.shop-card h3 a:hover { color: var(--gx-green); text-decoration: underline; }
.shop-card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.shop-card-actions .sp-btn { flex: 1 1 140px; justify-content: center; cursor: pointer; font: inherit; font-weight: 700; }
.shop-card-order { display: inline-block; margin-top: 12px; font-size: 13.5px; color: var(--gx-grey); }
.shop-card-order:hover { color: var(--gx-green); }
.store-add[aria-pressed="true"] { background: #eaf3e4 !important; color: var(--gx-green-dark) !important; }
.shop-page main a:not(.shop-btn):not(.pcard):not(.bl-name) { color: var(--gx-green); }
.shop-page main a:not(.shop-btn):not(.pcard):not(.bl-name):hover { color: var(--gx-green-dark); }
@media (max-width: 640px) {
  /* leave room on the right for the chat button */
  .shop-toast { left: 14px; right: 86px; width: auto; transform: translateY(170%); font-size: 14px; padding: 10px 10px 10px 14px; }
  .shop-toast.show { transform: none; }
  .shop-toast a { padding: 8px 10px; font-size: 13px; }
}
