/* Product page — Knuspr-style layout */

/* ═══════ PRODUCT LAYOUT ═══════ */
.pdp {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.pdp__grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .pdp__grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ═══════ IMAGE COLUMN ═══════ */
.pdp__gallery {
  position: relative;
}

.pdp__image-main {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp__image-main img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.pdp__image-main--empty {
  font-size: 4rem;
  color: var(--c-text-muted);
}

.pdp__image-zoom {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.pdp__image-zoom:hover { box-shadow: var(--shadow-md); }

/* ═══════ INFO COLUMN ═══════ */
.pdp__info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pdp__name {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .35rem;
}

.pdp__weight {
  font-size: .9rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.pdp__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}

.pdp__badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pdp__badge--bio { background: #d4edda; color: #155724; }
.pdp__badge--new { background: var(--c-primary); color: #fff; }
.pdp__badge--supplier { background: var(--c-accent-light); color: var(--c-accent); }

/* ═══════ PRICING ═══════ */
.pdp__pricing {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.pdp__price-label {
  font-size: .8rem;
  color: var(--c-text-muted);
}

.pdp__price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--c-text);
}

.pdp__price-per {
  font-size: .85rem;
  color: var(--c-text-muted);
}

.pdp__price-old {
  font-size: 1rem;
  color: var(--c-text-muted);
  text-decoration: line-through;
}

/* ═══════ BUY BUTTON ═══════ */
.pdp__buy-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  max-width: 400px;
}

.pdp__buy {
  flex: 1;
  min-width: 180px;
  padding: .85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.pdp__buy:hover { background: var(--c-primary-dark); transform: translateY(-1px); }

.pdp__fav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: #fff;
  color: #8a8f94;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.pdp__fav:hover { box-shadow: var(--shadow-md); color: #c41e3a; }
.pdp__fav--on {
  color: #c41e3a;
  background: #fff5f6;
  border-color: #f0c4cc;
}
.pdp__fav--on svg { fill: currentColor; }

/* ═══════ DELIVERY INFO ═══════ */
.pdp__delivery {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.pdp__delivery-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
}

.pdp__delivery-row svg { flex-shrink: 0; color: var(--c-primary); }

/* ═══════ XTRA BANNER ═══════ */
.pdp__xtra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.pdp__xtra-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.pdp__xtra-badge {
  font-size: .7rem;
  font-weight: 800;
  padding: .2rem .5rem;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.pdp__xtra-price {
  font-size: 1rem;
  font-weight: 700;
}

.pdp__xtra-label { font-size: .8rem; }

.pdp__xtra-btn {
  padding: .4rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  background: #fff;
  color: var(--c-accent);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.pdp__xtra-btn:hover { background: var(--c-accent-light); }

/* ═══════ CATEGORY + COUNTRY ═══════ */
.pdp__meta {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}

.pdp__meta-label { font-weight: 600; color: var(--c-text); }
.pdp__meta a { color: var(--c-primary); }
.pdp__meta a:hover { text-decoration: underline; }

/* ═══════ ALLERGY WARNING ═══════ */
.pdp-allergy {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  margin: .5rem 0 1rem;
  background: #fff5f5;
  border: 1.5px solid #ff9a8d;
  border-left: 4px solid #d63828;
  border-radius: 10px;
  color: #6b1d15;
  font-size: .86rem;
  line-height: 1.45;
  position: relative;
}
.pdp-allergy__icon { color: #d63828; flex-shrink: 0; margin-top: 1px; }
.pdp-allergy__body { flex: 1; min-width: 0; }
.pdp-allergy__body strong { color: #6b1d15; font-weight: 700; display: block; margin-bottom: .1rem; }
.pdp-allergy__body p { margin: 0; font-size: .82rem; color: #7a2820; }
.pdp-allergy__body a { color: #6b1d15; text-decoration: underline; font-weight: 600; }
.pdp-allergy__close {
  background: none;
  border: none;
  color: #6b1d15;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0 .15rem;
  margin-top: -2px;
  opacity: .6;
  transition: opacity .15s;
}
.pdp-allergy__close:hover { opacity: 1; }

/* ═══════ ONE-CLICK BUNDLE ═══════ */
.pdp-bundle {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f5faf7 0%, #fff 100%);
}
.pdp-bundle__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .92rem;
  color: var(--c-text);
  margin-bottom: .85rem;
}
.pdp-bundle__head svg { color: var(--c-primary); flex-shrink: 0; }
.pdp-bundle__save {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  background: var(--c-primary);
  padding: .15rem .55rem;
  border-radius: 999px;
  letter-spacing: .01em;
}
.pdp-bundle__items {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.pdp-bundle__item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex: 1 1 140px;
  min-width: 0;
  position: relative;
}
.pdp-bundle__item:hover { border-color: var(--c-primary); }
.pdp-bundle__check {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.6px solid var(--c-border-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.pdp-bundle__check:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.pdp-bundle__check:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.pdp-bundle__check:disabled { opacity: .6; cursor: not-allowed; }
.pdp-bundle__img {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: #f3f3f1;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.pdp-bundle__img img { width: 100%; height: 100%; object-fit: cover; }
.pdp-bundle__info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pdp-bundle__name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdp-bundle__price {
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-top: .15rem;
}
.pdp-bundle__plus {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-primary);
  padding: 0 .1rem;
}
.pdp-bundle__foot {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  padding-top: .85rem;
  border-top: 1px dashed var(--c-border);
}
.pdp-bundle__total { font-size: .88rem; color: var(--c-text); }
.pdp-bundle__total strong { font-weight: 800; color: var(--c-text); }
.pdp-bundle__add {
  margin-left: auto;
  padding: .65rem 1.25rem;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.pdp-bundle__add:hover { background: #176530; }
.pdp-bundle__add:active { transform: scale(.98); }

/* ═══════ AI SUMMARY ACCORDION ═══════ */
.pdp__ai-summary {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.pdp__ai-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1rem;
  background: var(--c-surface);
  border: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
}

.pdp__ai-toggle svg { flex-shrink: 0; color: var(--c-primary); }
.pdp__ai-toggle .chevron {
  margin-left: auto;
  transition: transform var(--transition);
}
.pdp__ai-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.pdp__ai-body {
  display: none;
  padding: 0 1rem 1rem;
  font-size: .85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.pdp__ai-body.open { display: block; }
.pdp__ai-headline {
  color: var(--c-text);
  font-weight: 600;
  font-size: .88rem;
  margin: 0 0 .5rem;
  line-height: 1.45;
}
.pdp__ai-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: grid;
  gap: .35rem;
}
.pdp__ai-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .82rem;
}
.pdp__ai-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #1b6d3d;
  font-weight: 700;
}
.pdp__ai-source {
  font-size: .7rem;
  color: var(--c-text-muted);
  opacity: .7;
  margin: .5rem 0 0;
  font-style: italic;
}
.pdp__ai-loading {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--c-text-muted);
}
.pdp__ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1b6d3d;
  animation: aiDotPulse 1.2s infinite ease-in-out;
}
.pdp__ai-dot:nth-child(2) { animation-delay: .2s; }
.pdp__ai-dot:nth-child(3) { animation-delay: .4s; margin-right: .5rem; }
@keyframes aiDotPulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* ═══════ TABS ═══════ */
.pdp__tabs {
  border-top: 1px solid var(--c-border);
  margin-top: 1rem;
}

.pdp__tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--c-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.pdp__tabs-nav::-webkit-scrollbar { display: none; }

.pdp__tab-btn {
  flex-shrink: 0;
  padding: .85rem 1.25rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.pdp__tab-btn:hover { color: var(--c-text); }
.pdp__tab-btn.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

.pdp__tab-panel {
  display: none;
  padding: 1.5rem 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--c-text);
}
.pdp__tab-panel.active { display: block; }

.pdp__tab-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

/* Nutrition table */
.pdp__nutrition {
  width: 100%;
  max-width: 400px;
  border-collapse: collapse;
  font-size: .85rem;
}

.pdp__nutrition tr { border-bottom: 1px solid var(--c-border); }
.pdp__nutrition td { padding: .5rem 0; }
.pdp__nutrition td:last-child { text-align: right; font-weight: 600; }
.pdp__nutrition .indent { padding-left: 1.25rem; color: var(--c-text-muted); }

/* ═══════ SIMILAR PRODUCTS ═══════ */
.pdp__similar {
  margin-top: .5rem;
}

.pdp__similar .product-row__scroll {
  padding-top: .5rem;
}

/* ═══════ BREADCRUMB ═══════ */
.pdp__breadcrumb {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--c-text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pdp__breadcrumb a { color: var(--c-text-muted); }
.pdp__breadcrumb a:hover { color: var(--c-primary); }
.pdp__breadcrumb .sep { color: var(--c-border); }

/* ═══════ LOADING ═══════ */
.pdp__loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--c-text-muted);
}

.pdp__loading .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: prow-spin .6s linear infinite;
  margin-bottom: .75rem;
}
