/* ================================
   CUSTOM PRODUCT UI - FINAL CSS
================================ */

.custom-product-ui-wrapper {
  display: flex;
  gap: 80px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* FONT */
body, .custom-product-ui-wrapper * {
  font-family: "Glacial Indifference", sans-serif !important;
}

/* ================================
   LEFT SIDE - IMAGES
================================ */

.product-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.main-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  background: #fff;
}

.main-image img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.ssd-product-image-expand {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-image:hover .ssd-product-image-expand {
  opacity: 1;
  transform: scale(1);
}

.gallery-grid {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  gap: 10px;
  margin-top: 20px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.gallery-grid .thumb {
  min-width: 120px;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.gallery-grid .thumb:hover {
  opacity: 0.9;
}

.gallery-grid .thumb.active {
  border-color: #8e6aa6;
}

.ssd-product-lightbox[hidden] {
  display: none;
}

.ssd-product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.ssd-product-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.ssd-product-lightbox__dialog {
  position: relative;
  display: flex;
  gap: 20px;
  width: min(1200px, calc(100vw - 32px));
  height: min(90vh, 820px);
  margin: 5vh auto 0;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  z-index: 1;
}

.ssd-product-lightbox__close {
  position: absolute;
  right: 16px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  z-index: 2;
}

.ssd-product-lightbox__thumbs {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.ssd-product-lightbox__thumb {
  width: 100%;
  height: 120px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #fff;
}

.ssd-product-lightbox__thumb.active {
  border-color: #8e6aa6;
}

.ssd-product-lightbox__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.ssd-product-lightbox__main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ================================
   RIGHT SIDE - INFO
================================ */

.product-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.product-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.product-description {
  font-size: 15px;
  color: #5d5459;
  line-height: 1.75;
  margin-bottom: 28px;
}

.product-description p {
  margin: 0 0 18px;
}

/* ================================
   ROWS
================================ */

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 26px 0 28px;
}

.product-left,
.product-right {
  flex: 1;
  width: 50%;
  padding-top: 20px;
}

.price {
  font-size: 17px;
  font-weight: 500;
  color: #51484d;
}

.price,
.price *,
.price .amount,
.price ins,
.price del,
.price bdi {
  font-family: "Glacial Indifference", sans-serif !important;
}

.price .amount {
  color: #51484d;
  font-size: inherit;
  font-weight: inherit;
}

.price del {
  opacity: 0.55;
  margin-right: 8px;
  font-size: inherit;
  font-weight: 500;
}

.price ins {
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
}

.price del .amount,
.price ins .amount,
.price bdi {
  font-size: inherit;
  font-weight: inherit;
}

.sku {
  font-size: 14px;
  color: #777;
}

.product-code {
  font-size: 17px;
  color: #51484d;
  white-space: nowrap;
}

.category {
  font-size: 0.95rem;
  color: #666;
}

/* ================================
   COLOR
================================ */

.color-swatches {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

/* ================================
   SIZE
================================ */

.size-selector {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

.generic-attribute-selectors {
  width: 100%;
  margin-bottom: 20px;
}

.generic-attribute-selectors .product-attribute-selector {
  margin-bottom: 20px;
}

.generic-attribute-selectors .product-attribute-selector:last-child {
  margin-bottom: 0;
}

.product-attribute-selector {
  position: relative;
}

.attribute-label {
  font-size: 15px;
  font-weight: 500;
  color: #51484d;
  display: block;
  margin-bottom: 10px;
}

.attribute-button {
  width: 100%;
  min-height: 52px;
  border-radius: 25px;
  border: none;
  background: #a786bb;
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  transition: background 0.2s ease, transform 0.2s ease;
}

.attribute-button:hover,
.attribute-button.is-open {
  background: #9879ae;
}

.attribute-button__selection {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.attribute-button__arrow {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.attribute-button.is-open .attribute-button__arrow {
  transform: rotate(180deg);
}

.attribute-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.attribute-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(81, 72, 77, 0.16);
  flex: 0 0 auto;
}

.attribute-value-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.attribute-value-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attribute-value-label--single {
  display: block;
}

.attribute-value-helper {
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attribute-value-stack--placeholder .attribute-value-helper {
  color: rgba(255, 255, 255, 0.7);
}

.attribute-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  border: 1px solid #e4dbe8;
  border-radius: 18px;
  background: #fff;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(81, 72, 77, 0.12);
  z-index: 20;
}

.attribute-dropdown.open {
  display: block;
}

.attribute-option {
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.attribute-option + .attribute-option {
  border-top: 1px solid #f0e8f3;
}

.attribute-option__main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.attribute-option__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #433a45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attribute-option:hover,
.attribute-option.active {
  background: #f6eff9;
}

.attribute-option--color .attribute-swatch {
  border-color: rgba(67, 58, 69, 0.1);
}

.attribute-option--size .attribute-option__main {
  width: 100%;
}

.attribute-option--size .attribute-option__text {
  width: 100%;
}

.variations {
  display: none;
}

.ssd-bundle-items {
  display: grid;
  gap: 14px;
  margin: 22px 0 24px;
}

.ssd-bundle-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #eadff0;
  border-radius: 8px;
  background: #fff;
}

.ssd-bundle-item__media img {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  object-position: center center;
  border-radius: 8px;
  background: #f7f4f6;
}

.ssd-bundle-item__body {
  min-width: 0;
}

.ssd-bundle-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ssd-bundle-item__head h2 {
  margin: 0;
  color: #342c35;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
}

.ssd-bundle-item__price {
  flex: 0 0 auto;
  color: #51484d;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.ssd-bundle-item__sku {
  margin: 5px 0 0;
  color: #716870;
  font-size: 12px;
}

.ssd-bundle-item__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ssd-bundle-item__options label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ssd-bundle-item__options span {
  color: #51484d;
  font-size: 12px;
  font-weight: 600;
}

.ssd-bundle-item__options select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ded4e3;
  border-radius: 8px;
  background: #fff;
  color: #342c35;
  padding: 8px 10px;
  font-size: 14px;
}

.ssd-bundle-empty {
  margin: 0;
  color: #716870;
  font-size: 14px;
}

/* ================================
   QUANTITY
================================ */

.quantity-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 104px;
  height: 42px;
  background: #a786bb;
  border-radius: 999px;
  padding: 0 12px;
  vertical-align: middle;
}

.quantity-row button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #2d2330;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 6px;
  font-size: 1.4rem;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: #000;
}

.quantity-row input {
  width: 24px;
  text-align: center;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 0;
  appearance: textfield;
}

.qty-input {
  width: 24px;
  height: auto;
  border: none;
  border-radius: 0;
}

.quantity-row input::-webkit-outer-spin-button,
.quantity-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ssd-product-note-field {
  display: grid;
  gap: 8px;
  margin: 4px 0 18px;
}

.ssd-product-note-field label {
  color: #51484d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.ssd-product-note-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ded4e3;
  border-radius: 8px;
  background: #fff;
  color: #342c35;
  font-size: 15px;
  line-height: 1.3;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ssd-product-note-field input:focus {
  border-color: #a786bb;
  box-shadow: 0 0 0 3px rgba(167, 134, 187, 0.16);
}

/* ================================
   BUTTON
================================ */

.product-purchase-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.add-to-bag-btn {
  flex: 1 1 auto;
  height: 42px;
  border-radius: 30px;
  border: none;
  background: #f0eded;
  color: #171417;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.add-to-bag-btn:hover:not(:disabled) {
  background: #e7e1e6;
}

.add-to-bag-btn:disabled {
  background: #e7e2e4;
  color: #9f99a0;
  cursor: not-allowed;
}

.ssd-product-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: calc(100% - 120px);
  margin: 18px 0 0 120px;
  flex-wrap: wrap;
}

.ssd-product-trust-badges__item {
  width: 70px;
  height: 70px;
  /* border: 1px solid #eadff0; */
  border-radius: 16px;
  /* background: #fff; */
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 0 10px 24px rgba(81, 72, 77, 0.08); */
}

.ssd-product-trust-badges__item img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ================================
   STOCK
================================ */

.stock-status {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #c62828;
  font-weight: 500;
}

.stock-status[hidden] {
  display: none !important;
}

.in-stock {
  color: green;
}

.out-of-stock {
  color: red;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
  .custom-product-ui-wrapper {
    flex-direction: column;
    gap: 30px;
    padding: 20px;
  }

  .product-left,
  .product-right {
    width: 100%;
  }

  .product-purchase-row {
    flex-direction: column;
    align-items: stretch;
  }

  .price-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .quantity-row,
  .add-to-bag-btn {
    width: 100%;
    margin-left: 0;
  }

  .ssd-bundle-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ssd-bundle-item__media img {
    width: 72px;
    height: 72px;
  }

  .ssd-bundle-item__head {
    flex-direction: column;
    gap: 4px;
  }

  .ssd-bundle-item__options {
    grid-template-columns: 1fr;
  }

  .add-to-bag-btn {
    margin-top: 0;
  }

  .gallery-grid {
    width: 100%;
  }

  .ssd-product-image-expand {
    opacity: 1;
    transform: scale(1);
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .ssd-product-lightbox__dialog {
    flex-direction: column-reverse;
    height: min(92vh, 820px);
    padding: 16px;
  }

  .ssd-product-lightbox__thumbs {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .ssd-product-lightbox__thumb {
    width: 80px;
    flex: 0 0 80px;
  }

  .ssd-product-trust-badges__item {
    width: 62px;
    height: 62px;
    padding: 8px;
  }

  .ssd-product-trust-badges {
    width: 100%;
    margin-left: 0;
  }
}

/* ================================
   PRODUCT DETAILS TABS
================================ */

.ssd-custom-product-page {
  width: 100%;
}

.ssd-product-tabs {
  width: 100%;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 0 0 40px;
}

.ssd-product-tabs__nav {
  display: flex;
  align-items: center;
  gap: 40px;
  background: #f2f2f2;
  width: 100%;
  padding: 0 40px;
}

.ssd-product-tabs__tab {
  font-family: 'Glacial Indifference';
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: #4e4250;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 0 8px;
}

.ssd-product-tabs__tab.is-active {
  color: #000;
}

.ssd-product-tabs__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #8d8d8d;
}

.ssd-product-tabs__panel {
  background: #fff;
  width: 100%;
  padding: 46px 40px 0;
}

.ssd-product-additional {
  width: 100%;
  max-width: 100%;
  color: #5d5459;
  font-size: 15px;
  line-height: 1.8;
}

.ssd-product-additional h1,
.ssd-product-additional h2,
.ssd-product-additional h3,
.ssd-product-additional h4 {
  color: #9774ad;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 18px;
}

.ssd-product-additional ul,
.ssd-product-additional ol {
  margin: 0;
  padding-left: 20px;
}

.ssd-product-additional li {
  margin-bottom: 10px;
}

.ssd-size-chart {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
}

.ssd-size-chart__table-wrap {
  flex: 0 0 560px;
  width: 560px;
}

.ssd-size-chart__visual {
  flex: 1 1 auto;
  width: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.ssd-size-chart__unit-toggle {
  display: inline-flex;
  background: #d4d4d4;
  border-radius: 999px;
  padding: 3px;
  margin: 0 auto 24px;
}

.ssd-size-chart__table-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ssd-size-chart__unit-btn {
  min-width: 78px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ssd-size-chart__unit-btn.is-active {
  background: #a27ab5;
  color: #fff;
}

.ssd-size-chart__table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #8e888a;
  background: #fff;
}

.ssd-size-chart__table th,
.ssd-size-chart__table td {
  border: 2px solid #a9a2a4;
  background: #fff;
  text-align: center;
  color: #6f6669;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 10px;
}

.ssd-size-chart__table th {
  background: #f6f5f4;
  font-weight: 600;
}

.ssd-size-chart__table td.ssd-size-chart__label-cell {
  background: #f6f5f4;
  color: #8c8385;
}

.ssd-size-chart__visual img {
  width: min(100%, 760px);
  max-width: 760px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top left;
}

@media (max-width: 768px) {
  .ssd-product-tabs {
    padding: 0 0 24px;
  }

  .ssd-product-tabs__nav {
    gap: 16px;
    padding: 0 12px;
    overflow-x: auto;
  }

  .ssd-product-tabs__tab {
    min-height: 50px;
    font-size: 14px;
    white-space: nowrap;
  }

  .ssd-product-tabs__panel {
    padding: 24px 16px 0;
  }

  .ssd-size-chart {
    flex-direction: column;
    gap: 28px;
  }

  .ssd-size-chart__table-wrap,
  .ssd-size-chart__visual {
    width: 100%;
    flex: 0 0 auto;
  }

  .ssd-size-chart__table {
    min-width: 560px;
  }

  .ssd-size-chart__table-wrap {
    overflow-x: auto;
    align-items: flex-start;
  }

  .ssd-size-chart__visual img {
    width: 100%;
    max-width: 100%;
  }

  .ssd-size-chart__unit-toggle {
    align-self: center;
  }

  .ssd-size-chart__table th,
  .ssd-size-chart__table td {
    font-size: 14px;
    padding: 12px 10px;
  }
}

.ssd-product-care-guide {
  max-width: 1180px;
  margin: 0 auto;
}

.ssd-product-care-guide > :first-child {
  margin-top: 0;
}

.ssd-product-care-guide .elementor,
.ssd-product-care-guide .elementor-section,
.ssd-product-care-guide .e-con,
.ssd-product-care-guide .e-flex {
  max-width: 100%;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] {
  padding: 0;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .ssd-product-care-guide {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 20px;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-section,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-top-section,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .e-con,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .e-flex {
  width: 100%;
  max-width: 100%;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor > .elementor-element:first-child,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor > .elementor-element:nth-child(2) {
  display: none;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-top-section:last-child .elementor-container,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-top-section:last-child .e-con-inner,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-top-section:last-child .e-con {
  justify-content: flex-start;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-image-box .elementor-image-box-wrapper,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-icon-box .elementor-icon-box-wrapper,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-text-editor,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-heading {
  text-align: center;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-image-box .elementor-image-box-wrapper,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-icon-box .elementor-icon-box-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-image-box .elementor-image-box-img,
.ssd-product-tabs__panel[data-product-panel="care-guide"] .elementor-widget-icon-box .elementor-icon-box-icon {
  margin: 0 auto 18px;
}

