/* Custom, component-scoped styles for Purchase Preview
   Keep this minimal and complementary to globals/styles.css */

.purchase-preview {
  padding: 120px 0;
  background-color: #f7f7f7;
}

.pp-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Builder steps */
.pp-builder {
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
}
.pp-steps {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
}
.pp-step {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  padding: 18px 22px;
  border-left: 1px solid #e9e9e9;
  height: 100%;
}

.pp-step.pp-step--intro {
  border-left: none;
}

.pp-step--intro {
  padding-left: 22px;
}
.pp-step-intro {
  font-weight: 500;
  color: #444;
}
.pp-step-index {
  font-size: 32px;
  color: #444;
  font-weight: 400;
  width: 28px;
  margin-left: 8px;
}
.pp-step-body {
  padding: 0 14px;
}
.pp-step-heading {
  font-weight: 500;
  color: #222;
}
.pp-step-meta {
  font-size: 13px;
  line-height: 1;
  color: #666;
}
.pp-step-actions a {
  color: #222;
  text-decoration: underline;
  margin-right: 16px;
}
.pp-step-thumb img,
.pp-step-thumb svg {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

/* Icons in static steps */
.pp-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-step-icon svg,
.pp-step-icon img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  color: #777;
}

/* Active state */
.pp-step--active {
  background: #fafafa;
}
.pp-step--active .pp-step-heading {
  color: #111;
  font-weight: 600;
}
.pp-step--active .pp-step-index {
  color: #111;
  font-weight: 600;
}
.pp-step--active .pp-step-icon svg {
  color: #111;
}

@media (max-width: 991px) {
  .pp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr;
  }
  .pp-steps > *:first-child {
    display: none;
  }

  .pp-step {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px 6px;
    line-height: 1.2;
    gap: 4px;
    text-align: center;
    font-size: 12px;
  }
  .pp-step-meta {
    display: none;
  }
}

.pp-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

/* Gallery */
.pp-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
}
.pp-media {
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
}
.pp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-media-video .pp-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
}
.pp-media-video .pp-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}
.pp-media-video .pp-play:hover {
  background: rgba(0, 0, 0, 0.8);
}
.pp-media-video .pp-play:focus-visible {
  outline: 2px solid #c29958;
  outline-offset: 2px;
}
/* removed caption overlay as design no longer displays it */

/* Right panel */
.pp-panel {
  background: #fff;
  border: 1px solid #eee;
  padding: 24px;
}
.pp-header {
  margin-bottom: 18px;
}
.pp-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.pp-price-main {
  font-size: 22px;
  font-weight: 500;
  margin-top: 6px;
}
.pp-sub {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

.pp-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
}
.pp-section:first-of-type {
  border-top: none;
}
.pp-section-title {
  grid-column: 1 / -1;
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #666;
}
.pp-setting-title,
.pp-diamond-title {
  font-weight: 500;
}
/* shared subdued meta row used under setting and diamond */
.pp-row-meta {
  margin-top: 6px;
  font-size: 13px;
  color: #666;
  font-family: var(--font-lora);
}
.pp-section-amount {
  justify-self: end;
  font-weight: 500;
}

/* removed rating stars styles (no longer used) */

.pp-total {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.pp-total-label {
  font-weight: 700;
  font-size: 13px;
  color: #666;
}
.pp-total-amount {
  font-weight: 700;
}

/* removed size selector styles (not used in current UI) */

.pp-actions {
  padding-top: 16px;
  display: grid;
  gap: 12px;
}
.pp-button-primary {
  width: 100%;
}
/* removed secondary button row styles (not used) */

/* Responsive */
@media (max-width: 1200px) {
  .pp-grid {
    grid-template-columns: 1fr;
  }
  .pp-gallery {
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .pp-title {
    font-size: 24px;
  }
  .pp-price-main {
    font-size: 20px;
  }
}

/* Ring Preview Component Styles */
.ring-preview {
  padding: 100px 0 60px 0;
  background-color: #fafafa;
}

.rp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.rp-grid {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 20px;
  align-items: start;
}

/* Gallery Section */
.rp-gallery {
  display: flex;
  gap: 20px;
  height: 500px;
  position: sticky;
  top: 80px;
}

.rp-main-image {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 40px;
}

.rp-thumbnails {
  width: 80px;
}

.rp-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rp-thumb:hover {
  border-color: #d0d0d0;
}

.rp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Panel Section */
.rp-panel {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  border: 1px solid #e8e8e8;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.rp-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.rp-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.rp-price {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.rp-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Selector Components */
.rp-selector {
  margin-bottom: 20px;
}

.rp-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 5px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rp-selector-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Color Selectors - Bigger */
.rp-color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.rp-color-option:hover {
  border-color: #d0d0d0;
  transform: scale(1.1);
}

.rp-color-option.rp-option--active {
  border-color: #1a1a1a;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #1a1a1a;
}

/* Shape Selectors - Bigger */
.rp-shape-option {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  overflow: hidden;
  background: #f8f8f8;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-shape-option:hover {
  border-color: #d0d0d0;
}

.rp-shape-option.rp-option--active {
  border-color: #1a1a1a;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #1a1a1a;
}

.rp-selector--color {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rp-shape-option img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

/* General Selectors - Smaller and better design */
.rp-general-option {
  padding: 4px 8px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fff;
  color: #4a4a4a;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: relative;
}

.rp-general-option:hover {
  border-color: #d0d0d0;
  background: #fafafa;
}

.rp-general-option.rp-option--active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rp-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rp-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.rp-button--primary {
  background: #1a1a1a;
  color: #fff;
}

.rp-button--primary:hover {
  background: #000;
  color: #fff;
}

.rp-button--secondary {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #e8e8e8;
}

.rp-button--secondary:hover {
  background: #fafafa;
  border-color: #d0d0d0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .rp-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .rp-panel {
    position: static;
  }

  .rp-gallery {
    height: 450px;
    position: static;
  }
}

@media (max-width: 768px) {
  .ring-preview {
    padding: 120px 0 40px 0;
  }

  .rp-container {
    padding: 0 16px;
  }

  .rp-gallery {
    flex-direction: column-reverse;
    height: auto;
    gap: 16px;
  }

  .rp-thumbnails {
    width: 100%;
    height: 80px;
  }

  .rp-main-image {
    height: 350px;
  }

  .rp-panel {
    padding: 24px;
  }

  .rp-title {
    font-size: 16px;
  }

  .rp-price {
    font-size: 22px;
  }

  .rp-selector {
    margin-bottom: 24px;
  }

  .rp-selector-options {
    gap: 6px;
  }

  .rp-color-option {
    width: 32px;
    height: 32px;
  }

  .rp-shape-option {
    width: 50px;
    height: 50px;
  }

  .rp-shape-option img {
    width: 32px;
    height: 32px;
  }

  .rp-general-option {
    padding: 6px 12px;
    font-size: 10px;
    min-width: 70px;
  }
}

/* Diamonds Section Styles */
.diamonds-section {
  padding: 80px 0;
  background-color: #fafafa;
}

.diamonds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0 auto;
}

.diamond-card {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.diamond-card:hover {
  border-color: #e0e0e0;
  box-shadow: none;
  transform: none;
  background: #fff;
}

.diamond-image-container {
  position: relative;
  overflow: hidden;
}

.diamond-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diamond-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  aspect-ratio: 1/1;
}

.diamond-icons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icon-shipping,
.icon-heart {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.icon-shipping:hover,
.icon-heart:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.diamond-details {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.diamond-title {
  font-size: 16px;
  font-weight: 400;
  color: #222;
  line-height: 1.3;
}

.diamond-meta {
  font-size: 13px;
  color: #777;
  letter-spacing: 0.2px;
}

.diamond-quality {
  font-size: 13px;
  color: #666;
  font-weight: 400;
  margin-bottom: 8px;
}

.diamond-price {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  margin-top: 4px;
}

.btn-select-diamond {
  width: 100%;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.btn-select-diamond:hover {
  background: #f8f8f8;
  border-color: #d0d0d0;
}

.btn-select-diamond:active {
  background: #f0f0f0;
}

/* Responsive Design for Diamonds */
@media (max-width: 1500px) {
  .diamonds-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .diamonds-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .diamonds-section {
    padding: 60px 0;
  }

  .diamond-details {
    padding: 12px;
  }

  .diamond-title {
    font-size: 14px;
  }

  .diamond-quality {
    font-size: 12px;
  }

  .diamond-price {
    font-size: 16px;
  }

  .btn-select-diamond {
    padding: 5px 10px;
    font-size: 13px;
  }
}

/* --------------------------------------------------
   Product Listing Cards (ProductsList)
   -------------------------------------------------- */
.product-list-grid {
  --pl-radius: 8px;
}

.pl-card {
  position: relative;
  background: #fff;
  border: none;
  border-radius: var(--pl-radius);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease;
}

.pl-card:hover {
  transform: translateY(-2px);
}

.pl-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #111;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.pl-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pl-wishlist:hover {
  background: rgba(255, 255, 255, 0.95);
}

.pl-card-media {
  background: #fff;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-card-media img {
  width: 100%;
  height: 250px;
  object-fit: contain;
}

.pl-swatches {
  display: flex;
  gap: 6px;
  padding: 0 16px 8px 16px;
  justify-content: center;
}

.pl-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  position: relative;
  cursor: pointer;
}

/* Active swatch with green outline */
.pl-swatch--active {
  border: 1px solid #000;
}

.pl-meta {
  padding: 8px 16px 20px 16px;
  text-align: center;
}

.pl-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 4px;
}

.pl-sub {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pl-dot {
  color: #999;
  font-size: 10px;
  font-family: var(--font-lora);
}

.pl-price {
  font-size: 15px;
  color: #1a1a1a;
}

.cursor-pointer-events-none {
  pointer-events: none;
  cursor: not-allowed;
}

/* Diamonds Filter */
.diamonds-filter {
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Diamonds Filter - Accordion Card */
.filter-card {
  border-top: 1px solid #eee;
}
.filter-card:first-child {
  border-top: 0;
}
.filter-card-header {
  background: #fff;
  padding: 14px 16px;
  border: none;
  text-align: left;
  cursor: pointer;
}
.filter-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.filter-card-chevron {
  font-size: 14px;
  color: #666;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}
.filter-card.is-open .filter-card-chevron {
  transform: rotate(180deg);
}
.filter-card-body {
  padding: 8px 16px 16px 16px;
}

/* Shape grid to match provided design */
.ms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ms-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.ms-item-img {
  border: 1px solid #e9e9e9;
  background: #f9f9f9;
  border-radius: 50%;
  padding: 4px;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.ms-item-img.is-selected {
  border-color: #000;
}

/* .ms-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
} */

.ms-item span {
  font-size: 12px;
  line-height: 1.2;
  color: #666;
  text-align: center;
}
