/* =========================================================
   BASE / VARIABLES
   ========================================================= */
:root {
  --color-primary: #0f6e5e;
  --color-primary-dark: #0a4f43;
  --color-accent: #e07a3f;
  --color-ink: #1c2530;
  --color-ink-light: #56616d;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f7f6;
  --color-border: #e2e6e4;
  --color-danger: #c0392b;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 30, 25, 0.08);
  --shadow-lg: 0 8px 30px rgba(20, 30, 25, 0.12);
  --max-width: 1240px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--color-ink-light); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn-outline:hover { background: var(--color-ink); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =========================================================
   HEADER
   ========================================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.site-header-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.header-nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-self: start;
  position: relative;
  z-index: 2;
}

.header-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111;
  letter-spacing: 0.01em;
  padding: 6px 0;
}
.header-link:hover { opacity: 0.65; }

.logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.logo-mark {
  display: inline-block;
  width: 14px;
  height: 18px;
  position: relative;
}
.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  top: 0;
  width: 2.5px;
  height: 100%;
  background: #111;
  transform: skewX(-18deg);
  border-radius: 1px;
}
.logo-mark::before { left: 0; }
.logo-mark::after { left: 7px; }
.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  justify-self: end;
  position: relative;
  z-index: 2;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}
.icon-btn:hover { opacity: 0.65; }

.cart-link { text-decoration: none; }

.cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #111;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
}
.cart-badge[hidden] { display: none; }

.dropdown { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  border-radius: 8px;
  min-width: 220px;
  max-height: 70vh;
  overflow: auto;
  padding: 8px 0;
  z-index: 50;
}
.dropdown-panel a {
  display: block;
  padding: 9px 18px;
  font-weight: 500;
  font-size: 0.9rem;
  color: #111;
}
.dropdown-panel a:hover { background: #f5f5f5; }
.dropdown:hover .dropdown-panel { display: block; }

.header-search {
  display: none;
  border-top: 1px solid #eee;
  background: #fff;
  padding: 14px 40px 18px;
  position: relative;
  z-index: 110;
}
.header-search.is-open {
  display: block;
}
.header-search-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.header-search-form input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  color: #111;
}
.header-search-form input:focus { border-color: #111; }
.header-search-close {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}

/* =========================================================
   HERO (full-bleed banner)
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #8a8278;
}
.hero-media {
  display: block;
  width: 100%;
}
.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3660 / 1350;
}
.hero-copy {
  position: absolute;
  left: 6%;
  bottom: 34%;
  z-index: 2;
  max-width: 420px;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #fff;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}
.btn-hero {
  background: #fff;
  color: #1a2626;
  border: 2px solid #1a2626;
  padding: 14px 28px;
  min-width: 150px;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-hero:hover {
  background: #1a2626;
  color: #fff;
}

/* =========================================================
   SECTIONS / TILES
   ========================================================= */
.section { padding: 56px 0; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-heading h2 { font-size: 1.9rem; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.category-tile {
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-tile .icon-frame {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-border);
  font-size: 2rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit-card {
  text-align: center;
  padding: 28px 18px;
}
.benefit-card .badge {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}

.newsletter {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}
.newsletter h2 { color: #fff; }
.newsletter p { color: #cfe4de; }
.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 460px;
  margin: 20px auto 0;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
}

/* =========================================================
   PRODUCT GRID / CARD
   ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: block;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card-body { padding: 16px; }
.product-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.product-card-short { font-size: 0.86rem; margin-bottom: 10px; }
.product-card-price { font-weight: 700; }
.price-now { color: var(--color-ink); margin-right: 8px; }
.price-was { color: var(--color-ink-light); text-decoration: line-through; font-weight: 500; font-size: 0.9rem; }

/* Image placeholder handling */
.img-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-bg-soft);
  overflow: hidden;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-ink-light);
  background: repeating-linear-gradient(45deg, #eef1ef, #eef1ef 10px, #f6f8f6 10px, #f6f8f6 20px);
  padding: 10px;
}
.img-placeholder small { display: block; margin-top: 4px; opacity: 0.7; font-size: 0.72rem; }
.img-missing .img-placeholder { display: flex; }

/* =========================================================
   FILTER BAR (category / conditions pages)
   ========================================================= */
.page-header {
  background: var(--color-bg-soft);
  padding: 36px 0;
  margin-bottom: 36px;
}
.page-header h1 { margin-bottom: 6px; }
.breadcrumb { font-size: 0.85rem; color: var(--color-ink-light); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--color-primary); }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff;
}
.filter-chip.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* =========================================================
   PRODUCT DETAIL PAGE
   ========================================================= */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 0 60px;
}
.product-gallery-main { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.product-gallery-thumbs { display: flex; gap: 10px; }
.product-gallery-thumbs .img-frame { width: 90px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.product-gallery-thumbs .img-frame.active { border-color: var(--color-primary); }

.product-info h1 { font-size: 1.8rem; margin-bottom: 6px; }
.product-info .price-row { font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; }
.product-info .price-row .price-was { font-size: 1rem; margin-left: 10px; }

.option-group { margin-bottom: 22px; }
.option-group label.group-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.9rem; }
.option-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.option-pill {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  padding: 9px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--color-ink);
}
.option-pill.selected { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.option-group.has-error .option-pill { border-color: var(--color-danger); }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--color-border); border-radius: 8px; }
.qty-control button { width: 36px; height: 36px; border: none; background: none; font-size: 1.1rem; cursor: pointer; }
.qty-control input { width: 40px; text-align: center; border: none; font-size: 1rem; }

.add-to-cart-msg { margin-top: 12px; font-weight: 600; color: var(--color-primary); display: none; }
.add-to-cart-msg.show { display: block; }

.feature-list { margin-top: 28px; }
.feature-list h3 { font-size: 1.1rem; }
.feature-list ul { padding-left: 20px; margin: 0; }
.feature-list li { margin-bottom: 6px; color: var(--color-ink-light); }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tag-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-bg-soft);
  color: var(--color-primary-dark);
  padding: 5px 12px;
  border-radius: 999px;
}

.related-section { padding: 20px 0 60px; }

/* =========================================================
   CART / CHECKOUT
   ========================================================= */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 0 70px;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-item .img-frame { width: 90px; border-radius: 8px; }
.cart-item-meta { font-size: 0.85rem; color: var(--color-ink-light); }
.cart-item-name { font-weight: 700; margin-bottom: 4px; }
.cart-item-remove { color: var(--color-danger); font-size: 0.8rem; font-weight: 600; margin-top: 6px; cursor: pointer; }
.cart-item-price { font-weight: 700; white-space: nowrap; }

.order-summary {
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.summary-row.total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--color-border); padding-top: 14px; margin-top: 14px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-ink-light); }

/* =========================================================
   FORMS (checkout / contact)
   ========================================================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--color-danger);
  background: #fff8f7;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #111;
}
.field-error {
  display: block;
  min-height: 1.1em;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--color-danger);
}
.payment-method { margin: 0 0 24px; }
.payment-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  background: #f3faf7;
  cursor: default;
}
.payment-option input {
  margin-top: 4px;
  accent-color: var(--color-primary);
}
.payment-option-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.payment-option-body strong { color: var(--color-ink); font-size: 1rem; }
.payment-option-body small { color: var(--color-ink-light); font-size: 0.88rem; line-height: 1.4; }
.form-error-banner {
  background: #fff1f0;
  border: 1px solid #f5c2c0;
  color: var(--color-danger);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 8px 0 16px;
}
.form-error-banner[hidden] { display: none; }
.order-success-banner {
  background: #eef8f2;
  border: 1px solid #b7e0c5;
  color: #1a5c38;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0 0;
  font-weight: 600;
  text-align: center;
}
.notice-box {
  background: #fff7ed;
  border: 1px solid #f3d9b5;
  color: #8a5a1c;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */
#site-footer { background: var(--color-ink); color: #cfd6d3; margin-top: 60px; }
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h4 { color: #fff; }
.footer-grid h5 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-grid a { display: block; padding: 5px 0; font-size: 0.9rem; color: #cfd6d3; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { color: #a8b0ad; font-size: 0.88rem; }
.footer-legal {
  margin-top: 14px;
  font-size: 0.8rem !important;
  line-height: 1.55;
  color: #8b938f !important;
}
.footer-bottom {
  border-top: 1px solid #333d39;
  text-align: center;
  padding: 18px;
  font-size: 0.8rem;
  color: #8b938f;
}

/* =========================================================
   ABOUT / CONTACT (simple content pages)
   ========================================================= */
.content-page { padding: 40px 24px 70px; max-width: 800px; margin: 0 auto; }
.content-page h1 { margin-bottom: 18px; }
.content-page h2 { margin-top: 32px; }
.content-page h3 { margin-top: 22px; font-size: 1.05rem; }
.content-page ul, .content-page ol { color: var(--color-ink-light); padding-left: 1.25em; margin: 0 0 1em; }
.content-page li { margin-bottom: 0.4em; }
.content-page a { color: var(--color-primary-dark); text-decoration: underline; }
.policy-updated { font-size: 0.88rem; color: var(--color-ink-light); margin-top: -8px; }
.table-wrap { overflow-x: auto; margin: 16px 0 28px; }
.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.size-table th,
.size-table td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: center;
}
.size-table th { background: var(--color-bg-soft); font-weight: 700; }
.size-table tbody tr:nth-child(even) { background: #fafafa; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .site-header-bar { padding: 14px 20px; }
  .header-search { padding-left: 20px; padding-right: 20px; }
  .logo-text { font-size: 1.15rem; }
  .header-nav-left { gap: 18px; }
}
@media (max-width: 767px) {
  .hero {
    display: flex;
    flex-direction: column;
    background: #fff;
  }
  .hero-media img {
    aspect-ratio: 1720 / 1360;
  }
  .hero-copy {
    position: static;
    max-width: none;
    padding: 20px 20px 28px;
    text-align: center;
  }
  .hero-copy h1 {
    color: #1a2626;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
  }
  .hero-actions {
    margin-top: 20px;
    flex-direction: column;
    gap: 12px;
  }
  .btn-hero {
    width: 100%;
    background: #1a2626;
    color: #fff;
    border-color: #1a2626;
  }
  .btn-hero:hover {
    background: #fff;
    color: #1a2626;
  }
  .header-link { font-size: 0.85rem; }
}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-header-bar {
    padding: 12px 14px;
    gap: 10px;
  }
  .header-nav-left { gap: 12px; }
  .header-actions { gap: 8px; }
}
