/**
 * DES Product Accessories - Front-office styles
 * Compatible with PrestaShop 8.1.x and 9.0.x
 * Compatible with STSiteBuilder themes
 */

/* =========================================================
   Wrapper
   ========================================================= */
.desproductaccesories-wrapper {
  margin: 24px 0;
}

/* =========================================================
   Title
   ========================================================= */
.desproductaccesories-title {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 31px;
  color: #4c1e4f;
  margin: 0 0 28px;
  padding: 0;
  text-transform: none;
  letter-spacing: normal;
}

/* =========================================================
   Accessory list
   ========================================================= */
.desproductaccesories-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.desproductaccesories-item {
  display: block;
}

/* =========================================================
   Label (click area)
   ========================================================= */
.desproductaccesories-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px 10px 30px;
  border-radius: 21px;
  background-color: #f8f4fc;
  border: none;
  width: 100%;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s;
  margin: 0;
}

.desproductaccesories-label:hover {
  background-color: #f0e8fa;
}

/* =========================================================
   Product info (name)
   ========================================================= */
.desproductaccesories-info {
  flex: 1;
  min-width: 0;
}

.desproductaccesories-name {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: #000000;
  text-align: left;
}

/* =========================================================
   Prices
   ========================================================= */
.desproductaccesories-prices {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.desproductaccesories-price-current {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #4c1e4f;
  white-space: nowrap;
}

.desproductaccesories-price-old {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #999;
  text-decoration: line-through;
  white-space: nowrap;
}

/* =========================================================
   Toggle button
   ========================================================= */
.desproductaccesories-toggle-wrapper {
  flex-shrink: 0;
  position: relative;
  margin-left: 8px;
}

/* Hide native checkbox */
.desproductaccesories-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.desproductaccesories-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 60px;
  height: 29px;
  border-radius: 22px;
  background-color: #c4a8d8;
  padding: 4px;
  box-sizing: border-box;
  transition: background-color 0.25s;
  position: relative;
}

/* When checked: darken the toggle track */
.desproductaccesories-item:has(.desproductaccesories-checkbox:checked)
  .desproductaccesories-toggle {
  background-color: #6b2f88;
}

.desproductaccesories-toggle-knob {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background-color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.desproductaccesories-cart-icon {
  display: block;
  width: 15px;
  height: auto;
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
}

/* When checked: move knob to the right, show cart icon */
.desproductaccesories-checkbox:checked
  ~ .desproductaccesories-toggle-wrapper
  .desproductaccesories-toggle-knob,
.desproductaccesories-item:has(.desproductaccesories-checkbox:checked)
  .desproductaccesories-toggle-knob {
  transform: translateX(31px);
}

/* Alternative: cart icon visible on the right side (unchecked state) */
/* The cart SVG is shown inside the toggle track, to the right of the knob */
.desproductaccesories-toggle::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16.328' height='17.261' viewBox='0 0 16.328 17.261'%3E%3Cpath d='M91.449-828.082a1.161,1.161,0,0,1-.339-.848,1.136,1.136,0,0,1,.344-.843,1.16,1.16,0,0,1,.848-.339,1.136,1.136,0,0,1,.843.343,1.161,1.161,0,0,1,.339.848,1.136,1.136,0,0,1-.344.843,1.16,1.16,0,0,1-.848.339,1.136,1.136,0,0,1-.843-.344Zm9.3,0a1.161,1.161,0,0,1-.339-.848,1.136,1.136,0,0,1,.344-.843,1.161,1.161,0,0,1,.848-.339,1.137,1.137,0,0,1,.843.343,1.161,1.161,0,0,1,.339.848,1.136,1.136,0,0,1-.344.843,1.16,1.16,0,0,1-.848.339A1.135,1.135,0,0,1,100.745-828.082Zm-9.226-13,2.14,4.943h6.535a.507.507,0,0,0,.281-.079.688.688,0,0,0,.211-.219l1.748-4.153a.331.331,0,0,0,.018-.342.318.318,0,0,0-.3-.149Zm-.286-.73H102.66a.623.623,0,0,1,.564.269.582.582,0,0,1,.043.578l-1.909,4.8a1.292,1.292,0,0,1-.438.549,1.12,1.12,0,0,1-.673.212H93.226l-1.064,1.854a.416.416,0,0,0-.009.456.424.424,0,0,0,.4.246H102.78v.73H92.571a1.155,1.155,0,0,1-1.089-.6,1.106,1.106,0,0,1,.038-1.2l1.327-2.264-3.059-7.088H88V-844h2.3Zm2.426,5.673h0Z' transform='translate(-87.5 844.5)' fill='%23fff' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* When checked, hide the ::after cart icon (knob covers it) and keep knob shifted */
.desproductaccesories-item:has(.desproductaccesories-checkbox:checked)
  .desproductaccesories-toggle::after {
  opacity: 0;
}

/* =========================================================
   Out-of-stock state
   ========================================================= */
.desproductaccesories-item--outofstock .desproductaccesories-label {
  opacity: 0.55;
  cursor: not-allowed;
}

.desproductaccesories-item--outofstock .desproductaccesories-label:hover {
  background-color: #f8f4fc;
}

.desproductaccesories-item--outofstock .desproductaccesories-checkbox {
  cursor: not-allowed;
}

.desproductaccesories-item--outofstock .desproductaccesories-name {
  color: #999;
}

.desproductaccesories-item--outofstock .desproductaccesories-img {
  filter: grayscale(100%);
}

.desproductaccesories-outofstock-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c0392b;
  background-color: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width: 992px) {
  .desproductaccesories-title {
    font-size: 16px;
    line-height: 23px;
    margin: 0 0 24px;
  }

  .desproductaccesories-label {
    padding: 11px 16px 11px 24px;
    border-radius: 37px;
  }

  .desproductaccesories-name {
    font-size: 14px;
  }

  .desproductaccesories-price-current,
  .desproductaccesories-price-old {
    font-size: 14px;
  }
  .desproductaccesories-wrapper {
    margin: 0;
  }
}
