/* Kolyne - Vetrina e promo 1.0.0 */
:root {
  --kx-plum: #63243b;
  --kx-plum-dark: #4b1a2c;
  --kx-ink: #2d2627;
  --kx-muted: #8a7d80;
  --kx-line: #eadde2;
  --kx-red: #b3202f;
  --kx-wine: #560a15;
  --kx-gold: #d9b56a;
  --kx-cream: #fbf3e6;
  --kx-green: #2e7d4f;
}

.kx-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ================= 1. Riquadri prodotto ================= */
.kx-card { display: flex; flex-direction: column; }
.kx-card .k-product-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.kx-card .k-product-purchase-actions { margin-top: auto !important; }
.kx-card .k-product-media { position: relative; isolation: isolate; }
.kx-card .k-product-media .product-thumbnail img { transition: transform .35s ease; }
@media (hover: hover) {
  .kx-card:hover .k-product-media .product-thumbnail img { transform: scale(1.04); }
}

/* nome: colore in evidenza, tipo e formato piccoli sopra */
.kx-card.kx-named .k-product-title a { display: block; text-decoration: none; }
.kx-card .kx-name { display: flex; flex-direction: column; gap: 3px; }
.kx-card .kx-kind {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--kx-muted);
}
.kx-card .kx-color {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--kx-ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.kx-card.kx-named .k-product-title a:hover .kx-color { color: var(--kx-plum); }

/* niente "Vedi": si clicca la foto o il nome */
.kx-card .k-product-view { display: none !important; }
.kx-card .k-product-purchase-actions { display: block !important; }
.kx-card .k-product-quick-add { display: block; width: 100%; margin: 0; }
.kx-card .k-product-cart {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  height: 44px;
  padding: 0 12px !important;
  border-radius: 12px !important;
  transition: background-color .15s ease, transform .15s ease;
}
.kx-card .k-product-cart:hover { background-color: var(--kx-plum-dark) !important; }
.kx-card .k-product-cart:active { transform: scale(.98); }
.kx-card .k-product-cart .k-product-cart-label {
  display: inline !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.kx-card .k-product-secondary-actions:empty { display: none; }

/* preferiti: cuoricino sulla foto */
.kx-card .k-product-media .kc-save {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--kx-line) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 2px 8px rgba(45, 38, 39, .10);
  font-size: 0 !important;
  line-height: 1;
  color: var(--kx-plum) !important;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.kx-card .k-product-media .kc-save::before {
  content: "\2661";
  font-size: 21px;
  line-height: 1;
  transform: translateY(1px);
}
.kx-card .k-product-media .kc-save[aria-pressed="true"]::before { content: "\2665"; color: var(--kx-red); }
.kx-card .k-product-media .kc-save:hover { background: #fff !important; transform: scale(1.08); }
.kx-card .k-product-media .kc-save:focus-visible { outline: 3px solid #c99aa9; outline-offset: 2px; }

/* promo sul riquadro: cartellino oro in basso a sinistra della foto */
.kx-card-promo {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--kx-cream);
  box-shadow: inset 0 0 0 1.5px var(--kx-gold), 0 2px 6px rgba(86, 10, 21, .12);
  color: var(--kx-red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .kx-card .kx-color { font-size: 15px; }
  .kx-card .kx-kind { font-size: 9.5px; letter-spacing: .06em; }
  .kx-card .k-product-cart { height: 42px; gap: 6px; }
  .kx-card .k-product-cart .k-product-cart-label { font-size: 13.5px; }
  .kx-card .k-product-media .kc-save { top: 6px !important; right: 6px !important; width: 34px !important; height: 34px !important; }
  .kx-card .k-product-media .kc-save::before { font-size: 19px; }
  .kx-card-promo { left: 6px; bottom: 6px; padding: 4px 7px; font-size: 11px; }
}

/* ================= 2. Categoria da computer: prodotti piu' in alto ================= */
@media (min-width: 768px) {
  body.page-category .k-category-header { margin-bottom: 18px; }
  body.page-category #category-description .kc-description-intro {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  body.page-category #category-description .kc-description-details[open] ~ .kc-description-intro,
  body.page-category #category-description:has(.kc-description-details[open]) .kc-description-intro { display: none; }

  body.page-category #subcategories { margin-top: 12px; }
  body.page-category #subcategories .subcategory-heading { display: none; }
  body.page-category #subcategories .k-subcategory-list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    margin: 0 !important;
  }
  body.page-category #subcategories .k-subcategory-list > li {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.page-category #subcategories .k-subcategory-list > li > a {
    min-height: 38px;
    padding: 7px 14px !important;
    border-radius: 999px;
    font-size: 13.5px;
  }

  /* palette colori: una striscia compatta invece del riquadro grande */
  body.page-category .kc-discovery {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 18px;
    margin: 0 0 22px !important;
    padding: 14px 18px 12px !important;
    border-radius: 18px !important;
  }
  body.page-category .kc-discovery-heading { display: block !important; margin: 0 !important; }
  body.page-category .kc-discovery-heading > div > :not(h2),
  body.page-category .kc-discovery-art,
  body.page-category .kc-discovery-note { display: none !important; }
  body.page-category .kc-discovery-heading h2 {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.2 !important;
  }
  body.page-category .kc-discovery-colors {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    justify-items: center;
    gap: 4px 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.page-category .kc-discovery-colors > li { margin: 0 !important; }
  body.page-category .kc-discovery-color {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 5px !important;
    width: 54px;
    min-height: 0 !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
  }
  body.page-category .kc-discovery-color:focus-visible { outline: 2px solid var(--kx-plum); outline-offset: 1px; }
  body.page-category .kc-discovery-sample {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e6d7de;
    transition: transform .15s ease, box-shadow .15s ease;
  }
  body.page-category .kc-discovery-color:hover .kc-discovery-sample {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--kx-plum);
  }
  body.page-category .kc-discovery-color-copy small { display: none !important; }
  body.page-category .kc-discovery-color-name {
    display: block;
    max-width: 54px;
    font-size: 11px !important;
    line-height: 1.15 !important;
    font-weight: 500;
  }
  body.page-category .kc-discovery-footer { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  body.page-category .kc-discovery-cta {
    min-height: 0 !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }
}

/* ================= 3. Promo smalti ================= */
.kx-promo-pct {
  flex: 0 0 auto;
  font: 700 34px/1 "Kolyne Serif", "Playfair Display", Georgia, serif;
  color: var(--kx-red);
  letter-spacing: -.02em;
}
.kx-dots { display: flex; gap: 5px; }
.kx-dots i {
  display: block;
  width: 26px;
  height: 7px;
  border-radius: 4px;
  background: rgba(86, 10, 21, .14);
  transition: background-color .25s ease;
}
.kx-dots i.on { background: var(--kx-red); }
.kx-done .kx-dots i.on { background: var(--kx-green); }

/* scheda prodotto */
.kx-promo-badge {
  margin: 2px 0 18px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--kx-cream), #f7e6e9);
  box-shadow: inset 0 0 0 1.5px var(--kx-gold);
  color: var(--kx-wine);
}
.kx-promo-head { display: flex; align-items: center; gap: 14px; }
.kx-promo-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kx-promo-main { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.kx-promo-note { font-size: 13px; line-height: 1.35; color: #6b2a33; }
.kx-promo-cart {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(86, 10, 21, .14);
  font-size: 13.5px;
  font-weight: 600;
}
.kx-promo-cart[hidden] { display: none; }
.kx-promo-badge.kx-done .kx-promo-cart-text { color: var(--kx-green); }

/* carrello */
.kx-cart-promo {
  margin: 0 1.25rem 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--kx-cream), #f7e6e9);
  box-shadow: inset 0 0 0 1.5px var(--kx-gold);
  color: var(--kx-wine);
}
.kx-cart-promo[hidden] { display: none; }
.kx-cart-promo-head { display: flex; align-items: center; gap: 14px; }
.kx-cart-promo .kx-promo-pct { font-size: 32px; }
.kx-cart-promo-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.kx-cart-promo-text { font-size: 15px; font-weight: 600; line-height: 1.35; }
.kx-cart-promo.kx-done { background: linear-gradient(120deg, #eef7f0, #f4f8ef); box-shadow: inset 0 0 0 1.5px #9fcfb0; }
.kx-cart-promo.kx-done .kx-promo-pct { color: var(--kx-green); }
.kx-cart-promo.kx-done .kx-cart-promo-text { color: #1f5a37; }
.kx-cart-promo.kx-done .kx-cart-promo-text::before { content: "\2713\00a0"; font-weight: 700; }
.kx-cart-promo-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--kx-plum) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
.kx-cart-promo-link:hover { color: var(--kx-red) !important; }

@media (max-width: 767.98px) {
  .kx-promo-badge { padding: 12px 14px; }
  .kx-promo-head, .kx-cart-promo-head { gap: 12px; }
  .kx-promo-pct, .kx-cart-promo .kx-promo-pct { font-size: 29px; }
  .kx-promo-main { font-size: 14.5px; }
  .kx-promo-note { font-size: 12.5px; }
  .kx-cart-promo { margin: 0 .75rem 12px; padding: 12px 14px; }
  .kx-cart-promo-text { font-size: 14px; }
  .kx-dots i { width: 22px; }
}
/* ---------- Home: palette colori compatta (da tablet in su) ---------- */
@media (min-width: 768px) {
  body#index .kc-home-discovery .kc-discovery { padding: 22px 26px !important; }
  body#index .kc-home-discovery .kc-discovery-heading { gap: 16px !important; margin-bottom: 14px !important; align-items: center !important; }
  body#index .kc-home-discovery .kc-discovery-heading h2 { font-size: 28px !important; line-height: 1.15 !important; margin: 2px 0 4px !important; }
  body#index .kc-home-discovery .kc-discovery-eyebrow { margin-bottom: 4px !important; }
  body#index .kc-home-discovery .kc-discovery-intro { margin: 0 !important; }
  body#index .kc-home-discovery .kc-discovery-hint { display: none !important; }
  body#index .kc-home-discovery .kc-discovery-art { transform: scale(.55); transform-origin: right center; height: 72px !important; margin: 0 !important; }
  body#index .kc-home-discovery .kc-discovery-colors {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)) !important;
    gap: 8px !important;
    margin: 0 0 14px !important;
  }
  body#index .kc-home-discovery .kc-discovery-color {
    padding: 7px 9px !important;
    gap: 8px !important;
    min-height: 0 !important;
    border-radius: 12px !important;
  }
  body#index .kc-home-discovery .kc-discovery-sample { width: 22px !important; height: 30px !important; flex: 0 0 22px !important; }
  body#index .kc-home-discovery .kc-discovery-color-name { font-size: 13px !important; line-height: 1.2 !important; }
  body#index .kc-home-discovery .kc-discovery-color-copy small { font-size: 11px !important; line-height: 1.2 !important; }
  body#index .kc-home-discovery .kc-discovery-footer { margin: 0 !important; }
}

/* ---------- Home: banner di Natale (modulo kolynenatale) senza scorrimento laterale sui tablet ---------- */
@media (min-width: 768px) and (max-width: 1100px) {
  body#index .kn-banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; max-width: 100% !important; }
}

/* ---------- Home: palette colori compatta sul telefono ---------- */
@media (max-width: 767.98px) {
  body#index .kc-home-discovery .kc-discovery { padding: 18px 14px !important; }
  body#index .kc-home-discovery .kc-discovery-heading { margin-bottom: 12px !important; }
  body#index .kc-home-discovery .kc-discovery-heading h2 { font-size: 26px !important; line-height: 1.15 !important; margin: 2px 0 6px !important; }
  body#index .kc-home-discovery .kc-discovery-intro { margin: 0 !important; font-size: 14.5px !important; }
  body#index .kc-home-discovery .kc-discovery-hint,
  body#index .kc-home-discovery .kc-discovery-note,
  body#index .kc-home-discovery .kc-discovery-color-copy small { display: none !important; }
  body#index .kc-home-discovery .kc-discovery-colors { gap: 7px !important; margin-bottom: 14px !important; }
  body#index .kc-home-discovery .kc-discovery-color { padding: 8px 4px !important; gap: 5px !important; min-height: 0 !important; border-radius: 12px !important; justify-content: center !important; }
  body#index .kc-home-discovery .kc-discovery-color-name { font-size: 12.5px !important; line-height: 1.2 !important; }
  body#index .kc-home-discovery .kc-discovery-footer { margin: 0 !important; gap: 0 !important; }
}
