/* ==========================================================================
   Single Product Template Styles
   Customized according to Anverally Tea Product Page Mockup
   ========================================================================== */

.single-product-main {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

/* --------------------------------------------------------------------------
   1. Breadcrumb Navigation
   -------------------------------------------------------------------------- */
.anverally-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666666;
  margin-bottom: 1.75rem;
}

.anverally-breadcrumb a {
  color: #666666;
  text-decoration: none;
  transition: color var(--transition-speed, 0.25s) ease;
}

.anverally-breadcrumb a:hover {
  color: var(--color-primary, #c41e28);
}

.anverally-breadcrumb .bc-sep {
  color: #999999;
  font-size: 0.875rem;
  user-select: none;
}

.anverally-breadcrumb .bc-brand {
  color: #666666;
}

.anverally-breadcrumb .bc-current {
  color: #d32f2f;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   2. Main 2-Column Top Layout
   -------------------------------------------------------------------------- */
.single-product-top-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

/* --------------------------------------------------------------------------
   3. Left Column: Product Gallery Card
   -------------------------------------------------------------------------- */
.product-gallery-card {
  background-color: #f7f6f2;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 2.5rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 100px;
}

.product-main-view {
  width: 100%;
  max-height: 480px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
}

.product-main-view.product-zoom-enabled {
  cursor: zoom-in;
}

.product-main-view img {
  max-width: 100%;
  max-height: 450px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transform-origin: center center;
  transition: transform 0.15s ease-out, opacity 0.25s ease;
  pointer-events: none;
  user-select: none;
}

.product-main-view.is-zoomed {
  cursor: crosshair;
}

.product-gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 360px;
  color: #8c8b82;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Thumbnail Selector (Clean Centered Row) */
.product-thumbs-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.product-thumbs-track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 4px;
}

.product-thumbs-track::-webkit-scrollbar {
  display: none;
}

.thumb-btn {
  width: 66px;
  height: 66px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  border-radius: 6px;
  padding: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.thumb-btn:hover {
  border-color: #999999;
}

.thumb-btn.is-active {
  border: 2px solid #d32f2f !important;
  box-shadow: 0 0 0 1px rgba(211, 47, 47, 0.2);
}

/* --------------------------------------------------------------------------
   4. Right Column: Product Summary Card
   -------------------------------------------------------------------------- */
.product-summary-card {
  display: flex;
  flex-direction: column;
}

/* Brand Tag */
.product-brand-label {
  color: #1b7a53;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

/* Product Title */
.product-main-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111111;
  line-height: 1.2;
  margin: 0 0 0.65rem 0;
}

/* Price */
.product-main-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #d32f2f;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.product-main-price + .anverally-cart-form {
  margin-top: 0.15rem;
}

.product-main-price del {
  color: #888888;
  font-weight: 400;
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.product-main-price ins {
  text-decoration: none;
  color: #d32f2f;
}

/* Short Description */
.product-short-desc {
  color: #555555;
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.product-short-desc p {
  margin-bottom: 0;
}

/* Product Details Spec Box */
.product-details-spec-box {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.spec-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 0.85rem 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-top: 1px solid #f0f0f0;
}

.spec-table tr:first-child {
  border-top: none;
}

.spec-table td {
  padding: 0.6rem 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.spec-table .spec-label {
  color: #333333;
  font-weight: 500;
  width: 50%;
}

.spec-table .spec-value {
  color: #111111;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Variation / Option Selectors
   -------------------------------------------------------------------------- */
.anverally-variations {
  margin-bottom: 0.85rem;
}

.anverally-variations-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 0.85rem 0;
}

.anverally-variation-row {
  margin-bottom: 0.95rem;
}

.anverally-variation-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.anverally-variation-label label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #333333;
  margin: 0;
}

.anverally-variation-chosen {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #c41e28;
}

.anverally-variation-chosen:not(:empty)::before {
  content: "— ";
  color: #999999;
}

.anverally-variation-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.anverally-swatch {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  background-color: #ffffff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  color: #222222;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.anverally-swatch:hover:not(:disabled):not(.is-disabled) {
  border-color: #999999;
  background-color: #fafafa;
}

.anverally-swatch.is-selected {
  border-color: #c41e28;
  background-color: #fff5f5;
  color: #c41e28;
  box-shadow: 0 0 0 1px rgba(196, 30, 40, 0.18);
}

.anverally-swatch.is-disabled,
.anverally-swatch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  box-shadow: none;
}

.anverally-variation-select select {
  width: 100%;
  height: 44px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  padding: 0 0.85rem;
  font-size: 0.9375rem;
  color: #111111;
  background-color: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555555' d='M1.4.8 6 5.4 10.6.8 12 2.2 6 8 0 2.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}

.anverally-variations.has-swatches .anverally-variation-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.anverally-variations:not(.has-swatches) .anverally-variation-swatches {
  display: none;
}

.anverally-cart-form .reset_variations {
  display: inline-block;
  margin-top: 0.15rem;
  color: #c41e28;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.anverally-cart-form .reset_variations:hover {
  text-decoration: underline;
}

.anverally-variation-hint {
  margin: 0 0 0.85rem 0;
  font-size: 0.8125rem;
  color: #666666;
}

.anverally-cart-form.is-variation-selected .anverally-variation-hint {
  display: none;
}

.anverally-cart-form .woocommerce-variation {
  margin-bottom: 0.85rem;
}

.anverally-cart-form .woocommerce-variation-price {
  display: none;
}

.anverally-cart-form .woocommerce-variation-availability .stock {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.anverally-cart-form .woocommerce-variation-availability .in-stock {
  color: #1b7a53;
}

.anverally-cart-form .woocommerce-variation-availability .out-of-stock {
  color: #c41e28;
}

.anverally-cart-form .woocommerce-variation-description {
  font-size: 0.875rem;
  color: #555555;
  margin-bottom: 0.5rem;
}

.product-summary-card .stock.out-of-stock,
.anverally-cart-form .stock.out-of-stock {
  margin: 0 0 1.25rem 0;
  padding: 0.75rem 1rem;
  background-color: #fff5f5;
  border: 1px solid #f3c6c6;
  border-radius: 6px;
  color: #c41e28;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Purchase Action Row (Quantity + ADD TO BASKET) */
.anverally-cart-form {
  margin-bottom: 1.5rem;
}

.purchase-action-row {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
}

/* Quantity Picker */
.qty-picker,
.anverally-cart-form .qty-picker.quantity {
  display: inline-flex;
  align-items: center;
  float: none;
  margin: 0;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  height: 48px;
  background-color: #ffffff;
  overflow: hidden;
}

.qty-control-btn {
  width: 42px;
  height: 100%;
  background: none;
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  user-select: none;
}

.qty-control-btn:hover {
  background-color: #f4f4f4;
}

.qty-num {
  width: 44px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}

.qty-num::-webkit-outer-spin-button,
.qty-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ADD TO BASKET Button */
.btn-add-basket {
  flex: 1;
  height: 48px;
  background-color: #c41e28 !important;
  color: #ffffff !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer !important;
  padding: 0 1.75rem !important;
  transition: background-color 0.25s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-add-basket:hover,
.btn-add-basket:focus {
  background-color: #a81a22 !important;
}

.btn-add-basket:disabled,
.btn-add-basket.disabled,
.btn-add-basket.wc-variation-selection-needed,
.btn-add-basket.wc-variation-is-unavailable {
  background-color: #c9c9c9 !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
  opacity: 1;
}

/* Product Meta Box (SKU, Category, Brand) */
.product-meta-card {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.meta-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 0;
  border-top: 1px solid #f0f0f0;
  font-size: 0.9375rem;
}

.meta-item:first-child {
  border-top: none;
}

.meta-key {
  color: #333333;
  font-weight: 600;
  min-width: 140px;
}

.meta-val {
  color: #111111;
  flex: 1;
}

.meta-val.meta-link a {
  color: #d32f2f;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.meta-val.meta-link a:hover {
  text-decoration: underline;
}

/* Trust Badges Card */
.product-trust-badges-card {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.75rem;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-text {
  display: flex;
  flex-direction: column;
  font-size: 0.8125rem;
  line-height: 1.25;
  color: #333333;
}

.trust-text strong {
  font-weight: 700;
  color: #111111;
}

/* --------------------------------------------------------------------------
   5. Bottom Tabs Section (Description, Additional Information, Reviews)
   -------------------------------------------------------------------------- */
.single-product-tabs-wrapper {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.anverally-tabs-nav {
  display: flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid #e5e5e5;
}

.tab-nav-btn {
  padding: 0.75rem 1.5rem;
  background-color: #fafafa;
  border: 1px solid #e5e5e5;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #444444;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.25rem;
  outline: none;
}

.tab-nav-btn:hover {
  background-color: #f0f0f0;
  color: #111111;
}

.tab-nav-btn.is-active {
  background-color: #ffffff;
  color: #c41e28;
  border-color: #e5e5e5;
  border-top: 2px solid #c41e28;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}

.anverally-tabs-container {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0 0 8px 8px;
  padding: 2rem;
  min-height: 140px;
}

.tab-pane {
  display: none;
  line-height: 1.75;
  color: #444444;
}

.tab-pane.is-active {
  display: block;
  animation: tabFadeIn 0.25s ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   6. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .single-product-top-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .product-gallery-card {
    position: static;
  }

  .product-main-title {
    font-size: 1.875rem;
  }
}

@media (max-width: 600px) {
  .product-gallery-card {
    padding: 1.5rem 1rem;
  }

  .product-main-view {
    max-height: 320px;
  }

  .product-main-view img {
    max-height: 300px;
  }

  .purchase-action-row {
    flex-direction: column;
  }

  .qty-picker {
    width: 100%;
    justify-content: space-between;
  }

  .qty-num {
    flex: 1;
  }

  .product-trust-badges-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .tab-nav-btn {
    padding: 0.6rem 0.85rem;
    font-size: 0.8125rem;
  }
}
