/*
 * Print.az — shared configurator styles for the generic Advanced Pricing
 * Builder product template (/mehsul/). Adapted from the visual language
 * used across the existing Mətbəə product pages (e.g.
 * korporativ-cap-mehsullari/vizit-kartlar/), which currently re-inline this
 * CSS per page. This is the first version of it as a single shared file,
 * since a genuinely generic template has exactly one physical page to
 * style rather than 30+ copies.
 */

:root {
  --accent: #d71920;
  --accent-dark: #a80f16;
  --ink: #17191d;
  --muted: #4f5865;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-primary {
  color: var(--white);
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(215, 25, 32, 0.22);
}

.button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hero {
  padding: 52px 0 28px;
  background:
    radial-gradient(circle at 88% 8%, rgba(215, 25, 32, 0.1), transparent 36%),
    linear-gradient(180deg, #fffdfb 0%, #f8f9fb 100%);
}

.hero-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-breadcrumb a:hover {
  color: var(--accent-dark);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.hero-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-visual {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.section-soft {
  padding: 28px 0 64px;
  background: var(--soft);
}

.calculator-section {
  padding-top: 8px;
}

.configurator {
  display: grid;
  gap: 20px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(17, 24, 39, 0.08);
}

.configurator-form {
  display: grid;
  gap: 14px;
}

.option-grid {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 10px;
}

.option-field {
  display: grid;
  gap: 5px;
}

.option-field label,
.step-title {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.option-field select,
.option-field input[type="number"],
.option-field input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #fcfcfd;
  border: 1.5px solid #d5dae1;
  border-radius: 14px;
  font: inherit;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.finishing-list {
  display: grid;
  gap: 6px;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.validation-message {
  display: none;
  margin: 0;
  padding: 10px 12px;
  color: var(--accent-dark);
  background: rgba(215, 25, 32, 0.08);
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 12px;
  font-size: 0.88rem;
}

.validation-message.visible {
  display: block;
}

.configurator-summary {
  display: grid;
  gap: 10px;
  padding: 17px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.07);
}

.summary-product-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.selected-product-line {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.summary-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.summary-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.summary-list dd {
  margin: 0;
  font-weight: 700;
}

.summary-list .final-total {
  margin-top: 3px;
  padding-top: 8px;
  border-bottom: 0;
}

.summary-list .final-total dt,
.summary-list .final-total dd {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.summary-list .final-total dd {
  color: var(--accent-dark);
}

.configurator-summary .button-primary {
  width: 100%;
  margin-top: 2px;
}

.summary-notes {
  display: grid;
  gap: 4px;
}

.summary-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.checkout-message {
  display: none;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.checkout-message.visible {
  display: block;
}

.checkout-message.error {
  color: var(--accent-dark);
  background: rgba(215, 25, 32, 0.08);
}

.breaks-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.breaks-table th,
.breaks-table td {
  padding: 6px 4px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.breaks-table th:first-child,
.breaks-table td:first-child {
  text-align: left;
}

.mobile-order-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px rgba(17, 24, 39, 0.08);
}

.mobile-order-total {
  font-size: 1.1rem;
  font-weight: 800;
}

.mobile-order-bar .button {
  min-height: 42px;
  padding: 0 16px;
}

.state-loading,
.state-error {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

.footer {
  padding: 32px 0;
  color: var(--muted);
  background: #111318;
}

.footer-row {
  display: grid;
  gap: 6px;
  color: #c9cdd6;
  font-size: 0.85rem;
}

.footer-row strong {
  color: var(--white);
  font-size: 1rem;
}

@media (max-width: 919px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .configurator-summary #checkout-button {
    display: none;
  }
}

@media (min-width: 680px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
  .configurator {
    grid-template-columns: minmax(0, 1.68fr) minmax(300px, 0.92fr);
    align-items: start;
    padding: 22px;
  }
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .configurator-summary {
    position: sticky;
    top: 92px;
  }
  .mobile-order-bar {
    display: none;
  }
}
