/* ==========================================================================
   SimplexTheme Product Details - Enhanced Minimal Design v3
   Professional B2B eCommerce with Red Accent Theme

   CHANGELOG v3 (Latest):
   - Increased color swatch size: 50px → 58px (better readability)
   - Increased image square size: 60px → 58px (consistency)
   - Reinforced left-alignment for color/image swatches
   - Maintained mobile touch target minimums (44px)
   ========================================================================== */

/* ==========================================================================
   DESIGN SYSTEM - Color Palette
   ========================================================================== */
:root {
  --primary-dark: #1a1a1a;
  --accent-red: #d32f2f; /* Professional red for selected states */
  --accent-red-hover: #b71c1c; /* Darker red for hover */
  --accent-orange: #ff6f00; /* Pre-order accent color */
  --accent-orange-hover: #e65100; /* Darker orange for hover */
  --border-light: #ddd;
  --border-medium: #999;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #888;
  --bg-white: #fff;
  --bg-light: #f9f9f9;
  --bg-lighter: #f5f5f5;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15);

  /* Pre-order specific colors */
  --preorder-bg: #ff6f00;
  --preorder-bg-hover: #e65100;
  --preorder-text: #fff;
  --availability-bg: #fff3e0;
  --availability-border: #ffe0b2;
  --availability-icon-color: #ff6f00;
}

/* ==========================================================================
   LAYOUT & SPACING - Optimized Vertical Rhythm
   ========================================================================== */

/* Product overview - tightened container padding */
.product-details-page .overview {
  padding: 0;
}

/* Product name - reduced bottom margin */
.product-details-page .product-name h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px 0; /* Reduced from 16px */
  color: var(--text-primary);
}

/* Short description - tightened spacing */
.product-details-page .short-description {
  font-size: 14px;
  line-height: 1.5; /* Reduced from 1.6 */
  color: var(--text-secondary);
  margin: 0 0 16px 0; /* Reduced from 20px */
}

/* SKU/MAN/GTIN section - more compact */
.product-details-page .additional-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0; /* Reduced from 12px */
}

.product-details-page .sku,
.product-details-page .manufacturer-part-number,
.product-details-page .gtin {
  display: flex;
  gap: 4px;
}

.product-details-page .sku .label,
.product-details-page .manufacturer-part-number .label,
.product-details-page .gtin .label {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   PRICE SECTION - Redesigned Clean Display (No Labels)
   ========================================================================== */

/* Price availability wrapper - merged properties */
.product-details-page .price-availability {
  position: relative;
  margin-bottom: 0px;
  padding: 0px 0;
  border-top: 0px solid #e5e5e5;
}

/* Prices container - minimal spacing */
.product-details-page .prices {
  margin: 0;
  padding: 0;
}

/* Product price container - tightened spacing */
.product-details-page .product-price {
  margin: 0 0 6px 0; /* Reduced from 10px to 6px */
}

/* Hide "Price:" label for cleaner look */
.product-details-page .product-price label,
.product-details-page .non-discounted-price label {
  display: none !important; /* Remove "Price:" label */
}

/* Price value - prominent display */
.product-details-page .product-price .price-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  display: inline-block;
}

/* Old price - strikethrough without label */
.product-details-page .old-product-price {
  display: inline-block;
  margin-left: 12px;
}

.product-details-page .old-product-price label {
  display: none !important; /* Hide "Old Price:" label */
}

.product-details-page .old-product-price span,
.product-details-page .product-price .old-price {
  font-size: 20px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
  display: inline-block;
}

/* Discounted price - no label */
.product-details-page .discounted-price > span:first-of-type {
  display: none !important; /* Hide "With Discount:" label */
}

/* Additional comprehensive label hiding for all price sections */
.product-details-page .prices label,
.product-details-page .product-price label,
.product-details-page .non-discounted-price label,
.product-details-page .discounted-price label,
.product-details-page .old-product-price label {
  display: none !important; /* Hide all price labels */
}

/* Tax/shipping info - subtle text */
.product-details-page .product-price .tax-shipping-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px; /* Reduced from 8px */
  display: block;
}

/* Stock availability - compact */
.product-details-page .availability {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.product-details-page .stock-availability {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-details-page .stock-availability .label {
  color: var(--text-secondary);
  font-weight: 400;
}

.product-details-page .stock-availability .value {
  color: #2d862d;
  font-weight: 600;
}

.product-details-page .stock-availability .value.out-of-stock {
  color: #c44;
}

/* ==========================================================================
   GLOBAL PRICE LABEL HIDING - Works for Both Matrix & Non-Matrix UI
   ========================================================================== */

/* Hide all price-related labels globally */
.product-details-page .prices > div > label,
.product-details-page .price-availability label,
.product-details-page [class*="price"] > label:first-child {
  display: none !important;
}

/* Ensure price values are visible and properly styled */
.product-details-page .prices > div > span,
.product-details-page [class*="price"] > span {
  display: inline-block;
}

/* ==========================================================================
   ATTRIBUTES SECTION - Optimized Spacing
   ========================================================================== */

/* Attributes container - reduced spacing - FORCE LEFT ALIGNMENT */
.product-details-page .attributes {
  margin: 40px 0px 0px 0px;
  text-align: left !important;
  display: block !important;
}

/* Attribute rows - tightened spacing - STRONG LEFT ALIGNMENT */
.product-details-page .attributes dl.row {
  margin: 0 0 16px 0; /* Reduced from 20px */
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
}

/* Color attribute row - MAXIMUM SPECIFICITY LEFT ALIGNMENT */
.product-details-page .attributes dl.row.attribute-color,
.product-details-page
  .attributes
  dl#product_attribute_label_63.row.attribute-color {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  float: none !important;
  display: flex !important;
}

/* Attribute labels - keep "Color *" and "Size *" on same line */
.product-details-page .attributes dl.row dt {
  flex: 0 0 auto; /* Auto width to fit content */
  min-width: 80px; /* Minimum width */
  max-width: 100%; /* Full width for stacked layout */
  text-align: left;
  padding: 0;
  margin: 0 0 8px 0; /* Bottom margin for spacing below label */
  padding-right: 0; /* Remove right padding since stacked */
  white-space: nowrap; /* Prevent label and asterisk from wrapping */
}

.product-details-page .attributes .text-prompt {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline; /* Changed from block to inline */
  margin-bottom: 0; /* Remove bottom margin for inline display */
  white-space: nowrap; /* Prevent text wrapping */
}

/* Required asterisk - keep inline with label */
.product-details-page .attributes dl.row dt .required {
  display: inline; /* Keep asterisk inline with label */
  margin-left: 2px; /* Small space between label and asterisk */
  white-space: nowrap; /* Prevent wrapping */
}

/* Attribute values container - LEFT ALIGNED */
.product-details-page .attributes dl.row dd {
  flex: 1;
  padding: 0;
  margin: 0;
  text-align: left !important; /* Ensure left alignment */
  display: flex;
  justify-content: flex-start !important; /* Left align flex children */
}

/* Ensure attribute labels and required asterisks stay together */
.product-details-page .attributes dl.row dt label,
.product-details-page .attributes dl.row dt .required,
.product-details-page .attributes dl.row dt .text-prompt {
  white-space: nowrap !important;
}

/* Prevent wrapping of the entire dt container */
.product-details-page .attributes dl.row dt {
  overflow: visible !important;
}

/* ==========================================================================
   COLOR SWATCHES - Enhanced Size & Red Selection Border (v3 Update)
   ========================================================================== */

/* Color squares container - STRONGLY ENFORCED LEFT ALIGNMENT */
.product-details-page .attributes .color-squares,
.product-details-page .attributes ul.color-squares,
.product-details-page .attributes .attribute-squares.color-squares {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1px;
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  /* STRONGLY ENFORCED LEFT ALIGNMENT */
  justify-content: flex-start !important;
  align-items: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Color square items */
.product-details-page .attributes .color-squares li {
  margin: 0;
  position: relative;
  /* Ensure no auto margins */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Color input - hidden but accessible.
   display 를 반드시 선언해야 한다 — simplex.styles.css 의 같은 대상 규칙이 display:none 을
   걸고 있어, 여기서 선언하지 않으면 특이도가 높아도 그 속성만은 이길 수 없다.
   실제로 그 누락 때문에 이 파일의 포커스 규칙 전체가 오랫동안 사문이었다. */
.product-details-page .attributes .color-squares input[type="radio"] {
  display: block;
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

/* Color label - increased to 70px for larger color preview */
.product-details-page .attributes .color-squares label {
  display: block;
  width: 70px;
  height: 70px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px transparent;
  border-radius: 2px; /* Subtle rounding for modern look */
}

/* Color square hover state - subtle elevation */
.product-details-page .attributes .color-squares label:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-sm),
    0 0 0 2px var(--border-medium);
}

/* ============================================
   ENHANCED COLOR SQUARE SELECTION SYSTEM
   Universal contrast for all color backgrounds
   Dual-ring system: White outer + Dark inner
   ============================================ */

/* Color square SELECTED state - Dual-ring contrast system */
.product-details-page
  .attributes
  .color-squares
  input[type="radio"]:checked
  + label
  .attribute-square-container {
  /* Dual-ring system: White outer (4px) + Dark inner (2px via box-shadow) */
  border: 4px solid #ffffff; /* Outer white ring - visible on dark colors */
  box-shadow:
    0 0 0 2px #333333,
    /* Inner dark ring - visible on light colors */ 0 4px 12px
      rgba(0, 0, 0, 0.25); /* Elevated shadow for depth */
  transform: scale(1.08); /* Subtle growth (8%) for selection feedback */
  transition: all 0.2s ease-in-out;
  position: relative;
  z-index: 10; /* Bring selected square to front */
}

/* Hover state - Preview before selection */
.product-details-page
  .attributes
  .color-squares
  input[type="radio"]:not(:checked)
  + label:hover
  .attribute-square-container {
  border: 2px solid #ffffff;
  box-shadow:
    0 0 0 1px rgba(51, 51, 51, 0.5),
    /* Lighter preview ring */ 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.04); /* Smaller preview growth (4%) */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Active/Press state - Tactile feedback */
.product-details-page
  .attributes
  .color-squares
  input[type="radio"]
  + label:active
  .attribute-square-container {
  transform: scale(0.98); /* Press-down effect */
  transition: transform 0.1s ease;
}

/* Base state - Ensure smooth transitions */
.product-details-page .attributes .color-squares .attribute-square-container {
  transition: all 0.2s ease-in-out;
}

/* Color square focus state - accessibility (WCAG 2.1 AA Focus Visible).
   마크업이 <label><span class="attribute-square-container"/><input/></label> 이라
   input 은 label 의 자식이다. 이전에는 `input:focus-visible + label` 로 적혀 있어
   인접 형제가 존재하지 않아 한 번도 매치되지 않았다 — :has() 로 바꾼다.
   :focus-within 대신 :has(:focus-visible) 을 쓰는 이유는 마우스 클릭 시 링을 띄우지 않기 위해서다. */
.product-details-page
  .attributes
  .color-squares
  label:has(input[type="radio"]:focus-visible)
  .attribute-square-container {
  outline: 3px solid #0066cc; /* Blue focus ring, 3:1 contrast minimum */
  outline-offset: 2px;
}

/* Color square disabled state */
.product-details-page
  .attributes
  .color-squares
  input[type="radio"]:disabled
  + label {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(50%);
}

.product-details-page
  .attributes
  .color-squares
  input[type="radio"]:disabled
  + label:hover {
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   MATRIX COLOR SWATCHES SECTION - Matrix UI Mode
   ========================================================================== */

/* Matrix color swatches container - positioned after price-availability */
.matrix-color-swatches-section {
  margin: 16px 0;
  padding: 0;
}

/* Ensure .attributes inside matrix section inherits existing styles */
.matrix-color-swatches-section .attributes {
  margin: 0;
}

/* ==========================================================================
   IMAGE SQUARES - Consistent with Color Swatches (v3 Update)
   ========================================================================== */

/* Image squares container - STRONGLY ENFORCED LEFT ALIGNMENT */
.product-details-page .attributes .image-squares,
.product-details-page .attributes ul.image-squares,
.product-details-page .attributes .attribute-squares.image-squares,
.product-details-page .attributes .option-list.image-squares,
.product-details-page .attributes .option-list.attribute-squares.image-squares {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1px;
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  /* STRONGLY ENFORCED LEFT ALIGNMENT */
  justify-content: flex-start !important;
  align-items: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Image square items */
.product-details-page .attributes .image-squares li {
  margin: 0;
  position: relative;
  /* Ensure no auto margins */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Image square input - hidden but accessible. display 선언 이유는 위 color-squares 주석 참조. */
.product-details-page .attributes .image-squares input[type="radio"] {
  display: block;
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

/* Image square label */
.product-details-page .attributes .image-squares label {
  display: block;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

/* Image square container - increased to 76px for larger preview with border spacing */
.product-details-page .attributes .image-squares .image-squares-container {
  display: block;
  /*    width: 78px;
    height: 78px;*/
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-sizing: border-box;
  border-radius: 2px;
}

/* Image square span with background image */
/*.product-details-page .attributes .image-squares .attribute-square {
    display: block;
    width: 100%;
    height: 100%;
    background-size: contain !important;
    background-position: center !important;
}*/

/* Image square hover state */
.product-details-page
  .attributes
  .image-squares
  label:hover
  .image-squares-container {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Image square SELECTED state - consistent border styling across all swatches */
.product-details-page
  .attributes
  .image-squares
  input[type="radio"]:checked
  + label
  .image-squares-container {
  border: 3px solid #ddd;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Selected value styling for color and image squares - Dual-ring system (JavaScript-managed class) */
.product-details-page
  .attributes
  ul.color-squares
  .selected-value
  .attribute-square-container,
.product-details-page
  .attributes
  ul.image-squares
  .selected-value
  .attribute-square-container {
  /* Dual-ring system: White outer + Dark inner */
  border: 4px solid #ffffff;
  box-shadow:
    0 0 0 2px #333333,
    0 4px 12px rgba(0, 0, 0, 0.25);
  transform: scale(1.08);
  transition: all 0.2s ease-in-out;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   COLOR NAME LABELS — persistent text below each swatch
   Minimal typography: 10px uppercase, muted gray, center-aligned
   Single-line ellipsis for long names, constrained to swatch width
   ========================================================================== */

/* Make each <li> a flex-column to stack label below swatch */
.product-details-page .attributes .color-squares li,
.product-details-page .attributes .image-squares li {
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

/* Increase flex gap on color squares <ul> to prevent label collision */
.product-details-page .attributes .color-squares,
.product-details-page .attributes ul.color-squares,
.product-details-page .attributes .attribute-squares.color-squares {
  gap: 6px 4px;
}

/* Increase flex gap on image squares <ul> to prevent label collision */
.product-details-page .attributes .image-squares,
.product-details-page .attributes ul.image-squares,
.product-details-page .attributes .attribute-squares.image-squares,
.product-details-page .attributes .option-list.image-squares,
.product-details-page .attributes .option-list.attribute-squares.image-squares {
  gap: 6px 4px;
}

/* The label itself */
.product-details-page .attributes .color-name-label {
  display: block;
  max-width: 74px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #777;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 5px;
  /* Single-line ellipsis for long color names */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selected state — darker text for the selected swatch */
.product-details-page
  .attributes
  .color-squares
  .selected-value
  .color-name-label,
.product-details-page
  .attributes
  .image-squares
  .selected-value
  .color-name-label {
  color: #1a1a1a;
  font-weight: 600;
  margin-top: 5px;
}

/* Disabled state — matching existing swatch disabled opacity */
.product-details-page .attributes .color-squares .disabled .color-name-label,
.product-details-page .attributes .image-squares .disabled .color-name-label {
  opacity: 0.4;
}

/* ============================================
   SELECTED COLOR NAME DISPLAY
   SimplexTheme-Compliant Design
   Text confirmation above Add to Cart button
   ============================================ */

/* Selected color name display container - positioned above ADD TO CART */
.selected-color-display {
  margin-top: 20px; /* Space below color squares */
  margin-bottom: 15px; /* Space above QTY/ADD TO CART */
  padding: 12px 16px;
  background-color: #f5f5f5; /* SimplexTheme filter panel background */
  border-left: 4px solid #000; /* Black left border */
  border-radius: 0px; /* SimplexTheme standard (sharp edges) */
}

/* Selected color label */
.selected-color-label {
  font-weight: 600; /* Matches QTY label weight */
  color: #333; /* Grey text color */
  margin-right: 8px;
  font-size: 11px; /* Consistent with QTY label */
  text-transform: uppercase; /* Uppercase styling */
}

/* Selected color name text */
.selected-color-name {
  font-weight: 700; /* SimplexTheme standard bold weight */
  color: #000; /* Black text color */
  font-size: 16px; /* Slightly larger for emphasis */
}

/* Mobile responsive */
@media (max-width: 768px) {
  .selected-color-display {
    margin-bottom: 12px;
    padding: 10px 14px;
  }

  .selected-color-label {
    font-size: 11px; /* Keep consistent with desktop */
  }

  .selected-color-name {
    font-size: 14px; /* Proportional reduction */
    display: inline; /* Keep inline on mobile unless very long */
  }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION SUPPORT
   Respects user's motion preferences (WCAG 2.3.3)
   ============================================ */

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .product-details-page .attributes .color-squares .attribute-square-container,
  .product-details-page .attributes .color-squares input[type="radio"] + label,
  .product-details-page
    .attributes
    .color-squares
    input[type="radio"]
    + label
    .attribute-square-container,
  .product-details-page
    .attributes
    ul.color-squares
    .selected-value
    .attribute-square-container,
  .product-details-page
    .attributes
    ul.image-squares
    .selected-value
    .attribute-square-container {
    transition: none;
    animation: none;
  }
}

/* Image square focus state. 셀렉터를 :has() 로 바꾼 이유는 위 color-squares 주석 참조. */
.product-details-page
  .attributes
  .image-squares
  label:has(input[type="radio"]:focus-visible)
  .image-squares-container {
  outline: 2px solid var(--grey-black);
  outline-offset: 2px;
}

/* Image square disabled state */
.product-details-page
  .attributes
  .image-squares
  input[type="radio"]:disabled
  + label {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-details-page
  .attributes
  .image-squares
  input[type="radio"]:disabled
  + label:hover
  .image-squares-container {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

/* REMOVED: Enable tooltip hover popover on image squares to display color name */
/* .product-details-page .attributes .image-squares .tooltip-container {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
} */

/* Ensure radio input remains clickable */
.product-details-page .attributes .image-squares input[type="radio"] {
  z-index: 10;
  cursor: pointer;
}

/* Ensure label is clickable */
.product-details-page .attributes .image-squares label {
  z-index: 5;
  pointer-events: auto !important;
}

/* ==========================================================================
   SIZE SWATCHES - Red Background on Selection
   ========================================================================== */

/* Size options list - consistent spacing */
.product-details-page .attributes .option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0px; /* 0px gap for adjacent size swatch buttons */
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
}

/* Size radio button inputs (hidden but accessible) */
.product-details-page .attributes .option-list input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Size button labels - professional styling */
.product-details-page .attributes .option-list input[type="radio"] + label {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 2px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border-radius: 2px; /* Subtle rounding */
}

/* Size button hover state */
.product-details-page
  .attributes
  .option-list
  input[type="radio"]
  + label:hover {
  border-color: var(--border-medium);
  background: var(--bg-light);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Size button SELECTED state - grey-black border + white background + dark text */
.product-details-page
  .attributes
  .option-list
  input[type="radio"]:checked
  + label {
  border: 3px solid var(--grey-black);
  background: var(--grey-black); /* White background */
  color: var(--bg-white); /* Dark text */
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

/* Size button focus state - accessibility */
.product-details-page
  .attributes
  .option-list
  input[type="radio"]:focus-visible
  + label {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
}

/* Remove focus outline when not using keyboard navigation */
.product-details-page
  .attributes
  .option-list
  input[type="radio"]:focus:not(:focus-visible)
  + label {
  outline: none;
}

/* Size button disabled state */
.product-details-page
  .attributes
  .option-list
  input[type="radio"]:disabled
  + label {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-lighter);
  color: #999;
}

.product-details-page
  .attributes
  .option-list
  input[type="radio"]:disabled
  + label:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-light);
}

/* ==========================================================================
   DROPDOWN LISTS - Compact Width for Color Dropdowns
   ========================================================================== */

/* Dropdown select elements - constrained width for better layout */
.product-details-page .attributes select {
  max-width: 250px; /* Reasonable width for color names */
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none; /* Remove default arrow for custom styling */
  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='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px; /* Space for custom arrow */
}

/* Dropdown hover state */
.product-details-page .attributes select:hover {
  border-color: var(--border-medium);
  background-color: var(--bg-light);
}

/* Dropdown focus state - accessibility */
.product-details-page .attributes select:focus {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  border-color: var(--primary-dark);
}

/* Dropdown disabled state */
.product-details-page .attributes select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg-lighter);
}

/* Dropdown options styling */
.product-details-page .attributes select option {
  padding: 8px 12px;
  font-size: 14px;
}

/* ==========================================================================
   ADD TO CART SECTION - Enhanced Pre-Order Button & Availability Display
   ========================================================================== */

/* Add to cart container - reduced spacing */
.product-details-page .add-to-cart {
  margin: 12px 0 10px 0; /* Reduced from 16px 0 12px 0 */
}

/* Add to cart panel - horizontal single line layout */
.product-details-page .add-to-cart .add-to-cart-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 10px; /* 10px spacing provides visual separation between quantity and button */
}

/* Quantity box - compact layout */
.product-details-page .add-to-cart .quantity-box {
  display: flex;
  align-items: center;
  gap: 5px; /* 5px spacing between label and input for compact appearance */
  max-width: 280px;
}

.product-details-page .add-to-cart .quantity-box label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  min-width: 35px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Quantity input wrapper */
.product-details-page .add-to-cart .addtocart-quantity-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-white);
}

.product-details-page .add-to-cart .qty-input {
  width: 80px;
  height: 38px; /* Reduced from 44px to match button height */
  border: none;
  text-align: center;
  font-size: 14px; /* Reduced from 16px for better proportion */
  font-weight: 600;
  padding: 0 10px;
  outline: none;
}

/* Focus state for quantity container - provides visual feedback for keyboard navigation */
.product-details-page .add-to-cart .addtocart-quantity-box:focus-within {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.product-details-page .add-to-cart .increase-quantity,
.product-details-page .add-to-cart .decrease-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; /* Reduced from 40px for better proportion */
  height: 38px; /* Reduced from 44px to match input height */
  background: var(--bg-lighter);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.product-details-page .add-to-cart .increase-quantity:hover,
.product-details-page .add-to-cart .decrease-quantity:hover {
  background: #e5e5e5;
}

/* ==========================================================================
   PRE-ORDER BUTTON - Enhanced Visual Design with Icon
   ========================================================================== */

/* Add to cart button - matches overview button height */
.product-details-page .add-to-cart .add-to-cart-button {
  width: 100%;
  max-width: 280px;
  height: 38px; /* Reduced from 50px to match overview buttons */
  font-size: 14px; /* Reduced from 15px for better proportion */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.product-details-page .add-to-cart .add-to-cart-button:hover {
  background: #333;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.product-details-page .add-to-cart .add-to-cart-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Pre-order button styling - distinct orange color */
.product-details-page .add-to-cart .add-to-cart-button.pre-order-button {
  background: var(--preorder-bg);
  color: var(--preorder-text);
}

.product-details-page .add-to-cart .add-to-cart-button.pre-order-button:hover {
  background: var(--preorder-bg-hover);
}

/* Pre-order button icon - calendar/clock SVG */
.product-details-page
  .add-to-cart
  .add-to-cart-button.pre-order-button::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ==========================================================================
   PRE-ORDER AVAILABILITY DATE - Enhanced Visual Hierarchy
   ========================================================================== */

/* Pre-order availability date container */
.product-details-page .pre-order-availability-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-primary);
}

/* Calendar icon before availability text */
.product-details-page .pre-order-availability-date::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ff6f00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Availability label styling */
.product-details-page .pre-order-availability-date .availability-label {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

/* Availability date value */
.product-details-page .pre-order-availability-date .availability-date {
  font-weight: 700;
  color: var(--availability-icon-color);
  font-size: 14px;
}

/* ==========================================================================
   OVERVIEW BUTTONS - Wishlist, Compare, Email
   ========================================================================== */

.product-details-page .overview-buttons {
  display: flex;
  gap: 12px;
  margin: 12px 0; /* Reduced from 16px */
}

.product-details-page .overview-buttons .button-2 {
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  border: 2px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.product-details-page .overview-buttons .button-2:hover {
  border-color: var(--border-medium);
  background: var(--bg-light);
  color: var(--text-primary);
}

/* ==========================================================================
   TYPOGRAPHY ENHANCEMENTS - Clear Hierarchy
   ========================================================================== */

/* Establish consistent font weights */
.product-details-page h1 {
  font-weight: 700; /* Bold for main heading */
}

.product-details-page h2 {
  font-weight: 600; /* Semi-bold for subheadings */
}

/* Body text consistency */
.product-details-page p,
.product-details-page span,
.product-details-page div {
  line-height: 1.5; /* Consistent readable line height */
}

/* Label consistency */
/*.product-details-page label {
    font-weight: 600;
    color: var(--text-primary);
}*/

/* ==========================================================================
   MATRIX UI COMPATIBILITY - Ensure Red Theme Works
   ========================================================================== */

/* Matrix color selections should use red theme */
.product-matrix .color-swatch.selected,
.product-matrix .color-option.selected {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px var(--accent-red) !important;
}

/* Matrix size selections should use red theme */
.product-matrix .size-swatch.selected,
.product-matrix .size-option.selected {
  background: var(--accent-red) !important;
  color: #fff !important;
  border-color: var(--accent-red) !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS - Mobile Optimizations
   ========================================================================== */

@media (max-width: 991.98px) {
  .product-details-page .attributes dl.row {
    flex-direction: column;
  }

  .product-details-page .attributes dl.row dt {
    flex: none;
    margin-bottom: 8px;
  }

  .product-details-page .price-availability {
    padding: 6px 0; /* Reduced for mobile */
    margin: 6px 0 0 0; /* Tighter mobile spacing - no bottom margin */
  }
}

@media (max-width: 768px) {
  .product-details-page .product-name h1 {
    font-size: 22px;
    margin-bottom: 10px; /* Reduced from 12px */
    margin-top: 10px;
  }

  .product-details-page .product-price .price-value {
    font-size: 28px;
  }

  .product-details-page .add-to-cart .add-to-cart-button {
    max-width: 100%;
  }

  .product-details-page .add-to-cart .quantity-box {
    max-width: 100%;
  }

  /* Maintain minimum touch targets on mobile */
  .product-details-page .attributes .color-squares label {
    min-width: 70px;
    min-height: 70px;
  }

  /*    .product-details-page .attributes .image-squares .image-squares-container {
        min-width: 76px;
        min-height: 76px;
    }*/

  .product-details-page .attributes .option-list input[type="radio"] + label {
    min-width: 44px; /* Maintained for size swatches */
    min-height: 44px;
  }

  /* Dropdown width adjustment for mobile */
  .product-details-page .attributes select {
    max-width: 100%;
  }

  /* Add-to-cart panel wraps on tablet */
  .product-details-page .add-to-cart .add-to-cart-panel {
    gap: 8px;
  }

  /* Optimize availability date on tablet */
  .product-details-page .pre-order-availability-date {
    padding: 8px 0;
    font-size: 11px;
    gap: 6px;
    flex: 1 1 auto; /* Allow flexible width */
    min-width: 200px; /* Prevent too much compression */
  }

  .product-details-page .pre-order-availability-date::before {
    width: 14px;
    height: 14px;
  }

  .product-details-page .pre-order-availability-date .availability-label {
    font-size: 10px;
  }

  .product-details-page .pre-order-availability-date .availability-date {
    font-size: 12px;
  }

  /* Pre-order button flexible width on tablet */
  .product-details-page .add-to-cart .add-to-cart-button.pre-order-button {
    flex: 1 1 auto;
    min-width: 140px;
  }
}

@media (max-width: 576px) {
  /* Further spacing optimization for small screens */
  .product-details-page .short-description {
    margin-bottom: 12px; /* Reduced from 16px */
  }

  .product-details-page .attributes {
    margin: 12px 0; /* Reduced from 16px */
  }

  .product-details-page .attributes dl.row {
    margin-bottom: 12px; /* Reduced from 16px */
  }

  /* Color swatches remain readable on small screens - v3 */
  .product-details-page .attributes .color-squares label {
    width: 70px;
    height: 70px;
  }

  /*    .product-details-page .attributes .image-squares .image-squares-container {
        width: 76px;
        height: 76px;
    }*/

  /* Full-width pre-order button on mobile */
  .product-details-page .add-to-cart .add-to-cart-button.pre-order-button {
    max-width: 100%;
  }

  /* Stack button and availability on very small screens */
  .product-details-page .add-to-cart .add-to-cart-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Full-width availability date on mobile */
  .product-details-page .pre-order-availability-date {
    padding: 10px 0;
    font-size: 12px;
    gap: 6px;
    width: 100%;
    min-width: unset;
    justify-content: center;
  }

  .product-details-page .pre-order-availability-date::before {
    width: 14px;
    height: 14px;
  }

  .product-details-page .pre-order-availability-date .availability-label {
    font-size: 11px;
  }

  .product-details-page .pre-order-availability-date .availability-date {
    font-size: 13px;
  }

  /* Full-width pre-order button on mobile */
  .product-details-page .add-to-cart .add-to-cart-button {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    min-width: unset;
  }
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .product-details-page
    .attributes
    .color-squares
    input[type="radio"]:checked
    + label {
    box-shadow:
      var(--shadow-md),
      0 0 0 4px var(--accent-red);
  }

  .product-details-page
    .attributes
    .option-list
    input[type="radio"]:checked
    + label {
    border-width: 3px;
  }

  .product-details-page .add-to-cart-button.pre-order-button {
    border: 2px solid var(--preorder-bg-hover);
  }

  .product-details-page .pre-order-availability-date {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .product-details-page .attributes .color-squares label,
  .product-details-page .attributes .option-list input[type="radio"] + label,
  .product-details-page .add-to-cart .add-to-cart-button {
    transition: none;
  }
}

/* Focus visible polyfill for older browsers */
.product-details-page .attributes input[type="radio"]:focus + label {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
}

/* Pre-order button focus state */
.product-details-page .add-to-cart .add-to-cart-button:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
}

/* ==========================================================================
   PRINT STYLES - Professional Product Documentation
   ========================================================================== */

@media print {
  .product-details-page .overview-buttons,
  .product-details-page .add-to-cart {
    display: none;
  }

  .product-details-page .product-price .price-value {
    color: #000;
  }

  .product-details-page .pre-order-availability-date {
    background: transparent;
    border: 1px solid #000;
    color: #000;
  }
}
