/* ==========================================================================
   TENBIT ADDON - WOOCOMMERCE SINGLE PRODUCT DETAIL PAGE STYLES
   Strictly scoped to .single-product to prevent bleeding into shop/category grids
   ========================================================================== */

/* Single Product Section Container */
body.single-product .single-product-section,
body.single-product .woocommerce.single-product {
  padding: 2.5rem 0 4.5rem 0;
  background: #ffffff;
}

/* 2-Column Product Grid Layout - STRICTLY SINGLE PRODUCT ONLY */
body.single-product div.product,
.single-product .woocommerce div.product,
.single-product.woocommerce-page div.product {
  margin-bottom: 3.5rem;
}

@media (min-width: 900px) {
  body.single-product div.product,
  .single-product .woocommerce div.product,
  .single-product.woocommerce-page div.product {
    display: grid !important;
    grid-template-columns: 1fr 1.05fr !important;
    gap: 3.5rem !important;
    align-items: start !important;
  }
}

/* ==========================================================================
   1. PRODUCT GALLERY & THUMBNAILS (SINGLE PRODUCT ONLY)
   ========================================================================== */
.single-product .woocommerce-product-gallery {
  position: relative !important;
  width: 100% !important;
  float: none !important;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
  position: relative;
  border: 1px solid var(--tb-border-color, #e5e7eb);
  border-radius: var(--tb-radius-md, 8px);
  overflow: hidden;
  background: #f9fafb;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
  width: 100%;
  height: 480px;
  overflow: hidden;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.3s ease;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img:hover {
  transform: scale(1.02);
}

/* Gallery Thumbnails Strip */
.single-product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs,
.single-product .flex-control-nav.flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.75rem !important;
  margin-top: 1rem !important;
  list-style: none !important;
  padding: 0 !important;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
.single-product .flex-control-nav.flex-control-thumbs li {
  border: 2px solid transparent !important;
  border-radius: var(--tb-radius-sm, 4px) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  height: 90px !important;
  background: #f3f4f6 !important;
  transition: var(--tb-transition) !important;
  float: none !important;
  width: auto !important;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li.active,
.single-product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li:hover,
.single-product .flex-control-nav.flex-control-thumbs li.active,
.single-product .flex-control-nav.flex-control-thumbs li:hover {
  border-color: var(--tb-brand-red, #c91818) !important;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
.single-product .flex-control-nav.flex-control-thumbs li img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* ==========================================================================
   2. PRODUCT SUMMARY & DETAILS (RIGHT COLUMN)
   ========================================================================== */
.single-product .summary.entry-summary {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
  width: 100% !important;
  float: none !important;
}

/* Product Title */
.single-product .summary.entry-summary h1.product_title.entry-title,
.single-product .product_title.entry-title {
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif) !important;
  font-size: clamp(2rem, 3.2vw, 2.6rem) !important;
  font-weight: 800 !important;
  color: var(--tb-text-dark, #111827) !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}

/* Rating & Reviews Link */
.single-product .woocommerce-product-rating {
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  font-size: 0.88rem !important;
  margin: 0 !important;
}

.single-product .woocommerce-product-rating .star-rating {
  color: var(--tb-brand-gold, #e5a93b) !important;
  font-size: 1rem !important;
}

.single-product .woocommerce-product-rating .woocommerce-review-link {
  color: var(--tb-text-muted, #6b7280) !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

.single-product .woocommerce-product-rating .woocommerce-review-link:hover {
  color: var(--tb-brand-red, #c91818) !important;
}

/* Price Box */
.single-product div.product p.price,
.single-product div.product span.price,
.single-product .summary.entry-summary p.price {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.75rem !important;
  font-size: 1.95rem !important;
  font-weight: 800 !important;
  color: var(--tb-brand-red, #c91818) !important;
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif) !important;
  margin: 0 !important;
}

.single-product div.product p.price del,
.single-product div.product span.price del {
  font-size: 1.25rem !important;
  color: var(--tb-text-light, #9ca3af) !important;
  font-weight: 600 !important;
  text-decoration: line-through !important;
}

.single-product div.product p.price ins,
.single-product div.product span.price ins {
  color: var(--tb-brand-red, #c91818) !important;
  text-decoration: none !important;
}

/* Short Description */
.single-product .woocommerce-product-details__short-description {
  font-size: 0.98rem;
  color: var(--tb-text-muted, #4b5563);
  line-height: 1.7;
}

/* In Stock & Availability */
.single-product p.stock {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
}

.single-product p.stock.in-stock {
  color: #16a34a !important;
}

.single-product p.stock.out-of-stock {
  color: #dc2626 !important;
}

/* ==========================================================================
   3. VARIATIONS & ADD TO CART FORM (SINGLE PRODUCT ONLY)
   ========================================================================== */
.single-product form.cart,
.single-product form.variations_form.cart {
  margin: 0.5rem 0 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
}

/* Variations Table */
.single-product table.variations {
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  margin: 0 !important;
}

.single-product table.variations th.label,
.single-product table.variations td.value {
  padding: 0.6rem 0 !important;
  vertical-align: middle !important;
  border: none !important;
  text-align: left !important;
  background: transparent !important;
}

.single-product table.variations th.label {
  width: 30% !important;
  font-family: var(--tb-font-accent, 'Bricolage Grotesque', sans-serif) !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--tb-text-dark, #111827) !important;
}

.single-product table.variations td.value select {
  width: 100% !important;
  height: 48px !important;
  padding: 0 1rem !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: var(--tb-radius-sm, 4px) !important;
  background-color: #ffffff !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  color: var(--tb-text-dark, #111827) !important;
  outline: none !important;
  transition: var(--tb-transition);
  cursor: pointer;
}

.single-product table.variations td.value select:focus {
  border-color: var(--tb-brand-red, #c91818) !important;
  box-shadow: 0 0 0 3px rgba(201, 24, 24, 0.1) !important;
}

.single-product table.variations .reset_variations {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--tb-brand-red, #c91818);
  text-decoration: underline;
  font-weight: 600;
}

/* Add to Cart Controls Row */
.single-product div.product form.cart div.quantity,
.single-product .woocommerce-variation-add-to-cart {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

/* Quantity Input */
.single-product .summary.entry-summary .quantity {
  display: inline-flex !important;
  align-items: center !important;
  border: 2px solid #e5e7eb !important;
  border-radius: var(--tb-radius-sm, 4px) !important;
  overflow: hidden !important;
  background: #ffffff !important;
  height: 52px !important;
}

.single-product .summary.entry-summary .quantity .input-text.qty {
  width: 60px !important;
  height: 100% !important;
  border: none !important;
  text-align: center !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  color: var(--tb-text-dark, #111827) !important;
  outline: none !important;
}

/* Add to Cart Button */
.single-product .summary.entry-summary button.single_add_to_cart_button.button.alt,
.single-product button.single_add_to_cart_button {
  flex: 1 !important;
  height: 52px !important;
  padding: 0 2rem !important;
  background: var(--tb-brand-red, #c91818) !important;
  color: #ffffff !important;
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  border-radius: var(--tb-radius-sm, 4px) !important;
  border: none !important;
  cursor: pointer !important;
  transition: var(--tb-transition) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.6rem !important;
  box-shadow: 0 6px 20px rgba(201, 24, 24, 0.28) !important;
}

.single-product .summary.entry-summary button.single_add_to_cart_button.button.alt:hover,
.single-product button.single_add_to_cart_button:hover {
  background: var(--tb-brand-red-hover, #a51212) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px rgba(201, 24, 24, 0.38) !important;
}

/* ==========================================================================
   4. PRODUCT METADATA (SKU, CATEGORIES, TAGS)
   ========================================================================== */
.single-product .product_meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.45rem !important;
  font-size: 0.84rem !important;
  color: var(--tb-text-muted, #6b7280) !important;
  padding-top: 1.5rem !important;
  border-top: 1px solid var(--tb-border-color, #e5e7eb) !important;
}

.single-product .product_meta > span {
  display: block;
}

.single-product .product_meta strong,
.single-product .product_meta .sku_wrapper,
.single-product .product_meta .posted_in,
.single-product .product_meta .tagged_as {
  color: var(--tb-text-dark, #111827);
  font-weight: 700;
}

.single-product .product_meta .sku,
.single-product .product_meta a {
  color: var(--tb-brand-red, #c91818);
  font-weight: 600;
  text-decoration: none;
}

.single-product .product_meta a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   5. WOOCOMMERCE TABS (DESCRIPTION, ATTRIBUTES, REVIEWS)
   ========================================================================== */
.single-product .woocommerce-tabs.wc-tabs-wrapper {
  margin-top: 4.5rem !important;
  border-top: 1px solid var(--tb-border-color, #e5e7eb) !important;
  padding-top: 2.5rem !important;
  width: 100% !important;
}

.single-product ul.tabs.wc-tabs {
  display: flex !important;
  list-style: none !important;
  border-bottom: 2px solid var(--tb-border-color, #e5e7eb) !important;
  gap: 2.5rem !important;
  padding: 0 !important;
  margin: 0 0 2rem 0 !important;
  overflow: visible !important;
  flex-wrap: wrap !important;
}

.single-product ul.tabs.wc-tabs li {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.single-product ul.tabs.wc-tabs li a {
  display: inline-block !important;
  padding: 0.85rem 0.25rem 0.75rem 0.25rem !important;
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif) !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  color: var(--tb-text-muted, #6b7280) !important;
  border-bottom: 3px solid transparent !important;
  margin-bottom: -2px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: var(--tb-transition) !important;
}

.single-product ul.tabs.wc-tabs li.active a,
.single-product ul.tabs.wc-tabs li a:hover {
  color: var(--tb-brand-red, #c91818) !important;
  border-bottom-color: var(--tb-brand-red, #c91818) !important;
}

.single-product .woocommerce-Tabs-panel.panel {
  font-size: 0.98rem;
  color: var(--tb-text-main, #374151);
  line-height: 1.75;
}

.single-product .woocommerce-Tabs-panel h2 {
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--tb-text-dark, #111827);
}

.single-product .woocommerce-Tabs-panel h3 {
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--tb-text-dark, #111827);
}

.single-product .woocommerce-Tabs-panel ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.single-product .woocommerce-Tabs-panel ul li {
  margin-bottom: 0.45rem;
}

/* Attributes Table */
.single-product table.shop_attributes {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 1rem !important;
  border: 1px solid var(--tb-border-color, #e5e7eb) !important;
}

.single-product table.shop_attributes th,
.single-product table.shop_attributes td {
  padding: 0.9rem 1.25rem !important;
  text-align: left !important;
  border-bottom: 1px solid var(--tb-border-color, #e5e7eb) !important;
  font-size: 0.92rem !important;
}

.single-product table.shop_attributes th {
  font-weight: 800 !important;
  color: var(--tb-text-dark, #111827) !important;
  width: 30% !important;
  background: #f9fafb !important;
  text-transform: uppercase !important;
}

/* Reviews & Feedback */
.single-product .woocommerce-Reviews ol.commentlist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.single-product .woocommerce-Reviews ol.commentlist li.comment {
  background: #f9fafb;
  border: 1px solid var(--tb-border-color, #e5e7eb);
  border-radius: var(--tb-radius-md, 8px);
  padding: 1.25rem 1.5rem;
}

.single-product .woocommerce-Reviews .comment-respond {
  margin-top: 2rem;
  padding: 1.75rem;
  background: #f9fafb;
  border: 1px solid var(--tb-border-color, #e5e7eb);
  border-radius: var(--tb-radius-md, 8px);
}

.single-product .woocommerce-Reviews .comment-reply-title {
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tb-text-dark, #111827);
  display: block;
  margin-bottom: 1rem;
}

.single-product .woocommerce-Reviews .comment-form input[type="text"],
.single-product .woocommerce-Reviews .comment-form input[type="email"],
.single-product .woocommerce-Reviews .comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: var(--tb-radius-sm, 4px);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
}

.single-product .woocommerce-Reviews .comment-form input:focus,
.single-product .woocommerce-Reviews .comment-form textarea:focus {
  border-color: var(--tb-brand-red, #c91818);
}

.single-product .woocommerce-Reviews .comment-form .submit.button {
  background: var(--tb-brand-red, #c91818) !important;
  color: #ffffff !important;
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.85rem 2rem !important;
  border-radius: var(--tb-radius-sm, 4px) !important;
}

/* ==========================================================================
   6. RELATED PRODUCTS & UPSELLS
   ========================================================================== */
.single-product .related.products,
.single-product .upsells.products {
  margin-top: 4.5rem;
  border-top: 1px solid var(--tb-border-color, #e5e7eb);
  padding-top: 3.5rem;
}

.single-product .related.products h2,
.single-product .upsells.products h2 {
  font-family: var(--tb-font-heading, 'Bricolage Grotesque', sans-serif);
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tb-text-dark, #111827);
  margin-bottom: 2rem;
}
