/* ------------------------------------------------------------------
   GenussDepot clone - additions on top of the original Tailwind bundle.
   Only classes that do not exist in style.css live here, so the
   original design language stays untouched.
   ------------------------------------------------------------------ */

:root {
  --koro-cart: #97c274;
  --koro-cart-hover: #86b062;
  --koro-cart-active: #759a55;
  --koro-ink: #000;
  --koro-gray: #666;
  --koro-light-gray: #f3f3f3;
  --koro-border: #38373499;
  --koro-secondary: #3837340d;
  --koro-radius: 0.5rem;
}

/* loading placeholders left over from the SSR payload */
.ui-skeleton {
  display: none !important;
}

/* ------------------------------------------------------------------
   Utility classes used by the clone that the original JIT bundle
   never emitted (they are not used by GenussDepot itself).
   Values follow the Tailwind defaults.
   ------------------------------------------------------------------ */
.min-w-\[18px\] { min-width: 18px; }
.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.size-4 { width: 1rem; height: 1rem; }
.size-16 { width: 4rem; height: 4rem; }
.max-w-3xl { max-width: 48rem; }
.pb-16 { padding-bottom: 4rem; }

/* ------------------------------------------------------------------
   product gallery
   The SSR markup ships the mobile variant (horizontal thumbnail strip
   below the main image). The live app re-renders it as a vertical
   column at the `xl` breakpoint. A static page cannot re-render, so the
   desktop variant is re-created here with media queries.
   ------------------------------------------------------------------ */
@media (min-width: 1280px) {
  /* the strip becomes a narrow column that matches the main image height
     (the original measures it with JS and writes an inline pixel height) */
  .product-gallery > ul.shrink-0 {
    height: auto;
    align-self: stretch;
  }

  .product-gallery > ul.shrink-0 .carousel {
    height: 100%;
    margin-right: 0;
  }

  .product-gallery > ul.shrink-0 .carousel__wrapper {
    height: 100%;
  }

  .product-gallery > ul.shrink-0 .carousel__content {
    height: 100%;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* thumbnails are stacked, so the gap moves from the right to the bottom */
  .product-gallery > ul.shrink-0 .carousel__item {
    padding: 0 0 4px 0;
  }

  .product-gallery > ul.shrink-0 .carousel__item.\!pr-0 {
    padding-bottom: 0;
  }

  /* the mobile pair of side arrows collapses into one bottom chevron */
  .product-gallery > ul.shrink-0 button[aria-label="Vorheriges Element"] {
    display: none !important;
  }

  .product-gallery > ul.shrink-0 button[aria-label="Nächstes Element"] {
    top: auto !important;
    bottom: 0.5rem !important;
    left: 50% !important;
    right: -0.5rem !important;
    transform: translateX(-50%) !important;
    width: 3rem !important;
    height: 1.5rem !important;
  }

  .product-gallery > ul.shrink-0 button[aria-label="Nächstes Element"] svg {
    transform: rotate(90deg);
  }
}

/* hide the horizontal scrollbar on the thumbnail strip */
.product-gallery > ul.shrink-0 .carousel__content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ------------------------------------------------------------------
   mobile product-tab accordion

   The original collapses the product tabs into an accordion below `md`
   (chevron + teaser paragraph on the active tab). This build ships a
   real tab switcher instead (see initTabs in shop.js), so both markers
   stay hidden on every breakpoint.
   ------------------------------------------------------------------ */
.koro-acc-chevron,
.koro-acc-body {
  display: none;
}

/* ------------------------------------------------------------------
   PDP review panel (Bewertungen) — grid + cards in homepage style
   ------------------------------------------------------------------ */
.koro-reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.koro-review-card {
  border: 1px solid #f0f0f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: #fff;
  align-self: start;
}

.koro-review-card .koro-star-empty {
  color: #d1d5db;
}

/* wishlist toggle added back by the builder */
[data-koro-wish] {
  cursor: pointer;
}

[data-koro-wish] svg {
  transition: transform 0.15s ease, fill 0.15s ease;
}

[data-koro-wish].is-active svg {
  fill: #a41034;
  stroke: #a41034;
}

[data-koro-wish].is-active {
  color: #a41034;
}

/* ------------------------------------------------------------------
   catalogue filter chips
   ------------------------------------------------------------------ */
.catalog-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--koro-border);
  border-radius: 9999px;
  background: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--koro-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.catalog-chip:hover {
  border-color: var(--koro-ink);
}

.catalog-chip.is-active {
  background: var(--koro-ink);
  border-color: var(--koro-ink);
  color: #fff;
}

.catalog-chip.is-active:hover {
  background: #222;
}

.catalog-item.is-hidden {
  display: none;
}

/* ------------------------------------------------------------------
   cart rows
   ------------------------------------------------------------------ */
.cart-item__image {
  width: 100%;
  border-radius: var(--koro-radius);
  background: #fff;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--koro-border);
  border-radius: var(--koro-radius);
  overflow: hidden;
  background: #fff;
}

.qty-control__btn {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  background: #fff;
  color: var(--koro-ink);
  border: 0;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.qty-control__btn:hover {
  opacity: 0.6;
}

.qty-control__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-control__value {
  min-width: 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.cart-item__remove {
  font-size: 0.8125rem;
  color: var(--koro-gray);
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.cart-item__remove:hover {
  color: var(--koro-ink);
}

/* ------------------------------------------------------------------
   checkout order overview (grid aligned with the headline row)
   ------------------------------------------------------------------ */
.summary-head,
.summary-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 3.5rem 7rem 7rem;
  align-items: center;
  gap: 1rem;
}

.summary-head {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--koro-light-gray);
  font-family: Outfit, ui-serif, Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.summary-head > :nth-child(2),
.summary-head > :nth-child(3) {
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.summary-head > :nth-child(4),
.summary-head > :nth-child(5) {
  text-align: right;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.summary-row {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--koro-light-gray);
}

.summary-row__img {
  width: 4rem;
  height: 4rem;
  border-radius: var(--koro-radius);
  object-fit: cover;
  background: #fff;
}

.summary-row__qty {
  text-align: center;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.summary-row__price {
  text-align: right;
  font-size: 0.875rem;
  color: var(--koro-gray);
  white-space: nowrap;
}

.summary-row__sum {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .summary-head {
    display: none;
  }

  .summary-row {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "img name sum"
      "img qty price";
    row-gap: 0.25rem;
  }

  .summary-row__img { grid-area: img; }
  .summary-row__name { grid-area: name; }
  .summary-row__qty { grid-area: qty; text-align: left; }
  .summary-row__price { grid-area: price; }
  .summary-row__sum { grid-area: sum; }
}

/* ------------------------------------------------------------------
   checkout forms
   ------------------------------------------------------------------ */
.checkout-input {
  width: 100%;
  border: 1px solid var(--koro-border);
  border-radius: var(--koro-radius);
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--koro-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-input::placeholder {
  color: #9ca3af;
}

.checkout-input:focus {
  outline: none;
  border-color: var(--koro-ink);
  box-shadow: 0 0 0 1px var(--koro-ink);
}

.checkout-input.is-invalid {
  border-color: #a41034;
  box-shadow: 0 0 0 1px #a41034;
}

.checkout-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--koro-border);
  border-radius: var(--koro-radius);
  background: #fff;
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.checkout-option:hover {
  border-color: var(--koro-ink);
}

.checkout-option:has(input:checked) {
  border-color: var(--koro-ink);
  box-shadow: inset 0 0 0 1px var(--koro-ink);
}

.checkout-option span:first-of-type {
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------
   feedback
   ------------------------------------------------------------------ */
.koro-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 60;
  transform: translate(-50%, 1.5rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(92vw, 26rem);
  border-radius: var(--koro-radius);
  background: var(--koro-ink);
  color: #fff;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.koro-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.koro-toast__thumb {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  object-fit: cover;
  background: #fff;
}

.koro-empty-note {
  border: 1px solid var(--koro-border);
  border-radius: var(--koro-radius);
  padding: 2rem;
  text-align: center;
  color: var(--koro-gray);
}

/* product-card cart button affordance for the static clone */
.product-card [data-koro-add] {
  cursor: pointer;
}

.product-card [data-koro-add]:active {
  transform: scale(0.94);
}

/* order confirmation overlay on the checkout page */
.koro-order-done {
  border: 1px solid var(--koro-border);
  border-radius: var(--koro-radius);
  background: var(--koro-secondary);
  padding: 2rem;
  text-align: center;
}

.koro-order-done__icon {
  color: #026833;
  margin: 0 auto 1rem;
}

/* ------------------------------------------------------------------
   footer panel

   The footer navigation and the bottom bar are wrapped in `.koro-footer`
   by the builder so they share one surface. The client asked for a footer
   only a shade darker than white - not a dark panel - so this is a warm
   off-white that still separates the footer from the page.
   ------------------------------------------------------------------ */
.koro-footer {
  margin: 3rem -1rem 0;
  padding: 2.5rem 1rem 0;
  background: #f5f4f1;
  color: #333230;
}

.koro-footer footer {
  margin-bottom: 0;
}

.koro-footer a {
  color: inherit;
}

.koro-footer a:hover {
  color: #000;
}

.koro-footer .footer__bar {
  margin: 2.5rem 0 0;
  padding: 1.25rem 0 1.5rem;
  background: transparent;
  color: #6b675f;
}

.koro-footer .text-text-gray {
  color: #6b675f;
}

/* ------------------------------------------------------------------
   checkout - narrow sticky order panel

   The order rows use a five-column table on the cart page, which is too
   wide for the ~40% sidebar. Inside `.checkout-panel` they collapse to a
   two-line card: image + name + sum on top, quantity + unit price below.
   ------------------------------------------------------------------ */
.checkout-panel .summary-head {
  display: none;
}

.checkout-panel .summary-row {
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  grid-template-areas:
    "img name sum"
    "img qty price";
  row-gap: 0.25rem;
  column-gap: 0.75rem;
  padding: 0.75rem 0;
}

.checkout-panel .summary-row__img {
  grid-area: img;
  width: 3rem;
  height: 3rem;
}

.checkout-panel .summary-row__name { grid-area: name; }
.checkout-panel .summary-row__qty { grid-area: qty; text-align: left; }
.checkout-panel .summary-row__price { grid-area: price; }
.checkout-panel .summary-row__sum { grid-area: sum; }

.checkout-panel #checkout-items > .summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* ------------------------------------------------------------------
   checkout - restore breathing room between the form and order panel

   The hand-built checkout used responsive arbitrary Tailwind widths and
   gap utilities that are not present in the original JIT bundle. Without
   them, both flex children fell back to 50% and touched edge-to-edge.
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .checkout-confirm {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
    column-gap: clamp(2rem, 3.5vw, 3.5rem);
    align-items: start;
  }

  .checkout-confirm__form,
  .checkout-confirm__summary {
    width: auto !important;
    min-width: 0;
  }

  .checkout-confirm__summary {
    margin-top: 0;
  }
}

/* ------------------------------------------------------------------
   PDP gallery: active thumbnail marker (base styles only ship :hover)
   ------------------------------------------------------------------ */
.product-gallery li::after {
  border-color: transparent !important;
}

.product-gallery .carousel__item.is-active li::after {
  border-color: #000 !important;
}
