:root {
  --ink: #0d2438;
  --muted: #536779;
  --line: #dce7ef;
  --soft: #f4f8fb;
  --paper: #ffffff;
  --blue: #0d69a8;
  --navy: #14365c;
  --deep: #081f35;
  --thread: #8ec7e8;
  --green: #128c7e;
  --shadow: 0 18px 48px rgba(13, 36, 56, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 46px;
  border-radius: var(--radius);
  color: white;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a {
  position: relative;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  content: "";
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.header-action,
.button.primary {
  background: var(--blue);
  color: white;
}

.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.button.whatsapp {
  width: 100%;
  background: var(--green);
  color: white;
  margin-top: 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  min-height: 300px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 54px) clamp(22px, 5vw, 76px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  max-width: 760px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-image {
  position: relative;
  z-index: 1;
  min-height: 300px;
  background: url("assets/cottonblue-hero.png") center / cover no-repeat;
}

.section,
.order-section,
.location-section,
.discount-section,
.email-section,
.contact-section {
  padding: clamp(54px, 7vw, 92px) clamp(18px, 4vw, 64px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 36px;
  margin-bottom: 32px;
}

.section-heading h2,
.discount-section h2,
.order-panel h2,
.contact-card h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.section-heading p,
.discount-section p,
.integration-note p,
.contact-card p,
.email-copy p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.65;
}

.catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 26px;
}

.wholesale-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: -10px 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(0, 91, 150, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 91, 150, 0.1), rgba(32, 166, 197, 0.14));
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(3, 32, 61, 0.08);
}

.wholesale-banner strong {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.wholesale-banner span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.catalog-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.catalog-search {
  width: min(100%, 430px);
  display: grid;
  gap: 8px;
  color: var(--primary);
  font-weight: 800;
}

.catalog-search input {
  width: 100%;
  border: 1px solid rgba(0, 91, 150, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 30px rgba(3, 32, 61, 0.08);
  outline: none;
}

.catalog-search input:focus {
  border-color: rgba(0, 91, 150, 0.55);
  box-shadow: 0 0 0 4px rgba(32, 166, 197, 0.14), 0 14px 30px rgba(3, 32, 61, 0.08);
}

.tab-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.empty-products {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(0, 91, 150, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 420ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 420ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 105, 168, 0.32);
  box-shadow: var(--shadow);
}

.product-grid .product-card {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

#productos {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.product-card.reveal.is-visible:hover {
  transform: translateY(-3px) scale(1);
}

.product-card.is-in-order {
  border-color: rgba(13, 105, 168, 0.55);
  background: linear-gradient(180deg, #eef8ff, #ffffff 42%);
  box-shadow: 0 18px 48px rgba(13, 105, 168, 0.16);
}

.product-photo {
  display: block;
  aspect-ratio: 1 / 1;
  background-image: url("assets/cottonblue-productos-v2.png");
  background-size: 300% 300%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f7fafc;
  border-bottom: 1px solid var(--line);
}

.product-photo-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-photo-link .product-photo {
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 520ms ease;
}

.product-photo-link:hover .product-photo {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.product-photo.photo-institucional,
.product-photo.photo-basicos {
  background-size: cover;
  aspect-ratio: 4 / 3;
}

.product-photo.photo-product-single {
  background-size: contain;
  background-color: #ffffff;
  aspect-ratio: 4 / 5;
}

.product-photo.photo-institucional {
  background-image: url("assets/cottonblue-blanqueria.png");
}

.product-photo.photo-basicos {
  background-image: url("assets/cottonblue-uniformes-basicos.png");
}

.pos-0 { background-position: 0% 0%; }
.pos-1 { background-position: 50% 0%; }
.pos-2 { background-position: 100% 0%; }
.pos-3 { background-position: 0% 100%; }
.pos-4 { background-position: 50% 100%; }
.pos-5 { background-position: 100% 100%; }
.pos-6 { background-position: left center; }
.pos-7 { background-position: center center; }
.pos-8 { background-position: right center; }
.pos-9 { background-position: center top; }
.pos-10 { background-position: center bottom; }

.product-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.ordered-marker {
  min-height: 18px;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.product-category {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
}

.product-card p {
  color: var(--muted);
  line-height: 1.55;
}

.size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.size-row strong {
  color: var(--ink);
  text-align: right;
}

.price-bands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.price-bands div,
.price-bands.single {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(13, 105, 168, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
}

.price-bands span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-bands strong {
  color: var(--blue);
  font-size: 13px;
}

.price-bands.single {
  grid-template-columns: 1fr;
}

.size-chart {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
}

.size-chart summary {
  padding: 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.chart-frame {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.chart-frame a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.modern-chart-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(13, 105, 168, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.chart-watermark {
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 170px;
  opacity: 0.045;
  pointer-events: none;
}

.chart-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chart-head span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-head strong {
  color: var(--ink);
  font-size: 18px;
}

.chart-head small {
  color: var(--muted);
  line-height: 1.4;
}

.modern-table-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.modern-table-wrap h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.table-scroll {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.modern-size-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.modern-size-table th,
.modern-size-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}

.modern-size-table th:first-child,
.modern-size-table td:first-child {
  z-index: 1;
  text-align: left;
  font-weight: 800;
  background: #eef6fb;
  width: 24%;
}

.modern-size-table th {
  color: white;
  background: var(--blue);
  font-size: 12px;
}

.modern-size-table th:first-child {
  background: var(--navy);
}

.modern-size-table tr:last-child td {
  border-bottom: 0;
}

.modern-size-table tbody tr:nth-child(even) td:not(:first-child) {
  background: #f7fafc;
}

.size-stack {
  display: grid;
  gap: 8px;
}

.size-stack-row {
  display: grid;
  grid-template-columns: 72px repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.size-stack-row > strong {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue);
  color: white;
  font-size: 14px;
}

.size-stack-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.size-stack-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-detail-page {
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
}

.product-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(44px, 7vw, 88px) clamp(18px, 4vw, 64px);
}

.back-link {
  grid-column: 1 / -1;
  color: var(--blue);
  font-weight: 800;
}

.detail-photo {
  min-height: min(520px, 70vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1;
}

.detail-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.item-order-summary {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(13, 105, 168, 0.22);
  border-radius: var(--radius);
  background: #eef8ff;
}

.item-order-summary.empty {
  color: var(--muted);
  background: white;
}

.item-order-summary strong {
  color: var(--ink);
}

.item-order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item-order-chips span {
  padding: 7px 10px;
  border-radius: var(--radius);
  background: white;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.item-order-summary small {
  color: var(--muted);
}

.detail-chart-card {
  display: grid;
  gap: 16px;
  padding: 0 clamp(18px, 4vw, 64px) clamp(54px, 7vw, 92px);
}

.large-chart {
  padding: clamp(18px, 4vw, 34px);
}

.large-chart .chart-watermark {
  width: min(320px, 38vw);
  opacity: 0.035;
}

.large-chart .chart-head strong {
  font-size: clamp(26px, 3vw, 42px);
}

.large-chart .modern-size-table {
  font-size: 15px;
}

.large-chart .modern-size-table th,
.large-chart .modern-size-table td {
  padding: 12px 10px;
}

.large-chart .size-stack-row {
  grid-template-columns: 96px repeat(auto-fit, minmax(120px, 1fr));
}

.reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  filter: blur(6px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.chart-note {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.chart-note strong {
  color: var(--ink);
}

.chart-note span {
  color: var(--muted);
  font-size: 13px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  margin-bottom: 20px;
}

.price {
  font-size: 22px;
  font-weight: 800;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.qty-control input {
  width: 54px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  color: var(--ink);
  font-weight: 700;
}

.size-order {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.size-order-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.size-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-order-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.color-order-group > strong {
  color: var(--blue);
  font-size: 13px;
}

.size-qty {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.size-qty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.size-qty input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.size-qty-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}

.size-qty-control button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--blue);
  background: white;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.size-qty-control button:active {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.size-qty input:focus {
  outline: 2px solid rgba(13, 105, 168, 0.18);
  border-color: var(--blue);
}

.order-details {
  margin-top: auto;
  border: 1px solid rgba(13, 105, 168, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}

.product-content .order-details {
  margin-top: 22px;
}

.detail-copy .order-details {
  margin-top: 18px;
}

.order-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: white;
  background: var(--blue);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.order-details summary::-webkit-details-marker {
  display: none;
}

.order-details summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 18px;
  line-height: 1;
}

.order-details[open] summary::after {
  content: "-";
}

.add-to-order {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.add-to-order.is-added {
  background: var(--green);
}

.order-toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.order-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.discount-section {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: center;
  background: radial-gradient(circle at 16% 10%, rgba(142, 199, 232, 0.22), transparent 28%),
    linear-gradient(135deg, var(--deep), var(--navy));
  color: white;
}

.discount-section > *:not(.section-logo-watermark) {
  position: relative;
  z-index: 1;
}

.section-logo-watermark {
  position: absolute;
  right: -60px;
  bottom: -120px;
  width: min(430px, 48vw);
  opacity: 0.08;
  pointer-events: none;
}

.discount-section p {
  color: rgba(255, 255, 255, 0.76);
}

.discount-table {
  display: grid;
  gap: 10px;
}

.discount-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.discount-table span {
  color: rgba(255, 255, 255, 0.8);
}

.order-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
  background: var(--soft);
}

.email-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: start;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: 22px;
  align-items: start;
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
}

.contact-section .email-copy {
  grid-column: 1 / -1;
}

.order-panel,
.integration-note,
.shipping-card,
.contact-card,
.email-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow);
}

.contact-card h3,
.email-card h3,
.map-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.email-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.email-card {
  display: grid;
  gap: 16px;
}

.map-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(420px, 1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.map-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(22px, 4vw, 36px);
  border-right: 1px solid var(--line);
}

.map-card-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
  filter: saturate(0.88) contrast(0.96);
}

.email-card label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.email-card input,
.email-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}

.email-card input:focus,
.email-card textarea:focus {
  outline: 2px solid rgba(13, 105, 168, 0.18);
  border-color: var(--blue);
}

.email-direct {
  color: var(--blue);
  font-weight: 800;
}

.cart-lines {
  display: grid;
  gap: 10px;
  min-height: 70px;
  margin: 18px 0;
  color: var(--muted);
}

.cart-line,
.totals div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.totals div {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cart-line span {
  display: grid;
  gap: 4px;
}

.cart-line small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.remove-line {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.remove-line:hover {
  border-color: rgba(13, 105, 168, 0.32);
  color: var(--blue);
  background: #eef8ff;
}

.cart-line strong,
.totals strong {
  white-space: nowrap;
  text-align: right;
}

.grand-total {
  align-items: center;
  border-bottom: 0 !important;
}

.grand-total strong {
  color: var(--blue);
  font-size: 30px;
}

.fine-print {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.integration-note ul {
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.shipping-card {
  display: grid;
  gap: 16px;
}

.shipping-card h3 {
  font-size: clamp(26px, 3vw, 38px);
}

.shipping-card p {
  color: var(--muted);
  line-height: 1.65;
}

.shipping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shipping-card label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.shipping-card input,
.shipping-card select,
.shipping-card textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  background: white;
}

.shipping-card textarea {
  resize: vertical;
}

.agency-field {
  display: none !important;
}

.agency-field.is-visible {
  display: grid !important;
}

.shipping-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shipping-actions .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shipping-actions .no-shipping {
  border-color: #c7d6e2;
  background: #f7fbff;
  color: var(--blue);
}

.shipping-rates {
  display: grid;
  gap: 10px;
}

.shipping-rate {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px !important;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  cursor: pointer;
}

.shipping-rate:has(input:checked) {
  border-color: rgba(13, 105, 168, 0.5);
  background: #eef8ff;
}

.shipping-rate input {
  width: 18px;
  min-height: 18px;
}

.shipping-rate span {
  display: grid;
  gap: 4px;
}

.shipping-rate strong {
  color: var(--ink);
  font-size: 14px;
}

.shipping-rate small,
.shipping-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shipping-rate b {
  color: var(--blue);
  white-space: nowrap;
}

.shipping-status {
  min-height: 20px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.location-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(360px, 1.25fr);
  gap: 22px;
}

.location-section iframe {
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-footer strong {
  color: var(--ink);
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
  }

  .desktop-nav {
    order: 3;
    display: flex;
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
  }

  .desktop-nav::-webkit-scrollbar {
    display: none;
  }

  .desktop-nav a {
    flex: 0 0 auto;
    padding: 8px 2px;
  }

  .hero,
  .discount-section,
  .order-section,
  .location-section,
  .email-section,
  .contact-section,
  .map-card {
    grid-template-columns: 1fr;
  }

  .shipping-grid {
    grid-template-columns: 1fr;
  }

  .map-card-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 0;
  }

  .hero-image {
    min-height: 420px;
    order: -1;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .catalog-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .catalog-tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: center;
    padding: 12px 16px;
  }

  .header-action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 46px;
    height: 40px;
  }

  .brand-mark img {
    width: 36px;
    height: 36px;
  }

  .hero-copy,
  .section,
  .order-section,
  .location-section,
  .discount-section,
  .email-section,
  .contact-section {
    padding: 34px 16px;
  }

  h1 {
    max-width: 13ch;
    font-size: 40px;
    line-height: 1.02;
  }

  .hero-text {
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .tab-button {
    width: 100%;
  }

  .hero-image {
    min-height: 300px;
    background-position: 58% center;
  }

  .section-heading h2,
  .discount-section h2,
  .order-panel h2,
  .contact-card h2,
  .email-copy h2 {
    font-size: 30px;
  }

  .catalog-tabs {
    margin-top: -2px;
  }

  .catalog-tools {
    justify-content: stretch;
  }

  .wholesale-banner,
  .catalog-search {
    width: 100%;
  }

  .tab-button {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .product-card h3 {
    font-size: 18px;
  }

  .product-detail-hero {
    grid-template-columns: 1fr;
    padding: 34px 16px;
  }

  .detail-photo {
    min-height: 340px;
  }

  .detail-copy h1 {
    max-width: none;
    font-size: 36px;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-chart-card {
    padding: 0 16px 42px;
  }

  .large-chart .modern-size-table {
    font-size: 11px;
  }

  .modern-size-table th,
  .modern-size-table td {
    padding: 7px 4px;
  }

  .size-stack-row,
  .large-chart .size-stack-row {
    grid-template-columns: 1fr;
  }

  .size-stack-row > strong {
    min-height: 36px;
  }

  .price-row,
  .size-row,
  .price-bands,
  .discount-table div,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .price-bands {
    grid-template-columns: 1fr;
  }

  .size-row strong {
    text-align: left;
  }

  .qty-control {
    width: 100%;
    justify-content: space-between;
  }

  .qty-control input {
    flex: 1;
  }

  .cart-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cart-line .remove-line {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .size-qty-control {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .location-section iframe {
    min-height: 320px;
  }

  .map-card,
  .map-card iframe {
    min-height: 320px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 34px;
  }

  .brand strong {
    font-size: 15px;
  }

  .header-action {
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
