/* JV Power storefront — plain CSS, no build step */
:root {
  --red: #D7192A;
  --red-dark: #A50F1E;
  --red-soft: #FDECEE;
  --ink: #1E1E24;
  --muted: #5B5F6A;
  --line: #E4E4E8;
  --soft: #F6F6F8;
  --white: #FFFFFF;
  --ok: #157A3E;
  --warn: #9A5B00;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(30, 30, 36, .08);
  --font: 'Sora', 'Segoe UI', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.header__logo { flex-shrink: 0; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; font: inherit; font-size: 15px; }
.search input:focus { border-color: var(--red); outline: none; }
.search button { height: 44px; padding: 0 18px; border: 0; border-radius: 0 10px 10px 0; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.search button:hover { background: #000; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.cart-link:hover { background: var(--soft); color: var(--ink); }
.cart-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--red); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.catnav { background: var(--ink); }
.catnav__row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav__row::-webkit-scrollbar { display: none; }
.catnav a { color: #E9E9EE; text-decoration: none; padding: 12px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.catnav a:hover { color: #fff; }
.catnav a.is-active { color: #fff; border-bottom-color: var(--red); }

/* Flash messages */
.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; font-weight: 600; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.flash--ok { background: #E8F6EE; color: var(--ok); }
.flash--err { background: var(--red-soft); color: var(--red-dark); }
.flash a { color: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 10px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .15s; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--lg { min-height: 52px; padding: 0 30px; font-size: 17px; }
.btn:disabled { background: #B9BBC2; color: #fff; cursor: not-allowed; }

/* Hero */
.hero { position: relative; background: linear-gradient(180deg, var(--red-soft), var(--white)); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; letter-spacing: -1px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero__mark img { width: min(340px, 100%); margin-left: auto; opacity: .95; }
.stitch { position: absolute; left: 0; right: 0; bottom: 18px; height: 0; border-top: 3px dashed var(--red); opacity: .55; }

/* Sections */
.section { padding: 44px 0; }
.section--soft { background: var(--soft); }
.section__title { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 20px; }
.empty { color: var(--muted); padding: 24px 0; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cat-tile { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat-tile:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.cat-tile__name { font-weight: 700; font-size: 17px; }
.cat-tile__count { color: var(--muted); font-size: 14px; }

/* Product grid & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.card__img { position: relative; aspect-ratio: 1 / 1; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card__noimg { color: var(--muted); font-size: 14px; }
.card__body { padding: 14px 16px 18px; }
.card__title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card__price { margin: 0; font-weight: 800; color: var(--red); font-size: 17px; }
.card__from { font-weight: 600; color: var(--muted); font-size: 13px; margin-right: 4px; }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.badge--out { background: #6B6F7A; }

/* Inner pages */
.page { padding-top: 24px; padding-bottom: 56px; }
.page__title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.5px; }
.page__lead { color: var(--muted); max-width: 720px; }
.page__meta { color: var(--muted); font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }

/* Pagination (Laravel default markup) */
.pager { margin-top: 32px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pagination .page-item > * { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination .page-item.active > * { background: var(--red); border-color: var(--red); color: #fff; }
.pagination .page-item.disabled > * { color: #A5A8B1; }
.pagination a:hover { border-color: var(--red); }

/* Product page */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
.gallery__main { aspect-ratio: 1 / 1; background: var(--soft); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.is-active, .thumb:hover { border-color: var(--red); }
.product__title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.5px; }
.product__price { font-size: 30px; font-weight: 800; color: var(--red); margin: 6px 0 18px; }
.variants { border: 0; padding: 0; margin: 0 0 14px; }
.variants legend { font-weight: 700; margin-bottom: 10px; }
.variants__list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 10px; font-weight: 600; background: var(--white); }
.pill:hover span { border-color: var(--ink); }
.pill input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.pill input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.pill--out span { color: #8A8D96; text-decoration: line-through; }
.stock { font-weight: 700; margin: 6px 0 16px; }
.stock--in { color: var(--ok); }
.stock--low { color: var(--warn); }
.stock--out { color: #6B6F7A; }
.buy__row { display: flex; gap: 12px; flex-wrap: wrap; }
.qty { width: 90px; height: 52px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; font: inherit; font-size: 17px; text-align: center; }
.qty:focus { border-color: var(--red); outline: none; }
.field-error { color: var(--red-dark); font-weight: 600; }
.product__desc { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); color: #33343B; }

/* Cart */
.table-wrap { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cart-table th, .cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.cart-table tfoot th { text-align: right; }
.cart-item { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.cart-item img { width: 56px; height: 56px; object-fit: contain; background: var(--soft); border-radius: 8px; padding: 4px; }

/* Footer */
.site-footer { background: var(--ink); color: #C9CAD1; padding: 36px 0; margin-top: 24px; }
.footer__row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: #E9E9EE; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__copy { margin: 0; font-size: 13px; width: 100%; }

/* Phones & small tablets */
@media (max-width: 820px) {
  .header__row { flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .cart-link { margin-left: auto; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 36px; }
  .hero__mark { display: none; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__body { padding: 10px 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Batch 2 ---- */
/* Footer always sits at the bottom, even on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.site-footer { margin-top: 48px; }

.cart-link.is-active { background: var(--soft); }
.flash--warn { background: #FFF4E0; color: var(--warn); margin: 0 0 12px; }

.btn--small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--ghost:disabled { background: transparent; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.qty-form { display: flex; gap: 8px; align-items: center; }
.qty--sm { width: 72px; height: 40px; font-size: 15px; }
.remove-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.remove-btn:hover { color: var(--red-dark); background: var(--red-soft); }
.cart-table small.stock--low { font-weight: 700; }

.summary { position: sticky; top: 140px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.summary__title { font-size: 20px; font-weight: 800; }
.summary__rows { margin: 0 0 20px; }
.summary__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary__rows dt { color: var(--muted); }
.summary__rows dd { margin: 0; font-weight: 700; text-align: right; }
.summary__note { font-size: 13px; color: var(--muted); margin: 10px 0 16px; text-align: center; }
.summary__link { display: block; text-align: center; font-weight: 600; }
.empty-cart { padding: 24px 0; }

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* ---- Checkout ---- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.checkout__main { display: flex; flex-direction: column; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0; background: var(--white); min-width: 0; }
.panel__title { font-size: 18px; font-weight: 800; padding: 0; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: var(--white); color: var(--ink); }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: none; }
.field .is-invalid { border-color: var(--red-dark); background: #FFF8F8; }
.field-hint { margin: 0; font-size: 13px; color: var(--muted); }
.field-error { margin: 0; font-size: 13px; }
.optional { font-weight: 400; color: var(--muted); }
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pay-option input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); }
.pay-option small { display: block; color: var(--muted); }
.pay-option--disabled { opacity: .55; cursor: not-allowed; }
.mini-items { list-style: none; margin: 0 0 12px; padding: 0; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mini-items small { color: var(--muted); }
.summary__total dt, .summary__total dd { font-size: 18px; font-weight: 800; color: var(--ink); }
.summary__total dd { color: var(--red); }
a.btn--block { width: 100%; }

/* ---- Thank-you page ---- */
.thanks__head { display: flex; gap: 18px; align-items: flex-start; color: var(--ok); margin-bottom: 24px; }
.thanks__head .page__title, .thanks__head .page__lead { color: var(--ink); }
.thanks__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.addr { font-style: normal; line-height: 1.6; }
.cod-note { padding: 12px 14px; background: var(--red-soft); border-radius: 10px; }

@media (max-width: 900px) {
  .checkout, .thanks__grid { grid-template-columns: 1fr; }
  .checkout__summary { position: static; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---- Shopee / Lazada / Facebook buttons ---- */
.mkt-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.mkt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 800; font-size: 16px; text-decoration: none; color: #fff; transition: transform .15s, box-shadow .15s, filter .15s; }
.mkt-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; filter: brightness(1.05); }
.mkt-btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.mkt-btn--shopee { background: #D7380F; }      /* darkened for readable white text */
.mkt-btn--lazada { background: #0F146D; }
.mkt-btn--facebook { background: #1559C9; }
.mkt-btn--logo { background: #fff; border: 1.5px solid var(--line); padding: 6px 14px; }
.mkt-btn--logo img { height: 32px; width: auto; }
.mkt-btn--sm.mkt-btn--logo img { height: 26px; }

.mkt-band { background: var(--white); border-bottom: 1px solid var(--line); }
.mkt-band__row { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.mkt-label { margin: 0 0 10px; font-weight: 700; color: var(--muted); font-size: 14px; }

.mkt-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px; }
.mkt-inline__label { font-weight: 700; color: var(--muted); font-size: 14px; margin-right: 4px; }

.mkt-footer { display: flex; flex-wrap: wrap; gap: 20px 36px; }
.mkt-footer__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #C9CAD1; text-transform: uppercase; letter-spacing: .5px; }
.site-footer .mkt-btn { color: #fff; text-decoration: none; }
.site-footer .mkt-btn--logo { background: #fff; }

/* ---- Marketplace logos in the header (after the cart) ---- */
.mkt-header { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.mkt-hdr { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 13px; color: #fff; transition: background .15s, transform .15s; }
.mkt-hdr img { height: 28px; width: auto; max-width: 96px; object-fit: contain; }
.mkt-hdr:hover { background: var(--soft); transform: translateY(-1px); }
.mkt-hdr--shopee { background: #D7380F; padding: 0 10px; }
.mkt-hdr--lazada { background: #0F146D; padding: 0 10px; }
.mkt-hdr--facebook { background: #1559C9; padding: 0 10px; }
.mkt-hdr--shopee:hover, .mkt-hdr--lazada:hover, .mkt-hdr--facebook:hover { color: #fff; filter: brightness(1.08); }

@media (max-width: 820px) {
  .mkt-header { border-left: 0; padding-left: 0; }
  .mkt-hdr img { height: 24px; }
}

/* ---- GCash / Maya payment details ---- */
.pay-details { margin-top: 14px; padding: 16px 18px; border: 2px dashed var(--red); border-radius: 12px; background: var(--red-soft); }
.pay-steps { margin: 0 0 12px; padding-left: 20px; }
.pay-steps li { margin: 4px 0; }
.pay-account { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 14px; background: var(--white); border-radius: 10px; margin-bottom: 12px; }
.pay-qr { width: 160px; height: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.pay-account dl { margin: 0; flex: 1; min-width: 200px; }
.pay-account dl div { padding: 6px 0; }
.pay-account dt { font-size: 13px; color: var(--muted); }
.pay-account dd { margin: 0; font-weight: 800; font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pay-number { letter-spacing: .5px; }
.copy-btn { min-height: 36px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.copy-btn:hover { background: var(--ink); color: #fff; }
.pay-ref { margin-top: 14px; }
.pay-ref input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; letter-spacing: .5px; }
.pay-ref input:focus { border-color: var(--red); outline: none; }
.paid-note { padding: 12px 14px; background: #E8F6EE; color: var(--ok); border-radius: 10px; font-weight: 700; }

/* ---- COD downpayment ---- */
.dp-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dp-split div { background: var(--white); border-radius: 10px; padding: 12px 14px; }
.dp-split span { display: block; font-size: 13px; color: var(--muted); }
.dp-split strong { font-size: 20px; color: var(--red); }
.dp-accounts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dp-account { cursor: pointer; border: 2px solid transparent; margin-bottom: 0; }
.dp-account input { width: 20px; height: 20px; accent-color: var(--red); flex-shrink: 0; }
.dp-account:has(input:checked) { border-color: var(--red); }
.dp-row dt, .dp-row dd { font-size: 14px; }
.dp-row dd { color: var(--red); }
@media (max-width: 560px) { .dp-split { grid-template-columns: 1fr; } }

/* ---- Sub-category chips ---- */
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; background: var(--white); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }
