/* ═══════════════════════════════════════════════════
   Main Product Section — RIMAN 1:1 Clone
   ═══════════════════════════════════════════════════ */

.product-header-2 { position: relative; }

.product-header-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Layout: 2-column, gallery left + info right ── */

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .product-layout {
    grid-template-columns: 55% 1fr;
  }
}

/* ── Gallery: 2x2 grid ───────────────────────────── */

.media-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

@media (max-width: 767px) {
  .media-column {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 2px;
  }
  .media-column::-webkit-scrollbar { display: none; }
}

.hero-media {
  aspect-ratio: 1 / 1;
  background-color: #f0ede9;
  overflow: hidden;
}

@media (max-width: 767px) {
  .hero-media {
    width: 85vw;
    min-width: 85vw;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ede9;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 4rem;
  font-weight: 300;
  color: #c5c0b8;
  font-style: italic;
}

/* When gallery is empty, hero spans full width */
.media-column:not(:has(.gallery-grid)) .hero-media {
  grid-column: 1 / -1;
}

@supports not (selector(:has(*))) {
  .media-column .hero-media:only-child {
    grid-column: 1 / -1;
  }
}

.gallery-grid {
  display: contents;
}

@media (max-width: 767px) {
  .gallery-grid {
    display: flex;
    gap: 2px;
  }
}

.gallery-item {
  aspect-ratio: 1 / 1;
  background-color: #f0ede9;
  overflow: hidden;
}

@media (max-width: 767px) {
  .gallery-item {
    width: 75vw;
    min-width: 75vw;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gallery-item img:hover { opacity: 0.92; }

.clickable-image { cursor: pointer; }

/* ── Info Column ─────────────────────────────────── */

.info-column {
  width: 100%;
  padding: 1.5rem 1.25rem 2.5rem;
}

@media (min-width: 768px) {
  .info-column {
    padding: 1.25rem 2rem 2.5rem;
  }
}

@media (min-width: 1024px) {
  .info-column {
    padding: 1rem 2.5rem 3rem;
    position: sticky;
    top: 82px;
    align-self: start;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.08) transparent;
  }
  .info-column::-webkit-scrollbar { width: 3px; }
  .info-column::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
  }
}

.info-sticky {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Breadcrumbs (from description or feature text) ── */

.product-description .trix-content { all: unset; display: block; }

/* ── Rating ──────────────────────────────────────── */

.rating-wrapper {
  display: none;
}

/* ── Product Title ───────────────────────────────── */

.product-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.product-title-wrapper h1 {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #1a1a1a;
  margin: 0;
  font-style: italic;
}

@media (min-width: 768px) {
  .product-title-wrapper h1 { font-size: 1.875rem; }
}

@media (min-width: 1024px) {
  .product-title-wrapper h1 { font-size: 2.125rem; }
}

.product-code-badge {
  border: 1px solid #1a1a1a;
  border-radius: 100px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

/* ── Price ────────────────────────────────────────── */

.price-section {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

.price {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  color: #1a1a1a;
}

.new-badge {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
}

/* ── Description ─────────────────────────────────── */

.product-description {
  color: #4a4a4a;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.product-description p { margin: 0 0 0.625rem; }
.product-description p:last-child { margin-bottom: 0; }

.product-description strong {
  display: block;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

/* ── Tariff notice ───────────────────────────────── */

.subscription-info {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.75rem;
}

.subscription-info p {
  font-size: 0.6875rem;
  font-weight: 700;
  font-style: italic;
  color: #1a1a1a;
}

/* ── Purchase Method / Subscribe ─────────────────── */

.subscribe {
  border: 1px solid #e5e5e5;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.subscribe .subscribe-item {
  padding: 0.875rem 1rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.subscribe .subscribe-item.selected {
  background-color: #fafafa;
}

.subscribe .subscribe-option { position: static; }

.subscribe .subscribe-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  z-index: 3;
  cursor: pointer;
}

.subscribe .subscribe-option label {
  position: relative;
  padding-left: 1.75rem;
  display: flex;
  align-items: center;
  pointer-events: none;
  font-size: 0.8125rem;
  color: #1a1a1a;
}

.subscribe .subscribe-option label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  background: #fff;
  transition: all 0.15s ease;
}

.subscribe .subscribe-option input:checked ~ label::before {
  border: 5px solid #1a1a1a;
}

.subscribe .one-time-purchase-section {
  border-top: 1px solid #e5e5e5;
}

.subscribe .subscribe-features {
  pointer-events: none;
  margin-top: 0.5rem;
  padding-left: 1.75rem;
  font-size: 0.75rem;
  color: #6b6b6b;
}

.subscribe .subscribe-features li { gap: 0.375rem; }
.subscribe .subscribe-features svg { width: 16px; height: 16px; }

.subscribe .subscription-plans,
.subscribe .subscription-plans-dropdown { pointer-events: auto; }

.purchase-price {
  font-size: 0.8125rem;
  font-weight: 500 !important;
}

/* Purchase Method label */
.variant-selector,
.info-sticky > .subscribe {
  margin-top: 0.25rem;
}

/* ── Quantity + ADD TO BAG ────────────────────────── */

.add-to-cart-section {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  background: #fff;
  height: 44px;
}

.qty-wrap span {
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  font-size: 0.875rem;
  user-select: none;
  color: #1a1a1a;
}

.qty-wrap span.qty-action-btn {
  width: 36px;
  height: 100%;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: 1rem;
}

.qty-wrap span.qty-action-btn:hover { background-color: #f5f5f5; }

.qty-wrap span.qty-val {
  border-right: 1px solid #e5e5e5;
  border-left: 1px solid #e5e5e5;
  min-width: 40px;
  font-weight: 500;
  font-size: 0.8125rem;
}

.btn-section { flex: 1; }

.btn-section .btn {
  height: 44px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  font-weight: 500;
}

.main-product-section .btn.btn-filled-primary,
.main-product-section .sticky-footer .btn.btn-filled-primary {
  background-color: #3c544b;
  border-color: #3c544b;
  color: #fff;
}

.main-product-section .btn.btn-filled-primary:hover:not(:disabled),
.main-product-section .sticky-footer .btn.btn-filled-primary:hover:not(:disabled) {
  background-color: #2c3e36;
  border-color: #2c3e36;
}

.main-product-section .btn.btn-filled-primary.disabled,
.main-product-section .btn.btn-filled-primary:disabled {
  background-color: #ccc;
  border-color: #ccc;
  color: #888;
  cursor: not-allowed;
}

/* ── Variant Selector ────────────────────────────── */

.variant-selector {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.variant-label {
  font-size: 0.8125rem;
  color: #1a1a1a;
  font-weight: 500;
}

.variant-dropdown {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  background: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.variant-dropdown:focus { outline: none; border-color: #1a1a1a; }

/* ── Accordions ──────────────────────────────────── */

.accordions-wrapper {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e5e5e5;
  margin-top: 0.5rem;
}

.accordion-item {
  border-bottom: 1px solid #e5e5e5;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.accordion-header span {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.accordion-header:hover { opacity: 0.6; }

.accordion-icon {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0, 0.15, 1);
  color: #1a1a1a;
  width: 14px;
  height: 14px;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content:not(.hidden) { padding-bottom: 1rem; }
.accordion-content.hidden { max-height: 0 !important; padding: 0; }

.parsed-accordion-body,
.benefits-text,
.ingredients-content,
.how-to-use-content {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #4a4a4a;
}

.parsed-accordion-body ul,
.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.parsed-accordion-body ul li,
.benefits-list li {
  position: relative;
  padding-left: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #4a4a4a;
}

.parsed-accordion-body ul li::before,
.benefits-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #999;
}

.parsed-accordion-body p {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #4a4a4a;
}

.parsed-accordion-body p:last-child { margin-bottom: 0; }

.how-to-use-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.how-to-use-step { font-size: 0.8125rem; line-height: 1.6; color: #4a4a4a; }

.how-to-use-step__title {
  display: block;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.125rem;
}

/* ── Product Features (hide) ─────────────────────── */

.product-features { display: none; }

/* ── Error message ───────────────────────────────── */

.error-message {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: #b91c1c;
  line-height: 1.5;
}

/* ── Sticky Footer ───────────────────────────────── */

.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 0.625rem 1.5rem;
  padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));
}

.sticky-footer.visible { transform: translateY(0); }

.sticky-footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-product-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.sticky-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: #f0ede9;
}

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

.sticky-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sticky-text h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a1a;
}

.sticky-price {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1a1a1a;
}

.sticky-cta { flex-shrink: 0; }

.sticky-cta .btn {
  height: 38px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 0 1.25rem;
}

@media (max-width: 767px) {
  .sticky-footer { padding: 0.5rem 1rem; }
  .sticky-thumb { width: 36px; height: 36px; }
  .sticky-cta .btn { padding: 0 1rem; font-size: 0.6875rem; }
}

/* ── Lightbox Modal ──────────────────────────────── */

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.image-modal.active { display: flex; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.75rem;
  cursor: pointer;
  z-index: 10001;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover { color: #fff; }

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  width: 100%;
}

.modal-main-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(100vh - 150px);
}

.modal-main-image img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.modal-thumb {
  width: 56px;
  height: 56px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  border: 2px solid transparent;
}

.modal-thumb:hover { opacity: 0.8; }
.modal-thumb.active, .is-active .modal-thumb {
  opacity: 1;
  border-color: #fff;
}

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

.modal-thumbnails .splide__arrow {
  background: rgba(255,255,255,0.15);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 1 !important;
}

.modal-thumbnails .splide__arrow:hover { background: rgba(255,255,255,0.3); }
.modal-thumbnails .splide__arrow:disabled { opacity: 0.2 !important; }
.modal-thumbnails .splide__arrow svg { fill: #fff; width: 12px; height: 12px; }
.modal-thumbnails .splide__arrow--prev { left: -14px; }
.modal-thumbnails .splide__arrow--next { right: -14px; }

@media (max-width: 767px) {
  .image-modal { padding: 1rem; }
  .modal-close { top: 0.5rem; right: 0.5rem; }
  .modal-thumb { width: 44px; height: 44px; }
}

/* ── Utilities ───────────────────────────────────── */

.flex-1 { flex: 1; }
.trix-content { all: unset; display: block; }
.trix-content * { all: revert; }

/* ── Mobile scroll indicator ─────────────────────── */

@media (max-width: 767px) {
  .media-column::after {
    content: '';
    width: 1px;
    flex-shrink: 0;
  }
}

/* ── Small phone adjustments ─────────────────────── */

@media (max-width: 480px) {
  .hero-media {
    width: 90vw;
    min-width: 90vw;
  }
  .gallery-item {
    width: 75vw;
    min-width: 75vw;
  }
  .info-column { padding: 1.25rem 1rem 2rem; }
  .product-title-wrapper h1 { font-size: 1.5rem; }
}
