/* ==========================================================================
   KMS — Product Page Missing Styles Fix
   Generated from _product.scss + _components.scss (SCSS variables resolved)
   ========================================================================== */

/* ── Stock Urgency Indicators ── */
.stock-urgency {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: 0.25rem;
  animation: urgencyPulse 2s ease-in-out infinite;
}

.stock-urgency--critical {
  background: #f8d7da;
  color: #b71c1c;
  border: 1px solid #f1aeb5;
}

.stock-urgency--low {
  background: #fff3cd;
  color: #b45309;
  border: 1px solid #ffe69c;
}

.stock-urgency__icon {
  font-size: 1.1em;
  display: inline-flex;
}

@keyframes urgencyPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ── Product Trust Badges ── */
.product-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd9d6;
}

.product-trust__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b645e;
}

.product-trust__icon {
  font-size: 1.25rem;
  display: inline-flex;
  color: #975136;
}

/* ── Product Tabs ── */
.product-tabs {
  margin-top: 3rem;
  border-top: 1px solid #ddd9d6;
}

.product-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #ddd9d6;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.product-tabs__btn {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #8a837d;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.product-tabs__btn:hover {
  color: #282c34;
}

.product-tabs__btn--active {
  color: #975136;
  border-bottom-color: #975136;
  font-weight: 600;
}

.product-tabs__panel {
  padding: 1.5rem 0;
  display: none;
  animation: fadeTabIn 0.35s ease;
}

.product-tabs__panel--active {
  display: block;
}

@keyframes fadeTabIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Sticky Add-to-Cart Bar ── */
.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  background: #ffffff;
  border-top: 1px solid #eeeceb;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-atc--visible {
  transform: translateY(0);
}

.sticky-atc__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.sticky-atc__info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.sticky-atc__image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.sticky-atc__name {
  font-weight: 600;
  color: #282c34;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
}

.sticky-atc__price {
  font-weight: 700;
  color: #975136;
  font-size: 1.125rem;
  white-space: nowrap;
}

.sticky-atc__btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .sticky-atc__name { display: none; }
  .sticky-atc__image { width: 40px; height: 40px; }
}

/* ── Recently Viewed Section ── */
.recently-viewed-section {
  margin-top: 2rem;
}

.recently-viewed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.recently-viewed__card {
  text-decoration: none;
  color: #282c34;
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease-in-out;
}

.recently-viewed__card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.recently-viewed__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.recently-viewed__info {
  padding: 0.5rem;
}

.recently-viewed__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.recently-viewed__price {
  font-size: 0.875rem;
  font-weight: 700;
  color: #975136;
}

.recently-viewed__price--sale {
  color: #d32f2f;
}

.recently-viewed__old-price {
  font-size: 0.8rem;
  color: #8a837d;
  text-decoration: line-through;
  margin-right: 0.25rem;
}

/* ── Upsell / Cross-sell Section ── */
.upsell-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd9d6;
}

.upsell-section h3 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  margin-bottom: 1rem;
}

/* ── Product Description (extra) ── */
.product-description {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd9d6;
}

.product-description h2 {
  margin-bottom: 1rem;
}

/* ── Section Prose ── */
.section--prose {
  line-height: 1.7;
  color: #4d4843;
}

.section--prose h2,
.section--prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #282c34;
}

.section--prose ul,
.section--prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.section--prose li {
  margin-bottom: 0.5rem;
}

.section--prose p {
  margin-bottom: 1rem;
}

.section--prose strong {
  font-weight: 600;
  color: #282c34;
}

/* ── Product Specs DL (tab variant) ── */
.product-specs__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
}

.product-specs__dl dt {
  font-weight: 500;
  color: #6b645e;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-specs__dl dd {
  color: #282c34;
  margin: 0;
}

/* ── Quantity Selector Improvements ── */
.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quantity-selector label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b645e;
}

.quantity-selector__input {
  width: 70px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd9d6;
  border-radius: 0.25rem;
  font-size: 1rem;
  text-align: center;
}

.quantity-selector__input:focus {
  outline: none;
  border-color: #975136;
  box-shadow: 0 0 0 3px rgba(151, 81, 54, 0.15);
}

/* ── Stock Badges (simple) ── */
.stock {
  font-size: 0.875rem;
  font-weight: 600;
}

.stock--in {
  color: #2e7d32;
}

.stock--out {
  color: #d32f2f;
}

/* ── Back-in-stock Alert Button ── */
.btn--stock-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ── Product Detail Layout Responsive Fix ── */
@media (max-width: 768px) {
  .product-detail__layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-trust {
    grid-template-columns: 1fr;
  }

  .product-tabs__btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .recently-viewed__grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 576px) {
  .product-info__price {
    flex-wrap: wrap;
  }

  .product-info__cart {
    flex-direction: column;
    align-items: stretch;
  }

  .product-info__cart .btn {
    width: 100%;
  }

  .sticky-atc__inner {
    padding: 0.75rem 1rem;
  }
}

/* ==========================================================================
   Confirmation Page — Download Devis Section
   ========================================================================== */

.confirmation__download {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f7f6f5;
  border-radius: 0.5rem;
  border: 2px dashed #975136;
  text-align: center;
}

.confirmation__download .btn {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  padding: 0.75rem 2rem;
}

.confirmation__download .btn svg {
  flex-shrink: 0;
}

/* WhatsApp button style */
.btn--whatsapp {
  background-color: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.btn--whatsapp:hover {
  background-color: #1da851;
  border-color: #1da851;
  color: #ffffff;
}
