/* P2-POLISH 2026-09-20 */

/* ==========================================================================
   P2-POLISH — Luxusowe Zakupy catalog
   Luxury showroom rhythm + editorial hierarchy overrides.

   Scope:
     .catalog-page  → mobile card rhythm, spacing, quiet inquiry CTA
     #product-dialog / .product-detail → brand / model / reference hierarchy

   Untouched by design: header, logo, hero campaign copy + Lambo image,
   CRM, analytics. No JS. No markup changes. Loaded after p0-r*.
   !important used only where p0-r* media overrides compete.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MOBILE CATALOG — breathing room between photo and metadata
   -------------------------------------------------------------------------- */

@media (max-width: 650px) {

  /* --- grid gutter: wider, calmer content width ------------------------- */
  .catalog-page .cards {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-left: 22px;
    padding-right: 22px;
  }

  /* --- product photo → metadata rhythm ---------------------------------- */
  .catalog-page .card h3 {
    margin: 26px 0 0 !important;
  }

  .catalog-page .card h3 button {
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 10px;
    min-height: 40px;
    line-height: 1.35;
  }

  .catalog-page .card-brand {
    font-size: 10px !important;
    letter-spacing: 1.5px;
    line-height: 1.6;
    max-width: 100%;
    color: #6d5b43;
  }

  .catalog-page .card-model {
    font-size: 16.5px;
    line-height: 1.4;
    letter-spacing: -.2px;
    color: #2b2113;
  }

  /* --- reference + caption: quieter, more air below the title ----------- */
  .catalog-page .card .caption {
    font-size: 11px !important;
    min-height: 0 !important;
    margin-top: 13px;
    line-height: 1.7;
    color: #7c6b53;
  }

  .catalog-page .card .card-reference,
  .catalog-page .card-reference {
    font-size: 10px !important;
    letter-spacing: .4px;
    margin-top: 9px;
    color: #948572;
  }

  /* --- inquiry CTA: editorial ghost, never a loud ecommerce button ------
         Inquiry-first language is in the markup and stays untouched.       */
  .catalog-page .card .quick-add,
  .catalog-page .quick-add {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    margin-top: 20px;
    padding: 12px 18px !important;
    min-height: 44px !important;
    gap: 14px !important;
    font-family: var(--sans);
    font-size: 10px !important;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #56462f;
    background: transparent;
    border: 1px solid rgba(122, 100, 68, .3);
    border-radius: 0;
    box-shadow: none;
    -webkit-transition: color .25s ease, border-color .25s ease, background-color .25s ease;
    transition: color .25s ease, border-color .25s ease, background-color .25s ease;
  }

  .catalog-page .quick-add:hover {
    background: rgba(197, 168, 124, .14);
    border-color: rgba(122, 100, 68, .52);
    color: #3d3120;
  }

  .catalog-page .quick-add:focus-visible {
    outline: 1px solid #8b6f45;
    outline-offset: 3px;
  }

  /* selected / inquiry-sent state — marker, not a filled shop button */
  .catalog-page .quick-add[aria-pressed="true"],
  .catalog-page .quick-add[aria-pressed=true] {
    background: rgba(197, 168, 124, .16);
    border-color: rgba(122, 100, 68, .55);
    color: #2b2113;
    box-shadow: none;
  }
}

/* --- small phones: keep the rhythm, tighten only the edges --------------- */
@media (max-width: 430px) {
  .catalog-page .cards {
    gap: 32px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .catalog-page .card h3 {
    margin: 24px 0 0 !important;
  }

  .catalog-page .card .caption {
    margin-top: 12px;
  }

  .catalog-page .card .quick-add,
  .catalog-page .quick-add {
    padding: 11px 15px !important;
    min-height: 42px !important;
    gap: 12px !important;
    letter-spacing: 1.5px;
    margin-top: 18px;
  }
}

/* --------------------------------------------------------------------------
   2. PRODUCT DIALOG — brand / model / reference hierarchy, editorial calm
   -------------------------------------------------------------------------- */

/* --- softer modal shell --------------------------------------------------- */
#product-dialog {
  background: #fdfbf7;
  border: 1px solid rgba(122, 100, 68, .16);
  border-radius: 2px;
  box-shadow: 0 30px 90px rgba(28, 20, 12, .24);
  -webkit-font-smoothing: antialiased;
}

#product-dialog::backdrop {
  background: rgba(22, 16, 11, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* --- more air between gallery and copy ------------------------------------ */
#product-dialog .product-detail,
.product-detail {
  column-gap: clamp(24px, 3.6vw, 56px);
  row-gap: 0;
}

/* --- gallery surface: quiet, never competing with the product ------------- */
#product-dialog .product-gallery,
.product-detail .product-gallery {
  background: #f6f1e8;
}

/* --- copy column: generous editorial padding ------------------------------ */
#product-dialog .product-copy,
.product-detail .product-copy {
  padding: clamp(40px, 4.2vw, 66px) clamp(38px, 4.6vw, 72px) !important;
}

/* --- BRAND: quiet, small, wide-tracked uppercase -------------------------- */
#product-dialog .product-brand,
.product-detail .product-brand {
  display: block;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 9.5px !important;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: #8b7b62;
  opacity: .95;
}

/* --- MODEL: the loudest voice in the panel, set in serif ------------------ */
#product-dialog .product-copy h2,
.product-detail .product-copy h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 60px) !important;
  line-height: 1.02;
  letter-spacing: -.6px;
  color: #241a10;
}

/* --- REFERENCE: deliberately muted, small caps ---------------------------- */
#product-dialog .product-reference,
.product-detail .product-reference {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 10px !important;
  line-height: 1.6;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #9b8c74;
}

/* --- body copy: roomier measure, warmer ink ------------------------------- */
#product-dialog .product-copy > p,
.product-detail .product-copy > p {
  font-size: 13.5px;
  line-height: 1.9;
  color: #4c3f2e;
  max-width: 48ch;
}

#product-dialog .product-copy .sample-note,
.product-detail .product-copy .sample-note {
  margin-top: 22px;
  font-size: 10.5px !important;
  line-height: 1.8;
  letter-spacing: .5px;
  color: #948572;
}

/* --- dialog CTA: calmer, still comfortably tappable ----------------------- */
#product-dialog .product-copy > button.button,
#product-dialog .product-copy > button[data-add],
#product-dialog .product-copy > button,
.product-detail .product-copy > button.button,
.product-detail .product-copy > button[data-add],
.product-detail .product-copy > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 34px;
  min-height: 48px;
  padding: 16px 30px;
  gap: 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #3c2e1d;
  background: transparent;
  border: 1px solid rgba(122, 100, 68, .34);
  border-radius: 0;
  box-shadow: none;
  -webkit-transition: color .28s ease, border-color .28s ease, background-color .28s ease;
  transition: color .28s ease, border-color .28s ease, background-color .28s ease;
}

#product-dialog .product-copy > button.button:hover,
#product-dialog .product-copy > button[data-add]:hover,
#product-dialog .product-copy > button:hover,
.product-detail .product-copy > button.button:hover,
.product-detail .product-copy > button[data-add]:hover,
.product-detail .product-copy > button:hover {
  background: rgba(197, 168, 124, .14);
  border-color: rgba(122, 100, 68, .56);
  color: #2b2113;
}

#product-dialog .product-copy > button.button:focus-visible,
#product-dialog .product-copy > button[data-add]:focus-visible,
#product-dialog .product-copy > button:focus-visible,
.product-detail .product-copy > button.button:focus-visible,
.product-detail .product-copy > button[data-add]:focus-visible,
.product-detail .product-copy > button:focus-visible {
  outline: 1px solid #8b6f45;
  outline-offset: 3px;
}

#product-dialog .product-copy > button.button[aria-pressed="true"],
#product-dialog .product-copy > button[data-add][aria-pressed="true"],
.product-detail .product-copy > button.button[aria-pressed="true"],
.product-detail .product-copy > button[data-add][aria-pressed="true"] {
  background: rgba(197, 168, 124, .16);
  border-color: rgba(122, 100, 68, .56);
  color: #241a10;
  box-shadow: none;
}

/* --- dialog on phones: full sheet, softer padding, tighter hierarchy ------ */
@media (max-width: 650px) {

  #product-dialog {
    width: 100%;
    max-width: 100vw;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #product-dialog .product-detail,
  .product-detail {
    column-gap: 0;
  }

  #product-dialog .product-copy,
  .product-detail .product-copy {
    padding: 30px 22px 44px !important;
  }

  #product-dialog .product-brand,
  .product-detail .product-brand {
    margin-bottom: 14px;
    font-size: 9px !important;
    letter-spacing: 2.2px;
  }

  #product-dialog .product-copy h2,
  .product-detail .product-copy h2 {
    margin-bottom: 16px;
    font-size: 34px !important;
    line-height: 1.08;
    letter-spacing: -.4px;
  }

  #product-dialog .product-reference,
  .product-detail .product-reference {
    margin-top: 14px;
    font-size: 9.5px !important;
    letter-spacing: 1.5px;
  }

  #product-dialog .product-copy > p,
  .product-detail .product-copy > p {
    font-size: 13px;
    line-height: 1.85;
    max-width: none;
  }

  #product-dialog .product-copy .sample-note,
  .product-detail .product-copy .sample-note {
    margin-top: 18px;
    font-size: 10px !important;
  }

  #product-dialog .product-copy > button.button,
  #product-dialog .product-copy > button[data-add],
  #product-dialog .product-copy > button,
  .product-detail .product-copy > button.button,
  .product-detail .product-copy > button[data-add],
  .product-detail .product-copy > button {
    width: 100%;
    margin-top: 28px;
    min-height: 48px;
    padding: 15px 22px;
    justify-content: center;
    letter-spacing: 1.6px;
  }
}

@media (max-width: 430px) {

  #product-dialog .product-copy,
  .product-detail .product-copy {
    padding: 26px 18px 40px !important;
  }

  #product-dialog .product-copy h2,
  .product-detail .product-copy h2 {
    font-size: 30px !important;
  }

  #product-dialog .product-copy > button.button,
  #product-dialog .product-copy > button[data-add],
  #product-dialog .product-copy > button,
  .product-detail .product-copy > button.button,
  .product-detail .product-copy > button[data-add],
  .product-detail .product-copy > button {
    margin-top: 24px;
    letter-spacing: 1.4px;
  }
}

/* --- respect reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .catalog-page .quick-add,
  #product-dialog .product-copy > button.button,
  #product-dialog .product-copy > button[data-add],
  #product-dialog .product-copy > button,
  .product-detail .product-copy > button.button,
  .product-detail .product-copy > button[data-add],
  .product-detail .product-copy > button {
    -webkit-transition: none;
    transition: none;
  }
}
