/* Kite-O shop pages (Laravel). Builds on the website's styles.css (colours, buttons, inputs, nav). */

.shop-body { background: var(--bg-alt); min-height: 100vh; display: flex; flex-direction: column; }
.shop-main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 72px; }

/* Header */
.shop-nav .nav-inner { gap: 14px; }
.shop-nav-link { font-size: 15px; font-weight: 500; color: var(--muted); padding: 6px 4px; }
.shop-nav-link:hover, .shop-nav-link.is-active { color: var(--text); }
.shop-icon-link { position: relative; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; color: var(--text); }
.shop-icon-link:hover { background: rgba(0, 0, 0, .05); }
.shop-icon-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shop-badge { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Headings and cards */
.shop-head { margin: 8px 0 28px; }
.shop-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; }
.shop-head p { margin: 0; color: var(--muted); }
.card { background: #fff; border-radius: var(--radius-sm); padding: clamp(20px, 4vw, 32px); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.card + .card { margin-top: 20px; }
.card h2 { font-size: 21px; margin: 0 0 16px; letter-spacing: -.01em; }
.narrow { max-width: 460px; margin: 0 auto; }
.muted-sm { font-size: 13px; color: var(--muted); }
.price { font-weight: 700; font-size: 20px; }
.price small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-alt); color: var(--muted); }
.pill.is-warn { background: #fff4e5; color: #9a5b00; }
.pill.is-ok { background: #e8f6ec; color: #1a7f37; }
.pill.is-bad { background: #fdecee; color: #b3001b; }
.pill.is-info { background: #e8f0fb; color: var(--blue); }

/* Flash messages */
.shop-flash { max-width: var(--max); margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.shop-flash.is-ok { background: #e8f6ec; color: #1a7f37; }
.shop-flash.is-error { background: #fdecee; color: #b3001b; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-sm); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.product-card .ph { aspect-ratio: 4 / 3; background: #fff; display: flex; align-items: center; justify-content: center; padding: 12px; border-bottom: 1px solid #f0f0f3; }
.product-card .ph img { width: 100%; height: 100%; object-fit: contain; }
.product-card .body { padding: 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.product-card h3 { margin: 0; font-size: 18px; }
.product-card form { margin-top: auto; }

/* Product page */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; }
.gallery { display: grid; gap: 12px; }
.gallery .main { background: #fff; border-radius: var(--radius-sm); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery .thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; }
.gallery .thumbs button[aria-current="true"] { border-color: var(--orange); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.product-info .desc { color: var(--muted); white-space: pre-line; }
.buy-row { display: flex; gap: 12px; align-items: end; margin-top: 12px; }
.buy-row label { width: 96px; }

select, textarea.shop { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--text); }
select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(7, 89, 168, .12); }
.field-error { color: #b3001b; font-size: 13px; font-weight: 400; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); }
.check input { width: auto; }
.agree-check { align-items: flex-start; margin: 4px 0 12px; line-height: 1.5; font-size: 13.5px; color: var(--text); cursor: pointer; }
.agree-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--orange); }
.agree-check a { color: var(--blue); text-decoration: underline; }

/* Tables (cart, order summary) */
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 8px 10px; }
.lines td { padding: 14px 8px; border-top: 1px solid #ececf0; vertical-align: middle; }
.lines .num { text-align: right; white-space: nowrap; }
.lines .qty input { width: 72px; padding: 8px 10px; }
.line-item { display: flex; gap: 12px; align-items: center; }
.line-item img { width: 56px; height: 56px; object-fit: contain; background: var(--bg-alt); border-radius: 10px; }
.totals { margin-left: auto; max-width: 320px; display: grid; gap: 6px; margin-top: 16px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals .gst-row { font-size: 14px; color: var(--muted); }
.totals .gst-split { justify-content: flex-end; margin-top: -4px; }
.qty-inline { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-inline label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.qty-inline select { width: auto; padding: 6px 10px; }
.totals .grand { font-size: 19px; font-weight: 700; padding-top: 8px; border-top: 1px solid #ececf0; }
.actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-size: 14px; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); font-size: 15px; }
.pay-option input { width: auto; margin-top: 4px; }
.pay-option:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 100, 18, .15); }
.pay-option span { display: grid; gap: 2px; }
.pay-option small { color: var(--muted); font-size: 13px; }

/* Orders */
.order-list { display: grid; gap: 12px; }
.order-row { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 16px 20px; color: var(--text); }
.order-row:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.order-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; font-size: 15px; }
.timeline .dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--orange); }
.timeline li:not(:last-child) .dot { background: var(--line); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }
.upi-box { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.upi-box img { width: 180px; height: 180px; background: #fff; border-radius: 12px; }
.upi-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; user-select: all; }

/* Policy pages */
.policy { max-width: 760px; margin: 0 auto; }
.policy p, .policy li { color: #333; }

/* Footer */
.shop-footer { border-top: 1px solid #e8e8ed; background: #fff; padding: 24px var(--gutter); font-size: 13px; color: var(--muted); text-align: center; }
.shop-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 8px; }
.shop-footer a:hover { color: var(--text); }
.shop-social { gap: 14px !important; }
.shop-social svg { width: 20px; height: 20px; fill: currentColor; }
.nav-logo .brand-name { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.policy ul { padding-left: 20px; } .policy li { margin: 6px 0; }

@media (max-width: 820px) {
  .product-page, .checkout, .order-grid { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row .hide-sm { display: none; }
  .upi-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .lines th.hide-sm, .lines td.hide-sm { display: none; }
}
@media (max-width: 520px) {
  .shop-nav .nav-logo img { width: 88px; }
  .shop-nav .nav-inner { gap: 6px; }
  .field-row { grid-template-columns: 1fr; }
  .line-item img { display: none; }
}

/* Suketho logo on account / survey pages */
.shop-nav .nav-logo img.suketho-logo { width: 120px; }
@media (max-width: 520px) { .shop-nav .nav-logo img.suketho-logo { width: 98px; } }

/* Policy pages: space above section headings; Contact page form */
.policy h2 { margin-top: 32px; }
.policy .contact-form { margin-top: 12px; }
.contact-form .cf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.policy .contact-details { margin-top: 28px; padding-top: 20px; border-top: 1px solid #ececf0; }
@media (max-width: 520px) { .contact-form .cf-row { grid-template-columns: minmax(0, 1fr); } }
.policy h1 + p, .policy h1 + h2 { margin-top: 14px; }
