/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */
/* Full-width breakout from parent container */
#cp-container {
  /* Break out of parent container to full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 30px 0;
  background: #f8f9fa;
  border-radius: 0;
  box-sizing: border-box;
}

/* Inner content max-width for readability */
#cp-container .cp-header,
#cp-container .cp-color-container,
#cp-container #cp-combinations {
  max-width: 1430px;
  margin-left: auto;
  margin-right: auto;
}


.cp-empty {
  color: #777;
  font-size: .9rem;
  margin: 0 auto 1rem;
  max-width: 420px;
  text-align: center;
}

/* New header layout - Bootstrap row style */
.cp-header {
  margin-bottom: 0;
  padding: 0;
}

.cp-header .cp-title {
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
}

.cp-header .cp-subtitle {
  color: #6b7280;
  font-size: 0.75rem;
  text-align: left;
}

/* Search wrapper */
.cp-search-wrapper {
  position: relative;
}

.cp-search-wrapper .cp-input {
  width: 100%;
  border: 1px solid #e9e9e9;
  background: #e9e9e9;
  padding: 7px 40px 7px 15px;
  font-size: 0.875rem;
  border-radius: 4px;
}

.cp-search-wrapper .cp-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cp-narrow .cp-input {
  position: relative;
}

.modal-dialog .cp-input {
  max-width: 300px;
  width: 300px;
}

.cp-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cp-clear {
  color: #777;
  position: absolute;
  right: 18px;
}


/* TASK 1: Changed from 3 to 8 combinations per row on desktop */
.cp-color-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(8, 1fr);
  list-style: none;
  margin: 0 auto;
  padding: 0;
}

.cp-color-card,
.cp-color,
.cp-combinations {
  font-size: .92em;
}

/* TASK 4 & 6: Removed borders, compact layout for 8-column grid */
.cp-color-card {
  align-items: center;
  /* background: #fff; */
  border-radius: 12px;
  border: none;
  /* box-shadow: 0 2px 8px rgba(15, 23, 42, .06); */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* padding: 12px 8px; */
  position: relative;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cp-color-card:hover,
.cp-color-card.cp-active {
  /* box-shadow: 0 4px 16px rgba(15, 23, 42, .12); */
  /* transform: translateY(-2px); */
}

.cp-card-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cp-card-body {
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
  justify-content: center;
  grid-column: 1 / -1;
  width: 100%;
}

.cp-card-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: space-between;
}

.cp-name {
  color: #111827;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.4;
  grid-column: 1 / -1;
  font-family: Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
}

.cp-code {
  color: #64748b;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* TASK 4 & 6: Removed white borders from preview, enlarged preview */
.cp-preview {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 33px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* TASK 6: Removed top and bottom white borders (pseudo-elements removed) */
.cp-preview::after,
.cp-preview::before {
  display: none;
}

.cp-narrow .cp-preview {
  height: 70px;
}

.cp-preview i {
  align-items: center;
  background: rgba(15, 23, 42, .7);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 18px;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 5px;
  width: 26px;
  z-index: 1;
  opacity: 0;
  transition: opacity .2s ease;
}

.cp-preview.cp-white i {
  color: #111;
  background: rgba(255, 255, 255, .85);
}

.cp-active .cp-preview i {
  opacity: 1;
}

.cp-price-badge {
  background: #111827;
  border-radius: 999px;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 4px 12px;
  position: absolute;
  right: 16px;
  top: 16px;
  text-transform: uppercase;
}

.cp-rating {
  align-items: center;
  color: #374151;
  display: inline-flex;
  font-size: .85em;
  gap: .4em;
  justify-content: flex-start;
  margin-top: .2em;
}

.cp-rating-stars {
  background: #eee;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  width: 70px;
}

.cp-rating-fill {
  background: #f3c200;
  display: block;
  height: 100%;
  width: 0;
}

.cp-rating-value {
  font-weight: 600;
}

.cp-rating-count {
  color: #888;
}

.cp-icon-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: .275em 0 0;
  padding: 0;
  /* grid-column: 1 / -1; */
  justify-content: space-between;
}

.cp-icon-list li {
  list-style: none;
}


.cp-icon-pill {
  align-items: center;
  border: none;
  border-radius: 999px;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 600;
  gap: 6px;
  height: 30px;
  justify-content: center;
  letter-spacing: .03em;
  text-transform: none;
  background: transparent;
  padding: 0;
}

.cp-icon-pill img {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: middle;
}

.cp-icon-pill--lightfastness img {
  width: auto;
  height: 10px;
  display: inline-block;
  vertical-align: middle;
}

.cp-icon-pill--opacity {
  color: #0d4c8c;
}

.cp-icon-pill--lightfastness {
  color: #8a5a00;
}

.cp-icon-pill--finish {
  color: #9d174d;
}

.cp-icon-pill--permanence {
  color: #166534;
}

.cp-icon-pill--vegan {
  color: #047857;
}

.cp-icon-pill {
  position: relative;
  height: 17px;
}

.cp-tooltip-bubble {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translate(-50%, -6px);
  background: #111827;
  color: #fff;
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
  z-index: 30;
}

.cp-tooltip-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: #111827;
}

.cp-icon-pill:focus-visible .cp-tooltip-bubble,
.cp-icon-pill:hover .cp-tooltip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.cp-load-more {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #444;
  cursor: pointer;
  font-size: .9rem;
  margin: 1.5rem auto 0;
  padding: .65rem 2.5rem;
}

.cp-load-more:hover {
  border-color: #bbb;
  color: #111;
}

.cp-lazy-hidden {
  display: none;
}

.cp-zoom {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 5000;
}

.cp-zoom.cp-open {
  display: flex;
}

.cp-zoom-backdrop {
  background: rgba(0, 0, 0, .6);
  inset: 0;
  position: absolute;
}

.cp-zoom-dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
  max-width: 320px;
  padding: 20px;
  position: relative;
  width: 90%;
  z-index: 1;
}

.cp-zoom-close {
  background: transparent;
  border: none;
  color: #444;
  font-size: 1.5rem;
  position: absolute;
  right: 12px;
  top: 6px;
}

.cp-zoom-texture {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 12px;
  height: 200px;
  margin-bottom: 15px;
  width: 100%;
}

.cp-zoom-name {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* Combinations panel inserted inline after row end */
#cp-combinations {
  width: 100%;
  margin-top: 1rem;
  grid-column: 1 / -1;
  /* Span full width of grid */
}

/* TASK 2: Style for GP badge in icon list */
.cp-icon-pill--price_group {
  color: #111827;
  /* padding: 2px 8px; */
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  height: 17px;
}

/* TASK 7: Mobile - 3 combinations per row instead of 1 */
@media (max-width: 640px) {
  .cp-color-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .cp-color-card {
    padding: 0;
  }

  /* TASK 8: Enlarged image preview on mobile */
  .cp-preview {
    height: 35px;
  }

  .cp-price-badge {
    right: 6px;
    top: 6px;
    font-size: .65rem;
    padding: 2px 6px;
  }

  .cp-name {
    font-size: 0.75rem;
    white-space: break-spaces;
  }

  .cp-code {
    font-size: 0.65rem;
  }
}

.cp-combinations {
  border-radius: 4px;
  margin: 10px 0 20px;
  max-width: 100%;
  /* padding: 20px; */
  position: relative;
  width: 100%;
  min-width: 100%;
  /* background: #fff; */
  border-radius: 8px;
  /* box-shadow: 0 18px 35px rgba(15, 23, 42, .08); */
}

.cp-combinations .cp-close {
  position: absolute;
  right: 10px;
  top: 10px;
}

.cp-combinations h3 {
  margin-bottom: 20px;
  text-align: left;
}

.cp-combinations-container {
  display: flex;
}

/* TASK 5: Enlarged combination image when selected */
/* TASK 4 & 5: Enlarged combination image, removed white border by using cover */
.cp-combinations .cp-color-preview {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 0;
  border: none;
  display: inline-block;
  margin-right: 20px;
  height: 122px;
  width: 220px;
}

.cp-combinations .cp-table {
  flex: 1;
}

.cp-combinations table {
  width: 100%;
}

.cp-combinations th,
.cp-combinations td {
  padding: 6px;
}

.cp-combinations tbody tr {
  border-top: 1px solid #ddd;
}

.cp-old-price {
  color: #777;
  margin-right: 6px;
  text-decoration: line-through;
}

.cp-add-to-cart {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.cp-quantity {
  margin-right: 10px;
}

.cp-quantity input {
  -moz-appearance: textfield;
  height: 40px;
  padding: 2px 2px 2px 6px;
  width: 60px;
}

.cp-quantity input::-webkit-outer-spin-button,
.cp-quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.cp-narrow table {
  table-layout: fixed;
}

.cp-narrow .cp-add-to-cart-column {
  width: 160px;
}

.cp-narrow .cp-add i {
  margin: 0;
}

.cp-narrow .cp-color-preview,
.cp-narrow .cp-add span {
  display: none;
}

@media (max-width: 1199px) {
  .add-to-cart {
    font-size: 0;
    text-align: center;
  }

  .btn-primary .shopping-cart {
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 991px) {
  .cp-nav-prev {
    left: -16px;
  }

  .cp-nav-next {
    right: -16px;
  }

  .cp-combinations {
    border: 0;
    padding: 20px 0 0;
  }

  .cp-combinations-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
  }

  .cp-combinations .cp-color-preview {
    display: block;
    margin: 0 auto;
  }

  .cp-combinations h3 {
    margin-top: 19px;
    padding: 0;
    text-align: center;
  }

  .cp-combinations th,
  .cp-combinations td {
    align-items: center;
    display: flex;
    padding: 0 10px;
    text-align: left;
    width: 100%;
  }

  .cp-combinations th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cp-combinations td:last-child {
    align-items: baseline;
    border-bottom: 0;
    flex-direction: row;
    padding-right: 0;
  }

  .cp-combinations tbody tr {
    padding: 0;
  }

  .cp-table table {
    border-top: 0;
  }

  .cp-table thead {
    display: none;
  }

  .cp-table tr {
    border-radius: 5px;
    border: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
  }

  .cp-table td:nth-of-type(1):before {
    content: "Contain";
  }

  .cp-table td:nth-of-type(2):before {
    content: "Price";
  }

  .cp-table td:nth-of-type(3):before {
    content: "Reference";
  }

  .cp-table td:nth-of-type(4):before {
    content: "Available";
  }

  .cp-table td:nth-of-type(5):before {
    content: "Quantity";
  }

  .cp-table td:nth-of-type(1):before,
  .cp-table td:nth-of-type(2):before,
  .cp-table td:nth-of-type(3):before,
  .cp-table td:nth-of-type(4):before,
  .cp-table td:nth-of-type(5):before {
    display: inline-block;
    font-weight: bold;
    line-height: 33px;
    margin-right: auto;
    min-height: 33px;
    text-align: left;
    width: 50%;
  }

  .cp-table td:nth-of-type(5):before {
    margin-bottom: auto;
    margin-top: 0;
  }

  .cp-table td:nth-child(2n) {
    background: #eee;
    border: 0;
  }

  .cp-form {
    /* display: inline-flex; */
    margin: 1px;
  }

  .cp-add-to-cart {
    flex-direction: row;
    margin: 0 0 10px;
    width: 100%;
  }

  .cp-quantity {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto 0 0;
    text-align: center;
  }

  .cp-table .add-to-cart {
    margin-left: 10px;
  }
}

@media (max-width: 767px) {
  .cp-search {
    margin: 1em auto 2em;
    max-width: 500px;
    position: relative;
    text-align: center;
    width: 100%;
  }

  .cp-input {
    width: 100%;
  }

  .cp-color-list {
    justify-content: center;
    margin: auto;
    text-align: center;
  }

  .cp-color {
    display: block;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: auto;
    background: transparent;
    box-shadow: none;
  }

  .cp-preview {
    width: 100%;
    margin-bottom: 4px;
  }

  .cp-combinations-container {
    flex-direction: column;
  }

  .cp-combinations {
    margin: 10px auto 20px;
    padding: 20px 0 0;
  }

  .cp-combinations .cp-color-preview {
    display: block;
    margin: 0 auto 20px;
  }

  .cp-combinations .cp-table {
    display: block;
    width: 100%;
  }

  .cp-combinations table {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: auto;
  }

  .cp-combinations thead,
  .cp-combinations th {
    margin: auto;
    text-align: center;
  }

  .cp-combinations tbody tr {
    /* display: flex; */
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    padding: 20px;
    text-align: center;
  }

  .cp-combinations th,
  .cp-combinations td {
    display: block;
    max-width: 100%;
  }

  .cp-combinations td:last-child {
    display: flex;
    margin: auto;
    text-align: center;
  }

  #cp-container .cp-header,
  #cp-container .cp-color-container,
  #cp-container #cp-combinations {
    padding: 0;
    margin: 0;
  }

  #cp-container {
    padding: 0 10px;
  }

  .cp-header .col-sm-6.col-lg-4.mb-3.mb-sm-0 {
    padding: 0;
    margin-bottom: 1rem !important;
  }
}

.cp-hidden {
  display: none;
}

/* ============================================
   MOBILE FIXES - Palette Module Changes (PDF)
   ============================================ */

/* FIX 1: First icon cut off - add left padding to icon list */
@media (max-width: 640px) {
  .cp-icon-list {
    padding-left: 2px;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* FIX 2: Display icons horizontally (like desktop), not vertically */
  .cp-icon-list {
    flex-direction: row;
    align-items: center;
  }

  /* Ensure icons don't wrap to new line */
  .cp-icon-list li {
    flex-shrink: 0;
  }

  /* FIX 3: Compact icon pills for 5 symbols display */
  .cp-icon-pill {
    height: 14px;
    font-size: 0.65rem;
    gap: 2px;
  }

  .cp-icon-pill img {
    width: 11px;
    height: 11px;
  }

  .cp-icon-pill--lightfastness img {
    height: 8px;
  }

  .cp-icon-pill--price_group {
    font-size: 0.6rem;
    height: 14px;
  }
}

/* Tablet adjustments */
@media (max-width: 767px) {
  .cp-icon-list {
    padding-left: 2px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
}

/* ============================================
   MOBILE FIXES - Palette Module Changes (PDF)
   File: colorpalette/views/css/front.css (append to end)
   ============================================ */

/* FIX 1: First icon cut off - ensure no clipping */
/* FIX 2: Display icons horizontally (like desktop) */
/* FIX 3: Display 5 symbols per color */

@media (max-width: 767px) {
  .cp-icon-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    padding-left: 0;
    margin-left: 0;
    overflow: visible;
  }

  .cp-icon-list li {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
  }

  .cp-icon-pill {
    height: 14px;
    font-size: 0.6rem;
    gap: 1px;
    padding: 0;
  }

  .cp-icon-pill img {
    width: 10px;
    height: 10px;
  }

  .cp-icon-pill--lightfastness img {
    width: auto;
    height: 8px;
  }

  .cp-icon-pill--price_group {
    font-size: 0.55rem;
    height: 14px;
  }

  .cp-card-body,
  .cp-color-card {
    overflow: visible;
  }
}

/* ============================================
   MOBILE FIXES v2 - Palette Module Changes (PDF)
   ============================================ */

/* FIX 1: First icon cut off */
/* FIX 2: Combination info horizontal (like desktop) */
/* FIX 3: Display 5 symbols */

@media (max-width: 991px) {

  /* Keep table horizontal on mobile - override vertical layout */
  .cp-table thead {
    display: table-header-group;
  }

  .cp-table tr {
    display: table-row;
    border: none;
    border-radius: 0;
    margin: 0;
    flex-wrap: nowrap;
  }

  .cp-combinations th,
  .cp-combinations td {
    display: table-cell;
    width: auto;
    padding: 6px;
    text-align: left;
  }

  /* Remove pseudo-element labels */
  .cp-table td:nth-of-type(1):before,
  .cp-table td:nth-of-type(2):before,
  .cp-table td:nth-of-type(3):before,
  .cp-table td:nth-of-type(4):before,
  .cp-table td:nth-of-type(5):before {
    display: none;
    content: none;
  }

  .cp-combinations-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cp-table table {
    display: table;
    width: 100%;
    font-size: 0.75rem;
  }

  .cp-table tbody {
    display: table-row-group;
  }

  .cp-table thead {
    display: table-header-group;
  }

  .cp-table th,
  .cp-table td {
    padding: 4px 6px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  /* Smaller add to cart on mobile */
  .cp-add-to-cart {
    flex-direction: row;
  }

  .cp-quantity input {
    width: 40px;
    height: 30px;
    padding: 2px;
  }

  .cp-add.btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .cp-add span {
    display: none;
  }
}

@media (max-width: 767px) {

  /* Icon list fixes */
  .cp-icon-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    padding-left: 0;
    margin-left: 0;
    overflow: visible;
  }

  .cp-icon-list li {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
  }

  .cp-icon-pill {
    height: 14px;
    font-size: 0.6rem;
    gap: 1px;
    padding: 0;
  }

  .cp-icon-pill img {
    width: 10px;
    height: 10px;
  }

  .cp-icon-pill--lightfastness img {
    width: auto;
    height: 8px;
  }

  .cp-icon-pill--price_group {
    font-size: 0.55rem;
    height: 14px;
  }

  .cp-card-body,
  .cp-color-card {
    overflow: visible;
  }

  /* Table even smaller on phones */
  .cp-table th,
  .cp-table td {
    padding: 3px 4px;
    font-size: 0.65rem;
  }

  .cp-combinations .cp-color-preview {
    width: 100px;
    height: 60px;
    margin-right: 10px;
  }
}

/* ============================================
   MOBILE FIXES v3 - Additional fixes
   ============================================ */

/* Fix zoom modal positioning on mobile */
@media (max-width: 767px) {
  .cp-zoom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cp-zoom-dialog {
    position: relative;
    margin: 20px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
  }

  .cp-zoom-texture {
    border-radius: 8px;
  }

  /* Remove bottom border-radius from combinations */
  .cp-combinations {
    border-radius: 0;
  }

  .cp-table tr {
    border-radius: 0;
  }

  /* Fix icon list - ensure horizontal display */
  .cp-color-card .cp-icon-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 4px;
  }

  /* Ensure first icon is not cut off */
  .cp-color-card {
    overflow: visible;
    padding: 0;
  }

  .cp-card-body {
    overflow: visible;
    width: 100%;
  }

  .cp-icon-list {
    overflow: visible;
    width: 100%;
  }

  .cp-icon-list li:first-child {
    margin-left: 0;
    padding-left: 0;
  }

  .cp-icon-pill {
    min-width: fit-content;
  }
}

/* ============================================
   ZOOM MODAL FIX - Click to close
   ============================================ */

/* Ensure backdrop is clickable */
.cp-zoom-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  cursor: pointer;
  pointer-events: auto;
}

/* Ensure close button is clickable */
.cp-zoom-close {
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
  padding: 10px;
  font-size: 24px;
  line-height: 1;
}

/* Dialog above backdrop */
.cp-zoom-dialog {
  z-index: 1;
  pointer-events: auto;
}

/* Modal container */
.cp-zoom {
  pointer-events: auto;
}

.cp-zoom.cp-open {
  display: flex;
}

/* FIX: Hide zoom modal by default on mobile */
@media (max-width: 767px) {
  .cp-header .cp-title {
    padding-top: 20px;
  }

  .cp-header .cp-title,
  .cp-header .cp-subtitle {
    text-align: center;
  }

  .cp-zoom {
    display: none;
  }

  .cp-zoom.cp-open {
    display: flex;
  }

  /* Combinations container - vertical layout */
  .cp-combinations {
    padding: 0;
    margin: 10px 0;
    background: #fff;
    border-radius: 8px;
  }

  .cp-combinations-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Large color preview at top */
  .cp-combinations .cp-color-preview {
    width: 100%;
    max-width: 400px;
    height: 180px;
    margin: 0 auto 15px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
  }

  /* Close button position */
  .cp-combinations .cp-close {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 10;
  }

  /* Color name centered */
  .cp-combinations h3 {
    text-align: left;
    font-size: 1.1rem;
    margin: 10px 0 15px;
    width: 100%;
  }

  /* Table full width */
  .cp-combinations .cp-table {
    width: 100%;
  }

  .cp-combinations table {
    width: 100%;
  }

  /* Show table header */
  .cp-table thead {
    display: table-header-group;
    width: 50px;
  }

  .cp-table tr {
    display: table-row;
    border: none;
    margin: 0;
  }

  .cp-table th,
  .cp-table td {
    display: table-cell;
    padding: 8px 2px;
    text-align: left;
    vertical-align: middle;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
  }

  .cp-table th {
    font-weight: 600;
    color: #333;
    background: transparent;
  }

  /* Remove pseudo labels */
  .cp-table td:before {
    display: none;
    content: none;
  }

  /* Price styling */
  .cp-old-price {
    display: block;
    color: #999;
    text-decoration: line-through;
    font-size: 0.8rem;
  }

  /* Add to cart compact */
  .cp-add-to-cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }

  .cp-quantity {
    margin: 0;
  }

  .cp-quantity input {
    width: 50px;
    height: 40px;
    text-align: center;
  }

  .cp-add.btn {
    padding: 8px 12px;
    min-width: auto;
  }

  .cp-add span {
    display: none;
  }

  .cp-combinations .cp-table tr,
  .cp-combinations .cp-table td,
  .cp-combinations .cp-table th,
  .cp-combinations .cp-table tbody tr {
    background: transparent;
    background-color: #fff;
  }

  .cp-combinations .cp-table tbody tr:nth-child(odd),
  .cp-combinations .cp-table tbody tr:nth-child(even) {
    background-color: #fff;
    padding: 0;
    margin: 0;
  }

  .cp-combinations .cp-table td {
    border-bottom: 1px solid #eee;
    padding: 12px 0px;
  }

  .cp-combinations .cp-table thead th {
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #ddd;
  }

  .cp-combinations .cp-table {
    width: 100%;
    overflow: visible;
  }

  .cp-combinations table {
    width: 100%;
  }

  .cp-combinations .cp-add-to-cart-column {
    width: 120px;
    min-width: 120px;
  }

  .cp-combinations .cp-add-to-cart {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding-right: 5px;
  }

  .cp-combinations .cp-add.btn {
    flex-shrink: 0;
    margin-right: 0;
  }

  .cp-combinations-container {
    overflow: visible;
    padding: 10px;
  }

  .cp-combinations {
    overflow: visible;
    margin-right: 0;
    padding: 0;
  }
}