/* Storefront V2 — unified commerce system */
:root {
  --v2-ink: #172236;
  --v2-muted: #718096;
  --v2-line: #e7edf3;
  --v2-soft: #f5f8fb;
  --v2-blue: #1268a8;
  --v2-blue-dark: #0d4e81;
  --v2-cyan: #1aa7c8;
  --v2-green: #15956a;
  --v2-red: #d95763;
  --v2-radius: 14px;
  --v2-shadow: 0 8px 26px rgba(25, 48, 76, .07);
}

/* Header and navigation: quiet, readable, and consistent with the catalog. */
.header-top { background: var(--v2-ink); color: #cbd6e2; }
.header-top a, .header-top p, .header-top select { color: #cbd6e2; }
.header-part { background: #fff; border-bottom: 1px solid var(--v2-line); }
.header-content { min-height: 78px; }
.header-logo img { max-height: 43px; width: auto; }
.header-form { border: 1px solid #dfe7ef; border-radius: 9px; background: #f8fafc; overflow: hidden; }
.header-form input { background: transparent; }
.header-form button { color: var(--v2-blue); }
.header-widget { color: var(--v2-ink); }
.header-widget:hover { color: var(--v2-blue); }
.header-widget img { border: 2px solid #dbe8f2; }
.navbar-part { background: #fff; border-bottom: 1px solid var(--v2-line); }
.navbar-link { color: #34465b; font-weight: 700; }
.navbar-link:hover { color: var(--v2-blue); }

/* Page foundation */
.storefront-home, .storefront-product-page-v2 { background: #f7f9fb; color: var(--v2-ink); }
.storefront-home { padding: 18px 0 54px; }
.storefront-home .container, .storefront-product-page-v2 .container { max-width: 1240px; }

/* Hero */
.storefront-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; overflow: hidden; margin: 0 0 28px; padding: 42px 48px; border-radius: 18px; background: linear-gradient(112deg, #112f58 0%, #145f93 65%, #1b8eae 100%); box-shadow: 0 18px 36px rgba(16, 61, 101, .18); }
.storefront-hero::before { content: ""; position: absolute; right: 8%; bottom: -120px; width: 310px; height: 310px; border: 42px solid rgba(255,255,255,.08); border-radius: 50%; }
.storefront-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.storefront-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--v2-blue); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.storefront-hero .storefront-eyebrow { color: #b9e8f2; }
.storefront-hero h1 { margin: 0 0 13px; color: #fff; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.06; }
.storefront-hero p { max-width: 680px; margin: 0; color: #dcecf5; font-size: 15px; line-height: 1.7; }
.storefront-trust-row { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 22px; color: #e8f5fa; font-size: 13px; font-weight: 600; }
.storefront-trust-row i { margin-right: 5px; color: #73dfb2; }
.storefront-hero-badge { position: relative; z-index: 1; display: flex; flex: 0 0 154px; flex-direction: column; align-items: center; justify-content: center; min-height: 154px; padding: 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 16px; background: rgba(255,255,255,.1); text-align: center; }
.storefront-hero-badge strong { color: #fff; font-size: 2.25rem; line-height: 1; }
.storefront-hero-badge span { margin-top: 9px; color: #c8e5ef; font-size: 12px; line-height: 1.4; }

.storefront-notice { margin: 0 0 25px; padding: 15px 19px; border: 1px solid #dceaf3; border-radius: var(--v2-radius); background: #fff; color: #4b6074; box-shadow: var(--v2-shadow); }
.storefront-home .all-product-main { margin-bottom: 28px; }
.storefront-home .box-product-main { min-height: 82px; border: 1px solid rgba(255,255,255,.35); border-radius: 13px; box-shadow: 0 8px 22px rgba(25,48,76,.08) !important; }
.storefront-home .box-product-main .box-text-style > div:first-child { font-size: 14px !important; }
.storefront-home .box-product-main .box-text-style > div:last-child { font-size: 11px !important; }
.storefront-home .box-product-main .box-img-product { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 11px; background: rgba(255,255,255,.16); }
.storefront-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 6px 0 17px; }
.storefront-section-heading .storefront-eyebrow { margin-bottom: 4px; }
.storefront-section-heading h2 { margin: 0; color: var(--v2-ink); font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.035em; }
.storefront-results { color: var(--v2-muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Category navigation */
.storefront-category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 25px; }
.storefront-category-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 13px; border: 1px solid #dfe7ee; border-radius: 9px; background: #fff; color: #506276; font-size: 13px; font-weight: 700; transition: .2s ease; }
.storefront-category-chip img { width: 24px; height: 24px; object-fit: cover; border-radius: 6px; }
.storefront-category-chip:hover, .storefront-category-chip.active { border-color: var(--v2-blue); background: #edf6fc; color: var(--v2-blue); }
.storefront-search-result { margin: 0 0 17px; padding: 12px 15px; border-left: 3px solid var(--v2-cyan); background: #fff; color: #5c7084; font-size: 13px; }

/* Product grid and cards */
.storefront-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.storefront-product-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: #fff; box-shadow: var(--v2-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.storefront-product-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(25, 48, 76, .12); }
.storefront-product-media { position: relative; display: block; aspect-ratio: 1.18; overflow: hidden; background: #eef3f7; }
.storefront-product-media picture, .storefront-product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.storefront-product-media img { transition: transform .35s ease; }
.storefront-product-card:hover .storefront-product-media img { transform: scale(1.035); }
.storefront-product-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: #a8b7c4; font-size: 38px; }
.storefront-product-media > .storefront-category-fallback { box-sizing: border-box; padding: 18%; object-fit: contain; background: #eef3f7; }
.storefront-gallery-category-fallback { display: flex; align-items: center; justify-content: center; background: #eef3f7; }
.storefront-gallery-category-fallback > img { display: block; width: 62%; height: 62%; object-fit: contain; }
.storefront-discount { position: absolute; top: 11px; left: 11px; padding: 5px 8px; border-radius: 5px; background: var(--v2-red); color: #fff; font-size: 10px; font-weight: 800; }
.storefront-product-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.storefront-product-category { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; color: var(--v2-blue); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.storefront-product-card h3 { min-height: 42px; margin: 0 0 7px; font-size: 15px; line-height: 1.4; }
.storefront-product-card h3 a { color: var(--v2-ink); }
.storefront-product-desc { display: -webkit-box; min-height: 36px; margin: 0 0 13px; overflow: hidden; color: var(--v2-muted); font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.storefront-product-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 14px; color: #8795a3; font-size: 11px; }
.storefront-product-meta i { color: var(--v2-cyan); }
.storefront-product-bottom { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; }
.storefront-price { display: flex; flex-direction: column; }
.storefront-price del { color: #a1adb7; font-size: 11px; }
.storefront-price strong { color: var(--v2-blue); font-size: 16px; font-weight: 800; }
.storefront-stock-label { font-size: 10px; font-weight: 800; }
.storefront-stock-label.in { color: var(--v2-green); }
.storefront-stock-label.out { color: var(--v2-red); }
.storefront-product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.storefront-detail-btn, .storefront-buy-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; text-align: center; }
.storefront-detail-btn { border: 1px solid #dce5ed; background: #fff; color: #536679; }
.storefront-buy-btn { border: 1px solid var(--v2-blue); background: var(--v2-blue); color: #fff; }
.storefront-buy-btn:hover { border-color: var(--v2-blue-dark); background: var(--v2-blue-dark); color: #fff; }
.storefront-buy-btn:disabled { cursor: not-allowed; opacity: .5; }
.storefront-empty { padding: 70px 20px; text-align: center; color: #8292a4; }
.storefront-empty i { color: #b4c3cf; font-size: 42px; }
.storefront-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 28px 0 8px; color: var(--v2-muted); font-size: 12px; }

/* Product detail */
.storefront-product-page-v2 { padding: 22px 0 60px; }
.storefront-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: #8493a3; font-size: 12px; }
.storefront-breadcrumb a { color: var(--v2-blue); }
.storefront-breadcrumb i { font-size: 9px; }
.storefront-product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; }
.storefront-gallery-panel, .storefront-product-info, .storefront-product-tabs { position: relative; border: 1px solid var(--v2-line); border-radius: 16px; background: #fff; box-shadow: var(--v2-shadow); }
.storefront-gallery-panel { padding: 16px; overflow: hidden; }
.storefront-gallery-panel .storefront-gallery-badge { position: static; display: inline-block; margin-bottom: 12px; padding: 5px 8px; border-radius: 5px; background: #e9f5fb; color: var(--v2-blue); font-size: 10px; font-weight: 800; }
.storefront-gallery-main { aspect-ratio: 1.25; overflow: hidden; border-radius: 10px; background: #f2f6f9; }
.storefront-gallery-main picture, .storefront-gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; }
.storefront-gallery-thumbs { display: flex; gap: 9px; margin-top: 11px; overflow: auto; }
.storefront-gallery-thumbs span { flex: 0 0 66px; height: 54px; overflow: hidden; border: 1px solid #dce7ef; border-radius: 7px; }
.storefront-gallery-thumbs picture, .storefront-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.storefront-product-info { padding: 28px; }
.storefront-product-info .storefront-product-category { font-size: 11px; }
.storefront-product-info .storefront-product-category img { width: 25px; height: 25px; border-radius: 6px; object-fit: cover; }
.storefront-product-info h1 { margin: 11px 0; color: var(--v2-ink); font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.18; letter-spacing: -.035em; }
.storefront-rating { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 21px; color: #e1a025; font-size: 12px; }
.storefront-rating .product-code { color: #8796a7; }
.storefront-detail-price { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.storefront-detail-price del { color: #98a6b4; font-size: 13px; }
.storefront-detail-price strong { color: var(--v2-blue); font-size: 30px; font-weight: 800; }
.storefront-detail-desc { color: #63758a; font-size: 14px; line-height: 1.75; }
.storefront-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 22px 0; padding: 15px 0; border-top: 1px solid #edf2f6; border-bottom: 1px solid #edf2f6; }
.storefront-detail-stats > div { display: flex; gap: 8px; color: var(--v2-cyan); font-size: 15px; }
.storefront-detail-stats span { display: flex; flex-direction: column; color: #8493a3; font-size: 10px; }
.storefront-detail-stats strong { margin-top: 3px; color: #30465d; font-size: 11px; }
.storefront-detail-actions { display: flex; gap: 10px; }
.storefront-detail-actions button, .storefront-back-btn { flex: 1; min-height: 46px; border-radius: 8px; }
.storefront-back-btn { display: flex; align-items: center; justify-content: center; border: 1px solid #dce7f1; color: #52667b; font-weight: 800; }
.storefront-guarantees { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 17px; color: #718196; font-size: 11px; }
.storefront-guarantees i { margin-right: 4px; color: var(--v2-green); }
.storefront-product-tabs { margin-top: 22px; overflow: hidden; }
.storefront-tab-nav { display: flex; gap: 3px; overflow: auto; border-bottom: 1px solid #e8eff5; padding: 0 22px; }
.storefront-tab-nav a { padding: 16px 13px; color: #748397; font-size: 12px; font-weight: 800; white-space: nowrap; }
.storefront-tab-nav a.active { border-bottom: 3px solid var(--v2-blue); color: var(--v2-blue); }
.storefront-tab-panel { display: none; }
.storefront-tab-panel.active { display: block; }
.storefront-rich-content { padding: 26px; color: #34495e; font-size: 14px; line-height: 1.8; }
.storefront-rich-content img { max-width: 100%; height: auto; border-radius: 10px; }
.api-endpoint { display: flex; gap: 8px; margin: 11px 0; }
.api-endpoint span { display: flex; align-items: center; padding: 0 10px; border-radius: 5px; background: #eef5fa; font-size: 11px; font-weight: 800; }
.api-endpoint input { min-width: 0; flex: 1; padding: 9px; border: 1px solid #dce7ef; border-radius: 5px; }

@media (max-width: 1100px) { .storefront-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .storefront-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .storefront-product-layout { grid-template-columns: 1fr; } }
@media (max-width: 575px) {
  .storefront-home { padding-top: 10px; }
  .storefront-hero { align-items: flex-start; flex-direction: column; gap: 24px; padding: 30px 24px; border-radius: 14px; }
  .storefront-hero h1 { font-size: 2rem; }
  .storefront-hero p { font-size: 13px; }
  .storefront-hero-badge { align-self: stretch; flex-basis: auto; min-height: auto; padding: 13px; }
  .storefront-hero-badge strong { font-size: 1.8rem; }
  .storefront-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .storefront-product-grid { grid-template-columns: 1fr; gap: 14px; }
  .storefront-product-media { aspect-ratio: 1.35; }
  .storefront-product-card h3 { min-height: auto; }
  .storefront-pagination { align-items: flex-start; flex-direction: column; }
  .storefront-product-info { padding: 22px 18px; }
  .storefront-detail-stats { grid-template-columns: 1fr; }
  .storefront-product-actions { grid-template-columns: 1fr; }
  .storefront-tab-nav { padding: 0 10px; }
  .storefront-rich-content { padding: 20px 16px; }
  .api-endpoint { flex-wrap: wrap; }
  .api-endpoint input { flex-basis: 100%; order: 2; }
}


/* Responsive consistency patch: desktop, tablet and mobile */
html, body { max-width: 100%; overflow-x: clip; }
img, video, iframe, canvas, svg { max-width: 100%; }
.storefront-home, .storefront-home .container,
.storefront-product-page-v2, .storefront-product-page-v2 .container { min-width: 0; }
.storefront-hero, .storefront-catalog, .storefront-section-heading,
.storefront-product-layout, .storefront-product-info, .storefront-product-body { min-width: 0; }
.storefront-hero h1, .storefront-product-card h3, .storefront-product-info h1,
.storefront-product-desc, .storefront-product-category, .storefront-price strong {
  overflow-wrap: anywhere; word-break: normal;
}
.storefront-category-nav { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.storefront-category-chip { max-width: 100%; overflow-wrap: anywhere; }
.storefront-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.storefront-product-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.storefront-product-actions > * { min-width: 0; }
.storefront-product-meta { flex-wrap: wrap; }
.storefront-product-bottom { flex-wrap: wrap; align-items: center; }
.storefront-pagination { flex-wrap: wrap; }
.storefront-detail-actions { flex-wrap: wrap; }
.storefront-detail-actions > * { min-width: 0; }
.storefront-rich-content table { display: block; max-width: 100%; overflow-x: auto; }
.storefront-rich-content pre, .storefront-rich-content code { overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 1199.98px) {
  .storefront-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .storefront-product-body { padding: 14px; }
}
@media (max-width: 991.98px) {
  .storefront-hero { gap: 24px; }
  .storefront-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
  .storefront-product-layout { grid-template-columns: minmax(0, 1fr); }
  .storefront-product-info { padding: 24px; }
}
@media (max-width: 767.98px) {
  .storefront-home { padding-top: 12px; }
  .storefront-hero { padding: 26px 22px; border-radius: 16px; }
  .storefront-hero-copy { min-width: 0; width: 100%; }
  .storefront-hero h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.12; }
  .storefront-hero p { line-height: 1.6; }
  .storefront-trust-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
  .storefront-hero-badge { max-width: 100%; }
  .storefront-section-heading { display: flex; flex-wrap: wrap; }
  .storefront-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .storefront-product-body { padding: 12px; }
  .storefront-product-card h3 { font-size: 14px; line-height: 1.4; }
  .storefront-product-desc { font-size: 12px; }
  .storefront-product-meta { justify-content: flex-start; gap: 6px 10px; }
  .storefront-product-actions { grid-template-columns: minmax(0, 1fr); }
  .storefront-product-info { padding: 20px 16px; }
  .storefront-detail-price { flex-wrap: wrap; }
  .storefront-detail-price strong { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .storefront-detail-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .storefront-detail-stats > div { min-width: 0; }
  .storefront-rich-content { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .storefront-hero { padding: 22px 16px; }
  .storefront-hero h1 { font-size: 1.65rem; }
  .storefront-product-grid { grid-template-columns: minmax(0, 1fr); }
  .storefront-product-media { aspect-ratio: 1.4; }
  .storefront-product-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-detail-stats { grid-template-columns: minmax(0, 1fr); }
  .storefront-detail-actions { flex-direction: column; }
  .storefront-detail-actions > * { width: 100%; }
  .storefront-gallery-panel { padding: 10px; }
  .storefront-gallery-thumbs span { flex-basis: 56px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .storefront-product-card, .storefront-product-media img { transition: none !important; }
  .storefront-product-card:hover, .storefront-product-card:hover .storefront-product-media img { transform: none !important; }
}
