/* ==========================================================================
   Atelier Corium — Components: Animated Alternating Zippers, Lightbox,
   Blog Popup Modal (Independent Scroll), Pagination, GDPR Banner, Toast
   ========================================================================== */

/* ---------- ANIMATED ZIPPER SECTION DIVIDERS ---------- */
.zipper-divider {
  --zip-p: 0.12;
  position: relative;
  width: 100%;
  padding: 28px 0;
  overflow: hidden;
  user-select: none;
}

.zipper-track {
  position: relative;
  width: min(var(--container), calc(100% - 32px));
  height: 44px;
  margin-inline: auto;
  display: flex;
  align-items: center;
}

/* Fabric tape behind the metallic teeth */
.zipper-tape {
  position: relative;
  width: 100%;
  height: 28px;
  background: var(--zip-tape);
  border-top: 1px dashed var(--stitch);
  border-bottom: 1px dashed var(--stitch);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Metallic interlocking teeth (top row & bottom row) */
.zipper-teeth-top,
.zipper-teeth-bottom {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 7px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--zip-teeth) 0px,
    var(--zip-teeth-highlight) 3px,
    var(--zip-teeth) 6px,
    transparent 6px,
    transparent 12px
  );
}

.zipper-teeth-top {
  top: 7px;
}

.zipper-teeth-bottom {
  bottom: 7px;
  background-position: 6px 0;
}

/* Subtle unzipped opening behind the slider */
.zipper-gap {
  position: absolute;
  top: 11px;
  height: 6px;
  background: var(--bg);
  transition: width 80ms linear;
}

.zipper-divider[data-dir="ltr"] .zipper-gap {
  left: 0;
  width: calc(var(--zip-p) * 100%);
}

.zipper-divider[data-dir="rtl"] .zipper-gap {
  right: 0;
  width: calc(var(--zip-p) * 100%);
}

/* Zipper Slider + Sculpted Leather & Brass Pull-Tab (Cheiță / Trăgător) */
.zipper-slider {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%);
  z-index: 3;
  will-change: left;
  transition: left 90ms linear;
}

.zipper-divider[data-dir="ltr"] .zipper-slider {
  left: calc(6% + var(--zip-p) * 88%);
}

.zipper-divider[data-dir="rtl"] .zipper-slider {
  left: calc(94% - var(--zip-p) * 88%);
  flex-direction: row-reverse;
}

.zipper-slider__body {
  width: 24px;
  height: 22px;
  background: linear-gradient(145deg, var(--brass-bright), var(--brass-dark));
  border: 1.5px solid var(--leather-deep);
  border-radius: var(--radius);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  position: relative;
  display: grid;
  place-items: center;
}

.zipper-slider__body::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--leather-deep);
  border-radius: var(--radius);
}

.zipper-slider__tab {
  width: 34px;
  height: 14px;
  margin-left: -3px;
  background: var(--bag-cta-bg);
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  transform-origin: left center;
  transform: rotate(calc((var(--zip-p) - 0.5) * 14deg));
}

.zipper-divider[data-dir="rtl"] .zipper-slider__tab {
  margin-left: 0;
  margin-right: -3px;
  transform-origin: right center;
  transform: rotate(calc((0.5 - var(--zip-p)) * 14deg));
}

.zipper-slider__tab::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border: 1px solid var(--brass-bright);
  border-radius: var(--radius);
}

.zipper-divider[data-dir="rtl"] .zipper-slider__tab::after {
  right: auto;
  left: 5px;
}

/* ---------- LIGHTBOX (ENLARGE PRODUCT IMAGE WITH X CLOSE) ---------- */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(16, 11, 8, 0.86);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.lightbox-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-dialog {
  position: relative;
  max-width: min(960px, 94vw);
  max-height: 90vh;
  background: var(--bg-card);
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-dialog__img {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-inline: auto;
  border-radius: var(--radius);
}

.lightbox-dialog__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px 2px;
  font-size: 1.15rem;
  color: var(--ink);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--leather-deep);
  color: #FAF3E8;
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), background-color var(--transition);
}

.modal-close-btn:hover {
  background: var(--leather);
  transform: scale(1.06);
}

/* ---------- BLOG POP-UP MODAL (INDEPENDENT SCROLL) ---------- */
.blog-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(16, 11, 8, 0.8);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 280ms ease;
}

.blog-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.blog-modal {
  position: relative;
  width: min(820px, 100%);
  height: min(86vh, 840px);
  background: var(--bg-card);
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.blog-modal__header {
  position: relative;
  padding: 20px 64px 16px 26px;
  background: var(--bg-elevated);
  border-bottom: 1px dashed var(--stitch);
  flex-shrink: 0;
}

.blog-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 1rem;
  color: var(--brass);
  margin-bottom: 6px;
}

.blog-modal__title {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
}

/* Independent scroll viewport inside the article popup */
.blog-modal__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px 34px;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) var(--bg-elevated);
}

.blog-modal__cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.blog-modal__body h3 {
  margin-top: 1.2em;
  color: var(--leather);
}

.blog-modal__body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1.25rem;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(34px, 5vw, 56px);
  flex-wrap: wrap;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--brass);
  color: var(--leather);
  transform: translateY(-1px);
}

.page-btn.is-active {
  background: var(--leather);
  border-color: var(--brass);
  color: #FAF3E8;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- GDPR COOKIE CONSENT BANNER & PREFERENCES MODAL ---------- */
.gdpr-banner {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 780px;
  margin-inline: auto;
  z-index: 1400;
  background: var(--bg-card);
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 22px;
  display: none;
  gap: 16px;
}

.gdpr-banner.is-visible {
  display: grid;
}

.gdpr-banner__text h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.gdpr-banner__text p {
  font-size: 1.02rem;
  margin: 0;
}

.gdpr-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gdpr-btn {
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 1.05rem;
  transition: background-color var(--transition), border-color var(--transition);
}

.gdpr-btn:hover {
  border-color: var(--brass);
}

.gdpr-btn--primary {
  background: var(--leather);
  border-color: var(--brass);
  color: #FAF3E8;
}

.gdpr-btn--primary:hover {
  background: var(--leather-deep);
}

.gdpr-prefs {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--stitch);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.gdpr-prefs.is-open {
  display: flex;
}

.gdpr-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

/* ---------- TOAST NOTIFICATION ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1600;
  padding: 12px 18px;
  background: var(--leather-deep);
  color: #FAF3E8;
  border: 1.5px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 280ms var(--ease-artisan), opacity 280ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
