/* =====================================================================
   Happy Sleep — pages.css  (shop · cart · checkout · account · info)
   ===================================================================== */
.pg { padding-bottom: 30px; min-height: 60vh; }

/* ---------- shop ---------- */
.shop-grid { display: grid; grid-template-columns: 270px 1fr; gap: clamp(20px, 3vw, 44px); align-items: start; }
.filters { position: sticky; top: 150px; background: #fff; border-radius: var(--r); padding: 20px 20px 8px; box-shadow: var(--shadow-s); display: grid; gap: 0; }
.f-block { padding: 14px 0 18px; border-bottom: 1px solid var(--line); }
.f-block:last-child { border-bottom: 0; }
.f-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); margin-bottom: 12px; font-weight: 600; }
.f-list { display: grid; gap: 4px; }
.f-link { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; font-weight: 300; transition: background .15s; }
.f-link:hover { background: var(--mint); }
.f-link.is-on { background: var(--teal); color: #fff; font-weight: 500; }
.f-link em { font-style: normal; opacity: .65; font-size: 13px; }
.f-price { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.f-price .input { height: 42px; padding: 0 12px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.f-reset { color: var(--teal-d); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0 12px; justify-self: start; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.shop-count { color: var(--gray); font-weight: 300; }
.shop-tools { display: flex; gap: 10px; align-items: center; }
.shop-tools .select { height: 44px; width: auto; border-radius: 999px; padding: 0 16px; }
.f-toggle { display: none; }
.shop-active { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tagx { display: inline-flex; gap: 6px; align-items: center; background: var(--teal-l); color: var(--teal-dd); padding: 5px 8px 5px 13px; border-radius: 999px; font-size: 14px; }
.tagx button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.tagx button:hover { background: rgba(0, 0, 0, .1); }
.empty { text-align: center; padding: 70px 20px; background: #fff; border-radius: var(--r); color: var(--gray); display: grid; gap: 14px; justify-items: center; }
.empty h2 { color: var(--teal-dd); font-weight: 400; font-size: 26px; }
.shop-grid .grid-products { grid-template-columns: repeat(3, 1fr); }

/* ---------- cart ---------- */
.cart-grid { display: grid; grid-template-columns: 1fr 390px; gap: clamp(20px, 3vw, 40px); align-items: start; }
.cl { display: grid; grid-template-columns: 150px 1fr auto; gap: 22px; background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-s); margin-bottom: 16px; }
.cl-img img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; background: #f4f4f4; }
.cl h3 { font-size: 22px; font-weight: 500; color: var(--teal-dd); }
.cl-opts { margin: 8px 0 12px; display: grid; gap: 3px; font-size: 14px; }
.cl-opts li { display: flex; gap: 10px; color: var(--ink); }
.cl-opts li span:first-child { color: var(--gray); min-width: 110px; }
.cl-opts li .pl { color: var(--teal-d); margin-left: auto; font-weight: 500; white-space: nowrap; }
.cl-more { font-size: 13px; color: var(--teal-d); text-decoration: underline; text-underline-offset: 3px; }
.cl-pay { display: inline-flex; gap: 6px; background: #f4f8f8; border-radius: 999px; padding: 4px; margin-top: 8px; }
.cl-pay label { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer; font-weight: 500; }
.cl-pay input { position: absolute; opacity: 0; }
.cl-pay label:has(input:checked) { background: var(--teal); color: #fff; }
.cl-pay label:has(input:focus-visible) { outline: 3px solid rgba(0, 153, 151, .45); }
.cl-side { display: grid; justify-items: end; align-content: space-between; gap: 12px; text-align: right; }
.cl-total { font-size: 24px; font-weight: 700; color: var(--teal-dd); }
.cl-unit { font-size: 13px; color: var(--gray); }
.cl-eta { font-size: 13px; color: var(--gray); display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.cl-actions { display: flex; gap: 14px; }
.sumbox { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-s); position: sticky; top: 150px; display: grid; gap: 14px; }
.sumbox h2 { font-size: 22px; font-weight: 500; color: var(--teal-dd); }
.sumbox hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.coupon { display: flex; gap: 8px; }
.coupon .input { height: 44px; text-transform: uppercase; }
.coupon-ok { background: #effaf2; color: #20784a; padding: 8px 12px; border-radius: 9px; font-size: 14px; display: flex; justify-content: space-between; }
.sum-note { font-size: 13px; color: var(--gray); line-height: 1.45; }
.sum-note.due { background: #eef7f7; padding: 10px 12px; border-radius: 9px; color: #2f5557; }
.trust-s { display: grid; gap: 8px; font-size: 13.5px; color: var(--gray); }
.trust-s div { display: flex; gap: 8px; align-items: center; } .trust-s svg { color: var(--teal); }

/* ---------- checkout ---------- */
.co-grid { display: grid; grid-template-columns: 1fr 420px; gap: clamp(20px, 3vw, 44px); align-items: start; }
.co-card { background: #fff; border-radius: var(--r); padding: clamp(18px, 2.4vw, 30px); box-shadow: var(--shadow-s); margin-bottom: 18px; }
.co-card h2 { font-size: 20px; font-weight: 500; color: var(--teal-dd); display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.co-card h2 .n { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 500; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.f-row.one { grid-template-columns: 1fr; } .f-row.three { grid-template-columns: 1fr 1fr 1fr; } .f-row.pc { grid-template-columns: 140px 1fr; }
.paym { display: grid; gap: 10px; }
.pm { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1.5px solid #dbe2e3; border-radius: 12px; cursor: pointer; transition: .18s; background: #fff; }
.pm:hover { border-color: #9cc9c8; }
.pm input { width: 20px; height: 20px; accent-color: var(--teal); }
.pm:has(input:checked) { border-color: var(--teal); background: #f2fbfa; }
.pm b { font-weight: 500; } .pm small { display: block; color: var(--gray); font-weight: 300; }
.pm .chip-p { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; color: #5c676b; }
.pm-extra { grid-column: 1 / -1; padding-top: 10px; display: none; }
.pm:has(input:checked) .pm-extra { display: block; }
.co-mini { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.co-mini img { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; }
.co-mini b { font-weight: 500; display: block; line-height: 1.2; } .co-mini small { color: var(--gray); font-size: 12.5px; line-height: 1.3; display: block; margin-top: 2px; }
.co-done { text-align: center; background: #fff; border-radius: 20px; padding: clamp(30px, 5vw, 60px); box-shadow: var(--shadow-s); max-width: 720px; margin: 20px auto; display: grid; gap: 14px; justify-items: center; }
.co-done .ok { width: 76px; height: 76px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; }
.co-done .ok svg { width: 38px; height: 38px; stroke-width: 2.4; }
.co-done h1 { font-weight: 300; font-size: clamp(28px, 3.4vw, 40px); color: var(--teal-dd); }
.co-ref { background: var(--yellow-l); padding: 8px 18px; border-radius: 999px; font-weight: 600; letter-spacing: .04em; }
.co-steps { text-align: left; display: grid; gap: 12px; margin: 10px 0; width: 100%; max-width: 480px; }
.co-steps div { display: flex; gap: 12px; align-items: flex-start; } .co-steps b { color: var(--teal-dd); }
.co-steps span.n { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-l); color: var(--teal-dd); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; font-weight: 600; }

/* ---------- account ---------- */
.acc-grid { display: grid; grid-template-columns: 280px 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.acc-nav { background: #fff; border-radius: var(--r); padding: 12px; box-shadow: var(--shadow-s); display: grid; gap: 4px; position: sticky; top: 150px; }
.acc-nav button, .acc-nav a { text-align: left; padding: 12px 14px; border-radius: 10px; font-weight: 300; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.acc-nav button:hover, .acc-nav a:hover { background: var(--mint); }
.acc-nav .is-on { background: var(--teal); color: #fff; font-weight: 500; }
.auth { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 20px; box-shadow: var(--shadow-s); overflow: hidden; }
.auth > div { padding: clamp(22px, 3vw, 40px); display: grid; gap: 14px; align-content: start; }
.auth > div:first-child { background: linear-gradient(160deg, var(--teal), var(--teal-dd)); color: #fff; align-content: center; }
.auth h2 { font-size: 26px; font-weight: 400; } .auth p { font-weight: 300; }
.auth ul { display: grid; gap: 10px; } .auth li { display: flex; gap: 10px; align-items: center; }
.tabs-s { display: flex; background: #f0f4f4; border-radius: 999px; padding: 4px; }
.tabs-s button { flex: 1; padding: 10px; border-radius: 999px; font-weight: 500; }
.tabs-s button.is-on { background: #fff; box-shadow: var(--shadow-s); color: var(--teal-dd); }
.panel { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-s); padding: clamp(18px, 2.6vw, 32px); }
.panel h2 { font-size: 22px; font-weight: 500; color: var(--teal-dd); margin-bottom: 16px; }
.ord { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; display: grid; gap: 10px; }
.ord-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.ord-h b { font-size: 17px; } .st { background: var(--yellow-l); color: #8a6200; font-weight: 600; font-size: 12.5px; padding: 3px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.ord-l { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; font-size: 14.5px; }
.ord-l img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.note-demo { background: var(--yellow-l); color: #6b5100; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }

/* ---------- info pages ---------- */
.info-grid { display: grid; grid-template-columns: 260px 1fr; gap: clamp(20px, 3vw, 50px); align-items: start; }
.info-nav { background: #fff; border-radius: var(--r); padding: 12px; box-shadow: var(--shadow-s); display: grid; gap: 2px; position: sticky; top: 150px; }
.info-nav a { padding: 10px 14px; border-radius: 9px; font-weight: 300; }
.info-nav a:hover { background: var(--mint); } .info-nav a.is-on { background: var(--teal); color: #fff; font-weight: 500; }
.info-body { background: #fff; border-radius: var(--r); padding: clamp(22px, 3.4vw, 48px); box-shadow: var(--shadow-s); }
.info-body .prose { max-width: 74ch; }
.info-body h2 { font-size: 26px; font-weight: 400; color: var(--teal-dd); margin: 28px 0 10px; } .info-body h2:first-child { margin-top: 0; }
.faq { display: grid; gap: 8px; margin-top: 8px; }
.faq details { border: 1px solid #e3e8e9; border-radius: 10px; padding: 0 16px; }
.faq summary { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 0; cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq p { padding: 0 0 16px; color: var(--gray); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 12px; }
.post { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.post img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post div { padding: 16px; } .post small { color: var(--teal-d); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; } .post b { display: block; font-weight: 500; margin-top: 4px; font-size: 18px; line-height: 1.25; } .post p { color: var(--gray); font-size: 14.5px; margin-top: 6px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 12px 0 26px; }
.contact-cards a { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 4px; transition: .2s; }
.contact-cards a:hover { border-color: var(--teal); box-shadow: var(--shadow-s); }
.contact-cards svg { color: var(--teal); width: 28px; height: 28px; margin-bottom: 4px; } .contact-cards b { font-weight: 600; } .contact-cards span { color: var(--gray); font-size: 14.5px; }

@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: grid; margin-bottom: 20px; }
  .f-toggle { display: inline-flex; }
  .shop-grid .grid-products { grid-template-columns: repeat(3, 1fr); }
  .cart-grid, .co-grid { grid-template-columns: 1fr; }
  .sumbox { position: static; }
  .acc-grid, .info-grid { grid-template-columns: 1fr; }
  .acc-nav, .info-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .acc-nav button, .acc-nav a, .info-nav a { white-space: nowrap; }
}
@media (max-width: 700px) {
  .shop-grid .grid-products { grid-template-columns: repeat(2, 1fr); }
  .cl { grid-template-columns: 90px 1fr; gap: 14px; padding: 14px; }
  .cl-img img { width: 90px; height: 90px; }
  .cl-side { grid-column: 1 / -1; grid-auto-flow: column; justify-items: stretch; align-items: center; text-align: left; }
  .cl-opts li span:first-child { min-width: 86px; }
  .f-row, .f-row.three { grid-template-columns: 1fr; } .f-row.pc { grid-template-columns: 110px 1fr; }
  .auth { grid-template-columns: 1fr; } .auth > div:first-child { display: none; }
  .contact-cards { grid-template-columns: 1fr; }
}
