/* ===========================
   GLOBAL POPUP BEHAVIOUR
   =========================== */

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Overlay covering the whole screen */
.product-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;              /* toggled via jQuery fadeIn/fadeOut */
    z-index: 9999;
    backdrop-filter: blur(2px);
}

/* Centered popup panel – desktop default */
.product-popup .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    height: 88vh;               /* tall rectangle */
    max-height: 820px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: xds-popup-slide-in 0.3s ease-out;
}

/* Popup header */
.popup-header {
    background: #5317B7;
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    margin-right: 10px;
}

/* Close (X) button */
.close-popup {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.close-popup span {
    display: block;
    line-height: 1;
}

/* Iframe showing the product page */
.product-iframe {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    border: none;
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Simple pop-in animation */
@keyframes xds-popup-slide-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===========================
   THUMBNAIL CARD STYLING
   =========================== */

/* Let us position the ? bubble relative to each option */
.composite_form .component_option_thumbnail {
    position: relative;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

/* Purple border + subtle glow when selected */
.composite_form .component_option_thumbnail.selected,
.composite_form .component_option_thumbnail.product-selected {
    border: 3px solid #5317b7;
    box-shadow: 0 0 0 1px rgba(83, 23, 183, 0.15);
}

/* ===========================
   INFO / QUESTION MARK BADGE
   =========================== */

/* Base styling for the INFO link – turned into a circular ? badge */
.composite_form .component_option_thumbnail .view_product_link {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background-color: #ffffff;
    border: 2px solid #5317b7;
    color: #5317b7;
    display: none;              /* default hidden */
    align-items: center;
    justify-content: center;
    font-size: 0;               /* hide literal "INFO" text */
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    padding: 0;
    z-index: 30;
    pointer-events: auto;
}

/* Show the badge:
   - when item is selected
   - OR when you hover any option thumbnail
*/
.composite_form .component_option_thumbnail.selected .view_product_link,
.composite_form .component_option_thumbnail.product-selected .view_product_link,
.composite_form .component_option_thumbnail:hover .view_product_link {
    display: flex;
}

/* Render an "i" inside the circle (desktop + mobile) */
.composite_form .component_option_thumbnail .view_product_link::before {
    content: "i";
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

/* Hover state for the question mark badge */
.composite_form .component_option_thumbnail .view_product_link:hover {
    background-color: #5317b7;
    color: #ffffff;
}

/* ===========================
   RESPONSIVE TWEAKS
   =========================== */

/* Tablets / small laptops */
@media (max-width: 1024px) {
    .product-popup .popup-content {
        width: 95%;
        height: 88vh;
        max-height: none;
    }
}

/* Phones */
@media (max-width: 768px) {

    .product-popup .popup-content {
        width: 94%;
        height: 76vh;
        height: 76dvh;
        max-height: 620px;
        min-height: 0;
        overflow: hidden;
    }

    .popup-header {
        padding: 10px 12px;
        flex: 0 0 auto;
    }

    .popup-title {
        font-size: 14px;
        line-height: 1.25;
    }

    .close-popup {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 38px;
    }

    .product-iframe {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* ===========================
   DESKTOP THUMBNAIL CARD GRID LAYOUT
   (Row-style cards, multiple columns)
   =========================== */

@media (min-width: 769px) {

  /* Use available width and reduce vertical scrolling by laying cards in columns.
     Composite Products can output different containers depending on layout; support both. */
  .single-product .composite_form ul.component_option_thumbnails_container,
  .single-product .composite_form .component_option_thumbnails_container,
  .single-product .composite_form .component_option_thumbnails {
    /* Use flex-wrap so we can reliably fit 2 cards per row in narrow product-page columns
       (grid min-widths can collapse to a single column depending on theme layout). */
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
  }

  .single-product .composite_form ul.component_option_thumbnails_container li.component_option_thumbnail_container,
  .single-product .composite_form .component_option_thumbnails_container .component_option_thumbnail_container,
  .single-product .composite_form .component_option_thumbnails .component_option_thumbnail_container {
    float: none !important;
    width: auto !important;
    /* Force 2 cards per row on desktop across all component containers.
       Allow slight shrinking to prevent accidental wrapping to 1 column in tight theme layouts. */
    flex: 1 1 calc((100% - 14px) / 2) !important;
    max-width: calc((100% - 14px) / 2) !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  /* Some Composite layouts render thumbnails without the li wrapper.
     Apply the same 2-col sizing to direct children as a fallback. */
  .single-product .composite_form .component_option_thumbnails > .component_option_thumbnail {
    flex: 1 1 calc((100% - 14px) / 2) !important;
    max-width: calc((100% - 14px) / 2) !important;
  }

  .single-product .composite_form .component_option_thumbnail {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    min-height: 96px !important;
  }

  .single-product .composite_form .component_option_thumbnail.selected,
  .single-product .composite_form .component_option_thumbnail.product-selected {
    border: 3px solid #5317b7 !important;
    box-shadow: 0 0 0 1px rgba(83, 23, 183, 0.15) !important;
    z-index: 1;
  }

  /* Desktop thumbnail size (slightly larger than mobile, still compact). */
  .single-product .composite_form .component_option_thumbnail .thumbnail_image {
    padding: 0 !important;
    flex: 0 0 92px !important;
    width: 92px !important;
    margin: 0 !important;
  }

  .single-product .composite_form .component_option_thumbnail .thumbnail_image img {
    width: 92px !important;
    height: 92px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
  }

  .single-product .composite_form .component_option_thumbnail .thumbnail_description {
    flex: 1 1 auto !important;
    padding: 14px 14px 14px 0 !important;
    margin: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .single-product .composite_form .component_option_thumbnail .thumbnail_price {
    order: -1 !important;
    display: block !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.1 !important;
  }

  .single-product .composite_form .component h5.thumbnail_title.title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .single-product .composite_form .component_option_thumbnail.selected .thumbnail_description::before,
  .single-product .composite_form .component_option_thumbnail.product-selected .thumbnail_description::before {
    content: 'Selected' !important;
    display: inline-block !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #5317b7 !important;
    margin-bottom: 2px !important;
  }

  /* Hide the big SELECT button on desktop as well (card itself is clickable). */
  .single-product .composite_form .component_option_thumbnail .thumbnail_buttons {
    display: none !important;
  }

  /* Info badge stays hover/selected-driven on desktop. */
  .single-product .composite_form .component_option_thumbnail .view_product_link {
    top: 10px !important;
    right: 10px !important;
  }
}

/* ===========================
   MOBILE THUMBNAIL LIST LAYOUT
   (Denser card rows like reference screenshot)
   =========================== */

@media (max-width: 768px) {

  /* Background fill behind filters + between option cards (mobile). */
  .single-product .composite_form .component_inner,
  .single-product .composite_form .component_content,
  .single-product .composite_form .component_options,
  .single-product .composite_form .component_filters,
  .single-product .composite_form .component_filter,
  .single-product .composite_form .component_filter_title,
  .single-product .composite_form .component_filter_content,
  .single-product .composite_form ul.component_option_thumbnails_container {
    background: #EDF1F6 !important;
  }

  /* Keep the component heading bar white. */
  .single-product .composite_form .component_title,
  .single-product .composite_form .component_title_wrapper {
    background: #ffffff !important;
  }

  /* One option per row */
  .single-product .composite_form ul.component_option_thumbnails_container {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px !important; /* ensures top outline + shows filled background between cards */
    border-top: 1px solid #d1d5db !important;
    box-sizing: border-box !important;
  }

  /* Fill background between heading and first card (filter area). */
  .single-product .composite_form .component_filters {
    padding: 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .single-product .composite_form ul.component_option_thumbnails_container li.component_option_thumbnail_container {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  /* Card row */
  .single-product .composite_form .component_option_thumbnail {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Selected state: keep existing brand border colour, but make it clearer */
  .single-product .composite_form .component_option_thumbnail.selected,
  .single-product .composite_form .component_option_thumbnail.product-selected {
    border: 3px solid #5317b7 !important;
    box-shadow: 0 0 0 1px rgba(83, 23, 183, 0.15) !important;
    z-index: 1;
  }

  /* Image sizing (mobile, slightly taller than previous compact layout) */
  .single-product .composite_form .component_option_thumbnail .thumbnail_image {
    padding: 0 !important;
    flex: 0 0 72px !important;
    width: 72px !important;
  }

  .single-product .composite_form .component_option_thumbnail .thumbnail_image img {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
  }

  /* Text block */
  .single-product .composite_form .component_option_thumbnail .thumbnail_description {
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* Price first (above title) */
  .single-product .composite_form .component_option_thumbnail .thumbnail_price {
    order: -1 !important;
    display: block !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1.1 !important;
  }

  /* Title sizing similar to reference */
  .single-product .composite_form .component h5.thumbnail_title.title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  /* Selected label */
  .single-product .composite_form .component_option_thumbnail.selected .thumbnail_description::before,
  .single-product .composite_form .component_option_thumbnail.product-selected .thumbnail_description::before {
    content: 'Selected' !important;
    display: inline-block !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #5317b7 !important;
    margin-bottom: 2px !important;
  }

  /* Hide the big SELECT button on mobile (thumbnail itself is clickable) */
  .single-product .composite_form .component_option_thumbnail .thumbnail_buttons {
    display: none !important;
  }

  /* Always show the info badge on mobile (no hover state) */
  .single-product .composite_form .component_option_thumbnail .view_product_link {
    display: flex !important;
    top: 10px !important;
    right: 10px !important;
  }

  /* Use an "i" to match the reference style */
  .single-product .composite_form .component_option_thumbnail .view_product_link::before {
    content: 'i' !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }
}


/* === Moved from theme: configure footer bar & basket === */

/*-------------custom css for configure pages and baskets.............*/
/* ===== FOOTER BAR ===== */
.composite_wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000000;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  z-index: 9999;
  gap: 30px;
  /* Safe area support for devices with notches/curves */
  padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

/* Hide quantity inputs */
.composite_form .quantity,
.composite_form .qty,
.composite_button .quantity {
  display: none !important;
}

/* Fix excessive top padding */
.composite_form:not(.paged) .composite_wrap {
  padding-top: 0.75rem !important;
}

/* Fix price margins */
.composite_form .composite_price p.price,
.single-product .composite_form .composite_price p.price {
  margin: 0 !important;
  line-height: 1em;
}

/* ===== MAIN ELEMENTS ===== */
.footer_product_title,
.composite_price,
.composite_button {
  display: flex;
  align-items: center;
  height: auto;
}

/* Price - First position */
.composite_price {
  font-weight: 800;
  font-size: 1.5em;
  color: #ffffff;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  order: 1;
  position: relative;
}

/* Add vertical line after price */
.composite_price::after {
  content: '|';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 1.2em;
  font-weight: normal;
}

/* Estimated Dispatch - Center position - Remove flex: 1 */
.footer_product_title {
  font-weight: 400;
  font-size: 0.9em;
  color: #cccccc;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
  order: 2;
  position: relative;
  flex-shrink: 0;
}

/* Add vertical line after dispatch */
.footer_product_title::after {
  content: '|';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 1.2em;
  font-weight: normal;
}

/* Add to Cart Button - Last position */
.composite_button {
  order: 3;
  flex-shrink: 0;
}

/* VAT-excluded price styling */
.composite_price .vat-excluded-price {
  font-size: 0.65em;
  font-weight: 400;
  color: #cccccc;
  line-height: 1;
  white-space: nowrap;
  margin-top: 2px;
  display: block;
}

/* Add to Cart Button */
.composite_button .single_add_to_cart_button {
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
  white-space: nowrap;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0 20px;
  flex-shrink: 0;
  /* Better touch target */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Desktop hover effects only */
@media (hover: hover) and (pointer: fine) {
  .composite_button .single_add_to_cart_button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
}

/* ===== TABLET (769px to 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .composite_wrap {
    gap: 25px;
  }
  
  .footer_product_title {
    font-size: 0.85em;
  }
  
  .composite_price::after,
  .footer_product_title::after {
    right: -12px;
    font-size: 1.1em;
  }
  
  .composite_button .single_add_to_cart_button {
    min-width: 130px;
    padding: 0 15px;
  }
  
  .composite_price .vat-excluded-price {
    font-size: 0.6em;
  }
}

/* ===== MOBILE (768px and below) ===== */
@media (max-width: 768px) {
  .composite_wrap {
    justify-content: center;
    padding: 15px 15px 20px 15px;
    gap: 15px;
    /* Enhanced safe area support for mobile */
    padding-bottom: max(20px, calc(15px + env(safe-area-inset-bottom)));
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }
  
  /* Hide estimated dispatch on mobile */
  .footer_product_title {
    display: none !important;
  }
  
  /* Remove vertical lines on mobile */
  .composite_price::after,
  .footer_product_title::after {
    display: none;
  }
  
  .composite_price {
    font-size: 1.3em;
    order: 1;
    flex-shrink: 0;
  }
  
  .composite_price .vat-excluded-price {
    font-size: 0.55em;
    margin-top: 1px;
  }
  
  .composite_button {
    order: 2;
    flex-shrink: 0;
  }
  
  .composite_button .single_add_to_cart_button {
    height: 44px; /* Increased height for better touch target */
    min-width: 130px; /* Slightly wider */
    padding: 0 20px; /* More padding */
    font-size: 16px; /* Prevent zoom on iOS */
    font-weight: 600;
    border: none;
    outline: none;
    /* Better touch experience */
    -webkit-appearance: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* Mobile active/pressed state */
  .composite_button .single_add_to_cart_button:active {
    transform: translateY(1px);
    opacity: 0.8;
    background-color: var(--button-active-color, #0066cc) !important;
  }
}

/* ===== VERY SMALL MOBILE (below 480px) ===== */
@media (max-width: 480px) {
  .composite_wrap {
    padding: 12px 10px 25px 10px; /* Even more bottom padding */
    gap: 12px;
    /* Enhanced safe area for small screens */
    padding-bottom: max(25px, calc(20px + env(safe-area-inset-bottom)));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  
  .composite_price {
    font-size: 1.2em;
  }
  
  .composite_price .vat-excluded-price {
    font-size: 0.5em;
  }
  
  .composite_button .single_add_to_cart_button {
    height: 42px;
    min-width: 120px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 600;
  }
}

/* ===== IPHONE SPECIFIC ADJUSTMENTS ===== */
@media (max-width: 430px) and (-webkit-min-device-pixel-ratio: 2) {
  /* iPhone Pro Max and similar - NO CURVES OR MARGINS */
  .composite_wrap {
    padding-bottom: max(30px, calc(25px + env(safe-area-inset-bottom)));
    /* Removed border-radius and margins to fix gap issue */
    width: 100%;
    left: 0;
  }
  
  .composite_button .single_add_to_cart_button {
    height: 48px; /* Even taller for better touch */
    border-radius: 8px;
    font-weight: 700;
  }
}

/* ===== HOME INDICATOR SUPPORT (iOS) ===== */
@supports (padding: max(0px)) {
  .composite_wrap {
    padding-bottom: max(15px, calc(15px + env(safe-area-inset-bottom)));
  }
  
  @media (max-width: 768px) {
    .composite_wrap {
      padding-bottom: max(25px, calc(20px + env(safe-area-inset-bottom)));
    }
  }
  
  @media (max-width: 480px) {
    .composite_wrap {
      padding-bottom: max(30px, calc(25px + env(safe-area-inset-bottom)));
    }
  }
}
/* ============================================= */
/* GLOBAL STYLES */
/* ============================================= */

/* Page background */
body.single-product {
  background-color: #F7F7F8;
  color: #000;
}

/* Section padding */
.l-section {
  padding: 0 0.5rem;
}

/* ============================================= */
/* COMPOSITE PRODUCTS - COMPONENT STRUCTURE */
/* ============================================= */

/* Hide section titles and product titles */
p.component_section_title,
h4.composited_product_title {
  display: none;
  margin: 0;
  padding: 0;
}

/* Force full width on component containers */
.product .component,
.product .composite_component,
.product .component_inner,
.product .component .component_wrapper,
.composite_item .component,
.composite_data .component {
  width: 100% !important;
  max-width: none !important;
}

/* Component inner structure */
.product .component_inner {
  background-color: transparent;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}

/* ============================================= */
/* COMPONENT HEADERS (BLACK BARS) */
/* ============================================= */

.product .component_title_wrapper {
  width: 100% !important;
  min-width: 100%;
  margin: 0;
  background-color: #000;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.product .component_title_wrapper .component_title {
  color: #fff;
  font-size: 1.4em;
  font-weight: 500;
  margin: 5px;
  width: 100%;
}

/* ============================================= */
/* COMPONENT OPTIONS & DROPDOWNS */
/* ============================================= */

/* Dropdown styling */
.product .component_option_dropdown,
.product .component_option_dropdown select {
  width: 100% !important;
  max-width: 100% !important;
}

.component.options-style-dropdowns .component_options_select_wrapper {
  display: block !important;
  margin-top: 20px !important;
}

/* Thumbnail grid layout */
.component_option_thumbnails {
  width: 100% !important;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 !important;
  margin: 0 !important;
  background-color: #fff;
}

.component_option_thumbnail {
  flex: 1 0 calc(25% - 10px);
  min-width: 120px;
  box-sizing: border-box;
}

/* Thumbnail titles and descriptions */
.composite_form .component h5.thumbnail_title.title {
  color: #000;
  font-size: 0.9em;
  margin-top: 10px;
}

.component_option_thumbnail_container .thumbnail_description {
  padding: 0 !important;
}

.component_description {
  margin: 1.618em 0;
}

/* Select buttons */
.button.component_option_thumbnail_select {
  background-color: #5317B7;
  color: white !important;
  padding: 15px 25px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 16px;
}

/* ============================================= */
/* COMPONENT FILTERS */
/* ============================================= */

.component_filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  background: transparent;
  margin: 0;
  padding: 0;
}

.component_filter {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  min-width: 120px;
}

.component_filter_title {
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 28px;
}

.component_filter_name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.component_filter_name .aria_button {
  order: 1;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
}

.component_filter_name_text {
  order: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
  color: #5317b7 !important;
}

/* Reset filter button */
.component_filters a.reset_component_filter {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block !important;
  opacity: 0.6;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  transition: opacity 0.2s;
  z-index: 1;
}

.component_filters a.reset_component_filter::after {
  content: "×";
  display: block;
}

.component_filters a.reset_component_filter:hover {
  opacity: 1;
}

/* ============================================= */
/* PAGINATION & NAVIGATION */
/* ============================================= */

.component .component_pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.component .component_pagination .index {
  order: -1;
  margin-bottom: 2px;
  padding: 0;
  outline: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.component .component_pagination .component_pagination_element {
  padding: 5px 20px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.component_pagination.cp_clearfix.top {
  display: none;
}

.component .component_pagination:not(.component_options_append) {
  padding: 0 !important;
  margin-bottom: 0 !important;
  font-size: 0.88em;
  text-align: right;
}

/* ============================================= */
/* PRODUCT LINKS & INFO */
/* ============================================= */

.view_product_link {
  display: none;
}

.product-selected .view_product_link {
  display: inline;
  background-color: #5317b7;
  color: white;
  padding: 0;
  margin: 0;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 0;
  box-sizing: border-box;
}

/* ============================================= */
/* CART PAGE STYLES */
/* ============================================= */

/* Component details in cart */
.woocommerce-cart .component dt,
.woocommerce-checkout .component dt,
.woocommerce.widget_shopping_cart .component dt {
  font-weight: bold;
  color: #000000;
  display: inline;
}

.woocommerce-cart .component dd p,
.woocommerce-checkout .component dd p,
.woocommerce.widget_shopping_cart .component dd p {
  color: #5317b7;
  display: inline;
  margin: 0;
}

/* Cart page reset */
body.woocommerce-cart .woocommerce {
  all: revert !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce-cart-form {
  display: block !important;
  opacity: 1 !important;
}

/* Edit PC link in cart */
.woocommerce .edit_composite_in_cart_text::before {
  content: "EDIT PC";
  display: inline-block;
  padding: 3px 8px;
  border: 2px solid #5317b7;
  color: #5317b7;
  font-weight: bold;
  font-size: 14px;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.2s ease;
  margin-left: 5px;
}

.woocommerce .edit_composite_in_cart_text:hover::before {
  background-color: #5317b7;
  color: white;
}

.woocommerce .edit_composite_in_cart_text small {
  display: none;
}

/* ============================================= */
/* NOTICES & RESULT COUNT */
/* ============================================= */

.woocommerce-notices-wrapper {
  margin-bottom: 20px;
  width: 100%;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
  margin: 0 0 20px 0;
  padding: 15px;
  border: none;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

.woocommerce-result-count {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  opacity: 0.5;
}

/* ============================================= */
/* UTILITY CLASSES */
/* ============================================= */

/* Spinner animation */
.us-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0,0,0,0.3);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Column overlay */
.vc_column-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
}

/* Home icon blocks hover */
.home-icon-blocks a.vc_column-link.smooth-scroll:hover {
  background: #7315e51c;
}

/* ============================================= */
/* RESPONSIVE DESIGN */
/* ============================================= */

/* Tablet and mobile navigation */
@media (max-width: 899px) {
  ul.w-nav-list.level_1.hover_simple a {
    font-size: 15px !important;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .product .component_title_wrapper .component_title {
    font-size: 1.1em;
    margin: 8px;
  }
  
  .component_filters {
    flex-direction: column;
    gap: 8px;
  }
  
  .component_filter {
    width: 100%;
    min-width: 0;
  }
  
  .component_filter_title {
    padding-right: 26px;
  }
}

/* Very small mobile */
@media (max-width: 549px) {
  .game-list-box .valign_top.align_none {
    grid-template-columns: repeat(1, 1fr);
  }
}


/* Purple border for selected WooCommerce composite product components */
.component_option_thumbnail.selected,
.component_option_thumbnail.product-selected {
    border: 2px solid #8B5CF6 !important; /* Purple border - reduced thickness */
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2); /* Optional: subtle glow effect */
    transition: all 0.3s ease; /* Smooth transition when selecting/deselecting */
}

/* Alternative: If you want a thicker, more prominent border */
.component_option_thumbnail.selected,
.component_option_thumbnail.product-selected {
    border: 2px solid #7C3AED !important; /* Purple border - reduced thickness */
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px); /* Slight lift effect */
    transition: all 0.3s ease;
}

/* Optional: Hover effect for non-selected items */
.component_option_thumbnail:not(.selected):not(.product-selected):hover {
    border: 2px solid #D8B4FE; /* Light purple on hover */
    transition: all 0.3s ease;
}

/* Ensure the border doesn't affect layout by adjusting for existing borders */
.component_option_thumbnail {
    border: 2px solid transparent; /* Default transparent border to prevent layout shift */
    margin: 2px; /* Small margin to accommodate the border */
}

/* If you want to make the selected item stand out even more */
.component_option_thumbnail.selected .thumbnail_title,
.component_option_thumbnail.product-selected .thumbnail_title {
    color: #7C3AED; /* Purple text for selected items */
    font-weight: 600;
}

/* Info bubble for selected items (match mobile style) */
.component_option_thumbnail.selected .view_product_link,
.component_option_thumbnail.product-selected .view_product_link {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffffff;
    border: 2px solid #5317b7;
    color: #5317b7 !important;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: 800;
    z-index: 10;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.component_option_thumbnail.selected .view_product_link::before,
.component_option_thumbnail.product-selected .view_product_link::before {
    content: "i";
    font-size: 14px;
    font-weight: 800;
}

/* Hover effect for the info bubble */
.component_option_thumbnail.selected .view_product_link:hover,
.component_option_thumbnail.product-selected .view_product_link:hover {
    background: #5317b7;
    color: #ffffff !important;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Hide the original text content of the INFO link */
.component_option_thumbnail.selected .view_product_link,
.component_option_thumbnail.product-selected .view_product_link {
    font-size: 0; /* Hide the original text */
    overflow: hidden;
}

/* Make sure the container has relative positioning for the checkmark */
.component_option_thumbnail {
    position: relative;
}



/* === Moved from theme: configure warning message popup === */

/*custom code for configure page warning message popup*/

/* ===== SLIDING NOTIFICATION BAR ===== */
.validation_message {
  position: fixed;
  top: -100px; /* Start hidden above viewport */
  left: 0;
  width: 100%;
  background-color: #fff8e5;
  border-bottom: 2px solid #ffc107;
  padding: 12px 15px;
  text-align: center;
  z-index: 9999;
  animation: slideIn 0.5s forwards;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ===== MESSAGE CONTENT ===== */
.woocommerce-info {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100%;
}

.woocommerce-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woocommerce-info li {
  display: inline;
  white-space: nowrap;
}

.msg-source {
  font-weight: bold;
  color: #333;
}

.msg-content {
  color: #d32f2f;
  font-weight: 500;
}

/* ===== ANIMATION ===== */
@keyframes slideIn {
  from { top: -100px; }
  to { top: 0; }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

/* Desktop (min-width: 1025px) - Default styles apply */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .validation_message {
    padding: 10px 12px;
  }
  
  .woocommerce-info li {
    white-space: normal;
    display: block;
  }
  
  .msg-source, .msg-content {
    display: inline;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .validation_message {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .woocommerce-info ul {
    white-space: normal;
    display: block;
    text-overflow: clip;
  }
  
  .msg-source {
    display: block;
    margin-bottom: 2px;
  }
  
  .msg-content {
    display: block;
  }
}

/* Remove default WooCommerce icon */
.woocommerce-info::before {
  display: none !important;
}



/* Full-screen popup mode variant */
.product-popup.xds-popup-fullscreen .popup-content {
    height: 100%;
    max-height: none;
    width: 100%;
    border-radius: 0;
}

/* Keep mobile product info popups compact, even if fullscreen mode is enabled. */
@media (max-width: 768px) {
    .product-popup.xds-popup-fullscreen .popup-content {
        width: 94%;
        height: 76vh;
        height: 76dvh;
        max-height: 620px;
        border-radius: 12px;
    }
}


/* ===========================
   DISPATCH LABELS (FOOTER + GRIDS)
   =========================== */

.single-product .composite_wrap .footer_product_title {
    line-height: 1.4;
}

.grid-dispatch-date,
.xds-dispatch-date {
    line-height: 1.4;
    color: #666666;
    margin-top: 6px;
}


/* ===========================
   XDS SYSTEM SUMMARY PANEL
   =========================== */





.single-product .composite_form .xds-system-summary {
    margin: 0 0 16px 0;
    padding: 14px 16px;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.03);
}

/* System Summary title – largest & boldest */
.single-product .composite_form .xds-system-summary__title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    color: #25282b;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 4px;
}

/* Container for all rows */
.single-product .composite_form .xds-system-summary__list {
    display: flex;
    flex-direction: column;
    gap: 2px; /* tighter spacing between rows */
}

/* Each component row */
.single-product .composite_form .xds-system-summary__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 2px 0; /* reduced vertical padding */
    border-bottom: 1px dashed #e5e7eb;
}

.single-product .composite_form .xds-system-summary__row:last-child {
    border-bottom: none;
}

/* Component label – medium bold, slightly smaller than title */
.single-product .composite_form .xds-system-summary__label {
    min-width: 160px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #25282b;
    text-align: left;
}

/* Component value – smaller & normal weight */
.single-product .composite_form .xds-system-summary__value {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 400;
    color: #4b5563;
    text-align: left;
    line-height: 1.3;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .single-product .composite_form .xds-system-summary {
        padding: 12px 12px;
        margin-bottom: 12px;
    }

    .single-product .composite_form .xds-system-summary__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
        padding: 2px 0;
    }

    .single-product .composite_form .xds-system-summary__label {
        min-width: 0;
    }

    .single-product .composite_form .xds-system-summary__value {
        text-align: left;
    }
}



/* Hide INFO bubble for placeholder "No options selected" product tiles */
.component_option_thumbnail.xds-no-info-link .view_product_link {
    display: none !important;
}




/* ============================================= */
/* MOBILE / TABLET ACCORDION FOR COMPONENTS      */
/* ============================================= */

/* Selected text + label styling (base) */
.single-product .composite_form .component_title_wrapper .xds-accordion-chosen {
    display: none;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    color: #4b5563;
}

/* Mobile / tablet layout */
@media (max-width: 1024px) {

    /* Flatten the header into a single summary row */
    .single-product .composite_form .component_title_wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        background-color: #ffffff !important;
        color: #111827 !important;
        padding: 10px 14px !important;
        border-bottom: 1px solid #e5e7eb !important;
        height: auto !important;
        box-shadow: none !important;
    }

    .single-product .composite_form .component_title_wrapper .component_title {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        text-transform: none !important;
        color: #111827 !important;
    }

    /* Add colon after component name */
    .single-product .composite_form .component_title_wrapper .component_title::after {
        content: ':' !important;
        display: inline-block !important;
        margin: 0 4px 0 4px !important;
        font-weight: 600 !important;
    }

    /* Selected option text on the same line */
    .single-product .composite_form .component_title_wrapper .xds-accordion-chosen {
        display: inline !important;
        font-size: 0.85rem !important;
        font-weight: 400 !important;
        color: #4b5563 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 70% !important;
    }

    /* Plus / minus icon (moved to the left, just before the heading) */
    .single-product .composite_form .component.xds-accordion-enabled .component_title_wrapper::before {
        content: '+' !important;
        margin-right: 10px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #4b5563 !important;
        transition: transform 0.2s ease !important;
    }

    .single-product .composite_form .component.xds-accordion-enabled.xds-accordion-expanded .component_title_wrapper::before {
        content: '−' !important;
    }

    /* Collapse / expand all toggle row (inserted via JS) */
    .single-product .composite_form .xds-accordion-toggle-all .component_title::after {
        content: '' !important;
        margin: 0 !important;
    }

    .single-product .composite_form .xds-accordion-toggle-all::before {
        content: '+' !important;
        margin-right: 10px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #4b5563 !important;
        transition: transform 0.2s ease !important;
    }

    .single-product .composite_form .xds-accordion-toggle-all.xds-accordion-toggle-all-expanded::before {
        content: '−' !important;
    }

    /* Hide / show component inner content */
    .single-product .composite_form .component.xds-accordion-enabled.xds-accordion-collapsed .component_inner {
        display: none !important;
    }

    .single-product .composite_form .component.xds-accordion-enabled.xds-accordion-expanded .component_inner {
        display: block !important;
    }
}

/* XDS Bring Your Own GPU helper - neat in-card layout */
.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-option-active {
    box-sizing: border-box !important;
    overflow: hidden !important;
    align-items: flex-start !important;
}

/* Give the BYO card a predictable layout without affecting normal GPU cards. */
.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-option-active .thumbnail_description {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-option-active .thumbnail_title,
.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-option-active .title {
    margin-bottom: 6px !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
}

.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-option-active .thumbnail_buttons {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* The panel is appended inside .thumbnail_description so it stays inside the card. */
.single-product .composite_form .thumbnail_description > .xds-byo-gpu-panel,
.single-product .composite_form .component_option_thumbnail > .xds-byo-gpu-panel {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 7px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    clear: both !important;
}

/* The card already explains this is the BYO GPU option, so keep extra copy compact. */
.single-product .composite_form .xds-byo-gpu-label {
    display: none !important;
}

.single-product .composite_form .xds-byo-gpu-help {
    display: block !important;
    margin: 0 0 6px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    color: rgba(34, 34, 34, 0.66) !important;
}

.single-product .composite_form .xds-byo-gpu-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.single-product .composite_form .xds-byo-gpu-input {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(34, 34, 34, 0.22) !important;
    border-radius: 7px !important;
    background: #fff !important;
    font-size: 13.5px !important;
    line-height: 1.3 !important;
}

.single-product .composite_form .xds-byo-gpu-input:focus {
    border-color: #5317b7 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 2px rgba(83, 23, 183, 0.14) !important;
}

.single-product .composite_form .xds-byo-gpu-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
}

.single-product .composite_form .xds-byo-gpu-save,
.single-product .composite_form .xds-byo-gpu-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.single-product .composite_form .xds-byo-gpu-save::before {
    content: "✓" !important;
    font-size: 17px !important;
}

.single-product .composite_form .xds-byo-gpu-cancel::before {
    content: "×" !important;
    font-size: 18px !important;
}

.single-product .composite_form .xds-byo-gpu-save {
    background: #5317b7 !important;
    color: #fff !important;
}

.single-product .composite_form .xds-byo-gpu-cancel {
    background: rgba(34, 34, 34, 0.10) !important;
    color: #222 !important;
}

.single-product .composite_form .xds-byo-gpu-save:disabled,
.single-product .composite_form .xds-byo-gpu-cancel:disabled {
    cursor: not-allowed !important;
    opacity: 0.42 !important;
}

.single-product .composite_form .xds-byo-gpu-saved {
    margin-top: 6px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #16a34a !important;
}

@media (max-width: 768px) {
    .single-product .composite_form .xds-byo-gpu-help {
        display: none !important;
    }

    .single-product .composite_form .xds-byo-gpu-input-row {
        gap: 6px !important;
    }

    .single-product .composite_form .xds-byo-gpu-input {
        min-height: 36px !important;
        font-size: 13px !important;
        padding: 7px 9px !important;
    }

    .single-product .composite_form .xds-byo-gpu-save,
    .single-product .composite_form .xds-byo-gpu-cancel {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }
}


/* BYO GPU textbox/buttons must receive keyboard and click events before the option-card handlers. */
.single-product .composite_form .xds-byo-gpu-panel,
.single-product .composite_form .xds-byo-gpu-input-row,
.single-product .composite_form .xds-byo-gpu-input,
.single-product .composite_form .xds-byo-gpu-actions,
.single-product .composite_form .xds-byo-gpu-save,
.single-product .composite_form .xds-byo-gpu-cancel {
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
}

.single-product .composite_form .xds-byo-gpu-input {
    user-select: text !important;
    -webkit-user-select: text !important;
    touch-action: manipulation !important;
}


/* Strong mobile/desktop override: never show INFO bubbles on placeholder / BYO GPU option cards. */
.single-product .composite_form .component_option_thumbnail.xds-no-info-link .view_product_link,
.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .view_product_link,
.single-product .composite_form .component_option_thumbnail.xds-no-info-link .xds-product-info-button,
.single-product .composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .xds-product-info-button,
.composite_form .component_option_thumbnail.xds-no-info-link .view_product_link,
.composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .view_product_link,
.composite_form .component_option_thumbnail.xds-no-info-link .xds-product-info-button,
.composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .xds-product-info-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 900px) {
    .single-product .composite_form .component_option_thumbnail.xds-no-info-link .view_product_link,
    .single-product .composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .view_product_link,
    .single-product .composite_form .component_option_thumbnail.xds-no-info-link .xds-product-info-button,
    .single-product .composite_form .component_option_thumbnail.xds-byo-gpu-no-info-link .xds-product-info-button {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}


/* === XDS v2.6.61.9: mobile product gallery polish only ===
   Keeps desktop untouched. Centers the main single-product gallery image on
   phones and lets it use the available viewport width with a small side margin. */
@media (max-width: 768px) {
  .single-product .woocommerce-product-gallery,
  .single-product .images,
  .single-product .us_product_gallery,
  .single-product .w-product-gallery,
  .single-product .w-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .single-product .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery__image,
  .single-product .woocommerce-product-gallery__image > a,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  .single-product .us_product_gallery .woocommerce-product-gallery__image,
  .single-product .w-gallery-list,
  .single-product .w-gallery-item,
  .single-product .w-gallery-item > a {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .single-product .woocommerce-product-gallery__image img,
  .single-product .woocommerce-product-gallery img.wp-post-image,
  .single-product .us_product_gallery img,
  .single-product .w-gallery img {
    display: block !important;
    width: calc(100vw - 32px) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* === XDS v2.6.61.9: mobile gallery/lightbox close visibility only ===
   Supports common WooCommerce, PhotoSwipe, Magnific, Fancybox, LightGallery,
   and Impreza close-button class names without changing desktop behaviour. */
@media (max-width: 768px) {
  body.single-product .pswp__button--close,
  body.single-product .woocommerce .pswp__button--close,
  body.single-product .mfp-wrap .mfp-close,
  body.single-product .mfp-close,
  body.single-product .fancybox-button--close,
  body.single-product .fancybox__button--close,
  body.single-product .lg-toolbar .lg-close,
  body.single-product .lg-close,
  body.single-product .w-popup-closer,
  body.single-product .us-popup-closer,
  body.single-product .us-lightbox .mfp-close {
    position: fixed !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 2147483647 !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    line-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    color: #ffffff !important;
    background-color: rgba(0, 0, 0, 0.62) !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    font-size: 34px !important;
    text-align: center !important;
  }

  body.single-product .pswp__button--close::before,
  body.single-product .mfp-close::before,
  body.single-product .fancybox-button--close::before,
  body.single-product .fancybox__button--close::before,
  body.single-product .lg-close::before,
  body.single-product .w-popup-closer::before,
  body.single-product .us-popup-closer::before {
    color: #ffffff !important;
    opacity: 1 !important;
  }
}


/* === XDS v2.6.61.9: desktop system summary width alignment only ===
   Aligns the custom System Summary card with the component black header bars on desktop.
   Mobile/tablet layouts are intentionally untouched. */
@media (min-width: 1025px) {
  body.single-product .composite_form,
  body.single-product .composite_form .composite_data,
  body.single-product .composite_form .composite_summary,
  body.single-product .composite_form .composite_summary_inner,
  body.single-product .composite_form .summary_elements {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  body.single-product .composite_form .xds-system-summary {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    align-self: stretch !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ===================================================================== */
/* XDS UI: "Default sorting" dropdown styled to match the filter controls */
/* Presentation only. Selector scope is the Composite Products sorting    */
/* control (.component_ordering); no behaviour, markup or script touched. */
/* ===================================================================== */
.single-product:not(.xds-ui-classic) .composite_form .component_ordering {
  margin: 0 0 6px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  text-align: left !important;
}

.single-product:not(.xds-ui-classic) .composite_form .component_ordering .component_orderby_title {
  display: none !important; /* label text is repeated by the select itself */
}

.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.component_orderby,
.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.orderby {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: inline-block !important;
  width: auto !important;
  min-width: 150px !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 6px 12px 6px 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: 4px 50% !important;
  background-size: 10px 6px !important;
  /* same purple caret as the filter controls, sitting on the left like them */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235317b7'/%3E%3C/svg%3E") !important;
  color: #5317b7 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  text-overflow: ellipsis;
  cursor: pointer;
}

.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.component_orderby:hover,
.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.orderby:hover {
  color: #3d1190 !important;
}

.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.component_orderby:focus-visible,
.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.orderby:focus-visible {
  outline: 2px solid rgba(83, 23, 183, .45) !important;
  outline-offset: 2px;
  border-radius: 4px !important;
}

/* The options list inside the open dropdown stays readable and native. */
.single-product:not(.xds-ui-classic) .composite_form .component_ordering select.orderby option {
  color: #222;
  font-weight: 400;
}

/* ===================================================================== */
/* XDS UI: longer option names + scroll cue. CSS only, presentation only. */
/* ===================================================================== */

/* 1) Option names: show up to 3 lines (was 2). Full name is revealed on
      hover/keyboard focus, so nothing is ever hidden from the customer. */
.single-product:not(.xds-ui-classic) .composite_form .component h5.thumbnail_title.title {
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
}
@media (hover: hover) {
  .single-product:not(.xds-ui-classic) .composite_form .component .component_option_thumbnail:hover h5.thumbnail_title.title,
  .single-product:not(.xds-ui-classic) .composite_form .component .component_option_thumbnail:focus-within h5.thumbnail_title.title {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    overflow: visible !important;
  }
}

/* 2) Scroll cue: the bottom edge of a scrolling option list fades out while
      more options remain below, and the fade disappears when the list is
      scrolled to the end. Uses CSS scroll-driven animation (Chrome, Edge,
      Safari 26+). Browsers without it simply show no fade; nothing breaks. */
@property --xds-fade {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@keyframes xds-scroll-fade {
  0%, 92% { --xds-fade: 48px; }
  100%    { --xds-fade: 0px; }
}
@supports (animation-timeline: scroll()) {
  .single-product.xds-scrollable-options:not(.xds-ui-classic) .composite_form .component .xds-scroll-target {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--xds-fade)), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 calc(100% - var(--xds-fade)), transparent 100%);
    animation: xds-scroll-fade linear both;
    animation-timeline: scroll(self block);
  }
}

/* Option list add-ons: option count badge + search box (also used when classic styling is on). */
.single-product .composite_form .component .xds-opt-count {
  margin-left: auto; padding: 2px 10px; border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; flex: 0 0 auto;
}
/* Mobile / tablet accordion headers are light, so use the brand purple there. */
@media (max-width: 1024px) {
  .single-product .composite_form .component .xds-opt-count { background: rgba(83,23,183,.10); color: #5317b7; }
}
.single-product .composite_form .component .xds-opt-search {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 8px; padding: 0;
}
.single-product .composite_form .component .xds-opt-search__input {
  flex: 1 1 220px; min-width: 0; height: 40px; margin: 0 !important; padding: 0 38px 0 12px !important;
  border: 1px solid #d5d8e0 !important; border-radius: 8px !important; background: #fff !important;
  font-size: 16px !important; box-shadow: none !important;
}
.single-product .composite_form .component .xds-opt-search__input:focus {
  outline: none; border-color: #5317b7 !important; box-shadow: 0 0 0 3px rgba(83,23,183,.15) !important;
}
.single-product .composite_form .component .xds-opt-search__input::-webkit-search-cancel-button,
.single-product .composite_form .component .xds-opt-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.single-product .composite_form .component .xds-opt-search__clear {
  position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; padding: 0; border: 0;
  background: transparent; color: #666; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 6px;
}
.single-product .composite_form .component .xds-opt-search__clear[hidden] { display: none; }
.single-product .composite_form .component .xds-opt-search__status { flex: 1 0 100%; font-size: .8rem; color: #555; }
.single-product .composite_form .component .xds-opt-search__status:empty { display: none; }
.single-product .composite_form .component.xds-searching ul.component_option_thumbnails_container > li:not(.xds-s-hit) { display: none !important; }
.single-product .composite_form .component.xds-searching .component_pagination { display: none !important; }
@media (max-width: 600px) {
  .single-product .composite_form .component .xds-opt-count { padding: 1px 8px; font-size: .7rem; }
}


/* ===================================================================== */
/* XDS UI: compact sorting / filters / search row (modern styling only)  */
/* Sorting and filters sit on one line when there is room, and wrap      */
/* tightly on phones. Presentation only.                                  */
/* ===================================================================== */
.single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_ordering {
  display: inline-block !important;
  vertical-align: middle !important;
  width: auto !important;
  margin: 0 18px 0 0 !important;
  padding: 0 !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_ordering .component_section_title {
  display: none !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_ordering select.orderby {
  min-width: 0 !important;
  padding: 4px 8px 4px 20px !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_filters {
  display: inline-flex !important;
  vertical-align: middle !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0 18px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_filters .component_filters_section_title {
  display: none !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_filters .component_filter {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .component_filters .component_filter_title {
  padding: 4px 22px 4px 0 !important;
  margin: 0 !important;
}
/* Search box: slimmer, closer to the controls above. */
.single-product:not(.xds-ui-classic) .composite_form .component .xds-opt-search {
  margin: 4px 0 8px !important;
}
.single-product:not(.xds-ui-classic) .composite_form .component .xds-opt-search__input {
  height: 36px !important;
  font-size: 14px !important;
}
@media (max-width: 768px) {
  .single-product:not(.xds-ui-classic) .composite_form .component .xds-opt-search__input { font-size: 16px !important; /* stops iOS zoom */ }
  .single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_ordering { margin-right: 12px !important; }
  .single-product:not(.xds-ui-classic) .composite_form .component .component_selections > .component_filters { gap: 0 14px !important; }
}
