/* ==========================================
   PRODUCT SINGLE PAGE - REFERENCE PRODUCT LAYOUT
   Image Left | Info, Actions + Details Right
   ========================================== */

:root {
  --ps-primary: #a63d2f;
  --ps-primary-light: rgba(166, 61, 47, 0.08);
  --ps-primary-glow: rgba(166, 61, 47, 0.15);
  --ps-dark: #1a1a1a;
  --ps-text: #444;
  --ps-text-light: #777;
  --ps-border: #e8e2dc;
  --ps-border-light: #f0eae5;
  --ps-bg: #fcfbfa;
  --ps-card: #fff;
  --ps-gold: #c49b66;
  --ps-gold-dark: #a87d4a;
  --ps-maroon: #742f2f;
  --ps-maroon-dark: #5e2525;
  --ps-star: #f5a623;
  --ps-radius: 16px;
  --ps-radius-sm: 10px;
  --ps-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --ps-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
  --ps-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- ANIMATIONS ---- */
@keyframes premiumFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- SECTION ---- */
.product-single-section {
  padding: 28px 0 80px;
  background-color: #fff;
}

/* ---- TOP CONTAINER ---- */
.product-single-container {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 48px;
  align-items: start;
}

/* ===========================
   LEFT: GALLERY
   =========================== */
.product-single-gallery {
  display: flex;
  gap: 16px;
  min-width: 0;
  position: sticky;
  top: 100px;
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-single-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 76px;
  flex-shrink: 0;
}

.product-single-thumb {
  border: 2px solid transparent;
  border-radius: var(--ps-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--ps-transition);
  background: var(--ps-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.product-single-thumb.active,
.product-single-thumb:hover {
  border-color: var(--ps-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 14px var(--ps-primary-glow);
}

.product-single-thumb img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-single-thumb:hover img {
  transform: scale(1.06);
}

.product-single-main {
  position: relative;
  flex: 1;
  background: transparent;
  cursor: crosshair;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.4s ease;
  aspect-ratio: 1/1;
}

.product-single-main:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.product-single-main img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-single-lens {
  position: absolute;
  width: 120px;
  height: 120px;
  display: none;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.3);
}

.product-single-zoom {
  width: 400px;
  height: 400px;
  position: absolute;
  top: 0;
  right: -420px;
  border: 1px solid var(--ps-border-light);
  border-radius: var(--ps-radius);
  display: none;
  overflow: hidden;
  background-repeat: no-repeat;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
  z-index: 99;
  background-color: var(--ps-card);
}

.product-single-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #27ae60;
  margin-bottom: 16px;
  padding: 6px 4px;
  /* background: rgba(39, 174, 96, 0.08); */
  border-radius: 6px;
}

.product-single-stock i {
  font-size: 14px;
}

.product-single-stock.ps-out-of-stock {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

/* ===========================
   OPTIONS / FORMS (Prevent Overflow)
   =========================== */
.form-select,
[id^="input-option-"] {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===========================
   RADIO OPTIONS (PACK SIZE)
   =========================== */
.btn-check:checked + .btn-outline-secondary {
  background-color: #c96b3c !important;
  border-color: #c96b3c !important;
  color: #fff !important;
}

.btn-outline-secondary:hover {
  background-color: rgba(201, 107, 60, 0.1) !important;
  border-color: #c96b3c !important;
  color: #c96b3c !important;
}

/* ===========================
   RIGHT: PRODUCT INFO
   =========================== */
.product-single-info {
  animation: premiumFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
  padding: 2px 0;
}

/* Brand Badge */
.ps-brand-badge {
  margin-bottom: 10px;
}

.ps-brand-badge a {
  display: inline-block;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0;
  border-radius: 0;
  text-decoration: none;
  transition: var(--ps-transition);
  border: none;
}

.ps-brand-badge a:hover {
  background: transparent;
  color: #111;
  box-shadow: none;
}

/* Title */
.product-single-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.35;
  color: var(--ps-dark);
  letter-spacing: 0;
}

/* Rating Row */
.ps-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ps-stars {
  color: var(--ps-star);
  font-size: 15px;
  display: flex;
  gap: 2px;
}

.ps-rating-text {
  font-size: 13px;
  color: var(--ps-text-light);
}

/* Price Box */
.product-single-price-box {
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.product-single-price {
  font-size: 26px;
    color: #8b3a3a;
    font-weight: 700;
}

.product-single-old {
  font-size: 18px;
  color: #aaa;
  text-decoration: line-through;
}

/* Discount Card */
.ps-discount-card {
  background: linear-gradient(135deg, #fef9f0, #fff7eb);
  border: 1px solid #f0e0c8;
  border-radius: var(--ps-radius-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
}

.ps-discount-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ps-gold-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-discount-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ps-text);
  padding: 3px 0;
}

/* Divider */
.ps-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--ps-border), transparent);
  margin: 16px 0;
}

/* ===========================
   META LIST (Model, Stock, Manufacturer rows)
   =========================== */
.ps-meta-list {
  /* margin-bottom: 16px; */
  /* border: 1px solid var(--ps-border-light); */
  border-radius: var(--ps-radius-sm);
  overflow: hidden;
  background: var(--ps-card);
}

.ps-meta-item {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
  padding: 10px 0;
  /* border-bottom: 1px solid var(--ps-border-light); */
  transition: background 0.2s;
}

.ps-meta-item:last-child {
  border-bottom: none;
}

.ps-meta-item:hover {
  background: rgba(166, 61, 47, 0.02);
}

.ps-meta-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-text-light);
}

.ps-meta-label i {
  color: var(--ps-primary);
  width: 18px;
  text-align: center;
  margin-right: 6px;
  font-size: 12px;
}

.ps-meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-dark);
}

.ps-meta-value a {
  color: var(--ps-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.ps-meta-value a:hover {
  color: var(--ps-maroon);
  text-decoration: underline;
}

/* Stock Badge */
.ps-stock-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

/* ==========================================
   PRODUCT DETAIL ACCORDION
========================================== */
.ps-detail-accordion {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

.ps-detail-panel {
  background: var(--ps-card);
  border: none;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.ps-detail-panel:last-child {
  border-bottom: none;
}

.ps-detail-toggle {
  width: 100%;
  min-height: 54px;
  border: none;
  background: #fff;
  color: #111;
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  text-align: left;
  cursor: pointer;
  transition:
    color .25s ease;
}

.ps-detail-toggle span {
  flex: 1;
}

.ps-detail-arrow {
  color: #111;
  font-size: 12px;
  transition: transform .25s ease;
}

.ps-detail-toggle:hover {
  color: #777;
}

.ps-detail-panel.active .ps-detail-arrow {
  transform: rotate(180deg);
}

.ps-detail-content {
  padding: 0 0 22px;
  background: var(--ps-card);
  font-size: 14px;
  line-height: 1.75;
  color: #444;
}

/* DESCRIPTION */
.ps-description-body p:last-child {
  margin-bottom: 0;
}

.ps-description-body img {
  max-width: 100%;
  border-radius: 16px;
  margin: 10px 0;
}

.ps-description-body ul,
.ps-description-body ol {
  padding-left: 20px;
}

.ps-description-body li {
  margin-bottom: 6px;
}

/* TABLE */
.ps-spec-table {
  width: 100%;
  border-collapse: collapse;

  border-radius: 18px;
  overflow: hidden;

  border: 1px solid #f0f0f0;
}

/* TABLE HEADER */
.ps-spec-group-header {
  background:
    linear-gradient(
      135deg,
      rgba(166,61,47,0.08),
      rgba(166,61,47,0.03)
    );

  color: var(--ps-primary);

  padding: 14px 18px;

  text-transform: uppercase;
  letter-spacing: 1px;

  font-size: 12px;
  font-weight: 700;
}

/* ROWS */
.ps-spec-table tbody tr {
  border-bottom: 1px solid #f2f2f2;

  transition: background .25s ease;
}

.ps-spec-table tbody tr:hover {
  background: rgba(166,61,47,0.02);
}

.ps-spec-table tbody tr:last-child {
  border-bottom: none;
}

/* CELLS */
.ps-spec-name,
.ps-spec-value {
  padding: 15px 18px;
}

.ps-spec-name {
  width: 38%;
  color: var(--ps-text-light);
  font-weight: 600;
}

.ps-spec-value {
  color: var(--ps-dark);
  font-weight: 500;
}

/* ===========================
   QUANTITY & ACTIONS
   =========================== */
.product-single-qty {
  display: flex;
  align-items: center;
  border: 1px solid #111;
  border-radius: 0;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 14px;
  background: var(--ps-card);
  box-shadow: none;
  transition: var(--ps-transition);
}

.product-single-qty:focus-within {
  border-color: #111;
  box-shadow: none;
}

.product-single-qty button {
  width: 46px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  color: #111;
}

.product-single-qty button:hover {
  background: #f5f5f5;
  color: #111;
}

.product-single-qty input {
  width: 56px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  background: transparent;
}

.product-single-actions {
  display: flex;
  /* grid-template-columns: 1fr 1fr; */
  gap: 10px;
  margin-bottom: 0;
}

.product-single-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #111;
  cursor: pointer;
  transition: var(--ps-transition);
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.product-single-cart {
  background: #b58a55;
  color: #fff;
  border-color: #b58a55;
}

.product-single-cart:hover {
  background: #b58a55;
  color: #111;
  border-color: #111;
  transform: none;
  box-shadow: none;
}

.product-single-buy {
  background: #8b3a3a;
  color: #fff;
  border-color: #8b3a3a;
}

.product-single-buy:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: none;
  box-shadow: none;
}

/* Tags */
.ps-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ps-tags-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ps-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
}

.ps-tag-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  /* border-radius: 20px; */
  /* background: var(--ps-border-light); */
  color: var(--ps-text);
  text-decoration: none;
  /* border: 1px solid var(--ps-border); */
  transition: var(--ps-transition);
}

/* .ps-tag-pill:hover {
  background: var(--ps-primary);
  color: #fff;
  border-color: var(--ps-primary);
  transform: translateY(-1px);
} */

/* ===========================
   REVIEW FORM & STARS
   =========================== */
.rating-stars-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
  font-size: 24px;
  color: #ddd;
  cursor: pointer;
  margin-bottom: 15px;
}

.rating-stars-input label {
  cursor: pointer;
  transition: color 0.2s ease;
}

.rating-stars-input input:checked ~ label,
.rating-stars-input label:hover,
.rating-stars-input label:hover ~ label {
  color: var(--ps-star);
}

/* REVIEW FORM */
#form-review .form-control {
  border-radius: 14px;
  border: 1px solid #ddd;

  padding: 14px;

  box-shadow: none;
}

#form-review .form-control:focus {
  border-color: var(--ps-primary);

  box-shadow:
    0 0 0 4px rgba(166,61,47,0.08);
}

/* BUTTON */
#button-review {
  background: var(--ps-primary);
  border: none;

  padding: 12px 24px;

  border-radius: 14px;

  color: #fff;

  font-weight: 700;

  transition: .3s ease;
}

#button-review:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 25px rgba(166,61,47,0.18);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 991px) {
  .product-single-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .product-single-zoom {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .product-single-gallery {
    flex-direction: column-reverse;
  }

  .product-single-thumbs {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding: 5px 0;
    gap: 8px;
  }

  .product-single-thumb {
    width: 64px;
    flex-shrink: 0;
  }

  .product-single-lens,
  .product-single-zoom {
    display: none !important;
  }

  .product-single-thumb.active,
  .product-single-thumb:hover {
    transform: translateY(-4px);
  }

  .product-single-title {
    font-size: 22px;
  }

  .product-single-price {
    font-size: 24px;
  }

  .product-single-actions {
    grid-template-columns: 1fr;
  }

  .product-single-btn {
    width: 100%;
    justify-content: center;
  }

  .ps-detail-accordion {
    gap: 8px;
  }

  .ps-detail-toggle {
    min-height: 52px;
    font-size: 12px;
    padding: 10px 12px;
  }

  .ps-detail-toggle > i:first-child {
    width: 28px;
    height: 28px;
  }

  .ps-detail-content {
    padding: 16px;
  }

  .ps-spec-name,
  .ps-spec-value {
    padding: 12px;
    font-size: 13px;
  }

  .ps-meta-item {
    padding: 8px 12px;
    /* flex-direction: column; */
    align-items: flex-start;
    gap: 2px;
  }

  .ps-meta-label {
    font-size: 12px;
  }

  .ps-meta-value {
    font-size: 13px;
  }
}

/* ==========================================
   RECOMMENDED PRODUCTS (RELATED)
========================================== */
.ps-recommended-section {
  border-top: 1px solid #e5e5e5;
}

.ps-recommended-scroll {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  -webkit-overflow-scrolling: touch;
}

.ps-recommended-scroll::-webkit-scrollbar {
  height: 6px;
}

.ps-recommended-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.ps-recommended-scroll::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.ps-recommended-item {
  flex: 0 0 240px; /* Small fixed width for compact look */
  scroll-snap-align: start;
}

/* Override product thumb inside recommended to look aesthetic */
.ps-recommended-item .product-thumb {
  border: 1px solid #eee;
  box-shadow: none;
  border-radius: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.ps-recommended-item .product-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.ps-recommended-item .product-thumb .image img {
  border-radius: 0;
}

.ps-recommended-item .product-thumb .content {
  padding: 16px;
  text-align: center;
}

.ps-recommended-item .product-thumb h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ps-recommended-item .product-thumb h4 a {
  color: #111;
  text-decoration: none;
}

.ps-recommended-item .product-thumb .price {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.ps-recommended-item .product-thumb .description,
.ps-recommended-item .product-thumb .button-group {
  display: none !important; /* Hide description and generic buttons for a cleaner look */
}

@media (max-width: 768px) {
  .ps-recommended-item {
    flex: 0 0 180px;
  }
}

/* ==========================================
   AESTHETIC BREADCRUMBS
========================================== */
.ps-breadcrumb-wrap {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 30px !important;
}

.ps-breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.ps-breadcrumb-item {
  display: flex;
  align-items: center;
}

.ps-breadcrumb-item a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-breadcrumb-item a:hover {
  color: #111;
}

.ps-breadcrumb-item.active span {
  color: #111;
  font-weight: 600;
}

.ps-breadcrumb-item + .ps-breadcrumb-item::before {
  content: '\f105'; /* FontAwesome angle-right */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #ccc;
  font-size: 11px;
  padding: 0 12px;
  float: none;
}

