/* ==========================================================================
   TALLAH LUXE — Advanced Motion & Interactive Animation Layer
   ========================================================================== */

:root {
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-inout: cubic-bezier(0.77, 0, 0.175, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 1. PAGE LOAD CURTAIN */
@keyframes curtainAutoFade {
  0% { transform: translateY(0); opacity: 1; pointer-events: all; }
  60% { transform: translateY(0); opacity: 1; pointer-events: all; }
  100% { transform: translateY(-100%); opacity: 0; pointer-events: none; visibility: hidden; }
}
.curtain {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #1e1b19;
  display: grid;
  place-items: center;
  animation: curtainAutoFade 1.3s cubic-bezier(0.77, 0, 0.175, 1) forwards;
  transition: transform 0.85s var(--e-inout), opacity 0.5s 0.2s;
  cursor: pointer;
}
.curtain.is-done {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.curtain__logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #d5c1a3;
  font-size: 2.4rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  opacity: 0;
  animation: curtainLogoAnim 1.2s var(--e-out) forwards;
}
@keyframes curtainLogoAnim {
  0% { opacity: 0; letter-spacing: 0.9em; transform: scale(0.96); }
  50% { opacity: 1; }
  100% { opacity: 1; letter-spacing: 0.5em; transform: scale(1); }
}
.curtain.is-done {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* 2. READING PROGRESS BAR */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99990;
  pointer-events: none;
  background: transparent;
}
.read-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b79a68, #d5c1a3, #f8f5f0);
  transition: width 0.08s linear;
}

/* 3. LUXURY MOUSE CURSOR */
.cursor, .cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99995;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s, width 0.25s var(--e-spring), height 0.25s var(--e-spring), background 0.2s, border-color 0.2s;
}
.cursor {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(183, 154, 104, 0.7);
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: #b79a68;
  transform: translate(-50%, -50%);
}
body.has-cursor .cursor,
body.has-cursor .cursor-dot {
  opacity: 1;
}
body.cursor-hover .cursor {
  width: 58px;
  height: 58px;
  border-color: #d5c1a3;
  background: rgba(213, 193, 163, 0.12);
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none !important; }
}

/* 4. FLY TO CART ANIMATION */
.fly-img {
  position: fixed;
  z-index: 99998;
  pointer-events: none;
  border-radius: 6px;
  object-fit: cover;
  transition: all 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

/* 5. BUTTON RIPPLE */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleFx 0.65s var(--e-out);
  pointer-events: none;
}
@keyframes rippleFx {
  to { transform: scale(3.2); opacity: 0; }
}

/* 6. SCROLL REVEAL PRIMITIVES */
[data-anim] {
  will-change: transform, opacity;
}
[data-anim="fade"] {
  opacity: 0;
  transition: opacity 0.9s var(--e-out);
}
[data-anim="fade-up"] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.85s var(--e-out), transform 0.85s var(--e-out);
}
[data-anim="fade-down"] {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.85s var(--e-out), transform 0.85s var(--e-out);
}
[data-anim="zoom"] {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.85s var(--e-out), transform 0.9s var(--e-out);
}
[data-anim="reveal"] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--e-out);
}
[data-anim="reveal"].is-in {
  clip-path: inset(0 0 0 0);
}
[data-anim].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* STAGGER HELPER */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--e-out), transform 0.7s var(--e-out);
}
[data-stagger].is-in > * {
  opacity: 1;
  transform: none;
}
[data-stagger].is-in > *:nth-child(1) { transition-delay: 0.04s; }
[data-stagger].is-in > *:nth-child(2) { transition-delay: 0.12s; }
[data-stagger].is-in > *:nth-child(3) { transition-delay: 0.20s; }
[data-stagger].is-in > *:nth-child(4) { transition-delay: 0.28s; }
[data-stagger].is-in > *:nth-child(5) { transition-delay: 0.36s; }
[data-stagger].is-in > *:nth-child(6) { transition-delay: 0.44s; }
[data-stagger].is-in > *:nth-child(7) { transition-delay: 0.52s; }
[data-stagger].is-in > *:nth-child(8) { transition-delay: 0.60s; }

/* 7. WORDMARK SHIMMER */
.shimmer {
  background: linear-gradient(110deg, #d5c1a3 25%, #ffffff 48%, #d5c1a3 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerAnim 5s ease-in-out infinite;
}
@keyframes shimmerAnim {
  0% { background-position: 180% 0; }
  50%, 100% { background-position: -80% 0; }
}

/* 8. PRODUCT CARD HOVER REFINEMENTS */
.pc {
  position: relative;
  cursor: pointer;
  transition: transform 0.4s var(--e-out);
}
.pc .pcm {
  overflow: hidden;
  position: relative;
  background: #f4f0ea;
}
.pc .pcm img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.7s var(--e-out);
  display: block;
}
.pc:hover .pcm img {
  transform: scale(1.06);
}

/* 9. ADMIN MODE STYLES & CONTROLS */
#admin-bar {
  position: sticky;
  top: 0;
  z-index: 99900;
  background: #171615;
  color: #fff;
  padding: 10px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  font-size: 0.75rem;
  border-bottom: 1px solid #b79a68;
}
#admin-bar.is-visible {
  display: flex;
}
.admin-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #d5c1a3;
}
.admin-badge {
  background: #b79a68;
  color: #171615;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}
.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-adm {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(213, 193, 163, 0.35);
  padding: 6px 14px;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-adm:hover {
  background: #b79a68;
  color: #171615;
  border-color: #b79a68;
}
.btn-adm.primary {
  background: #b79a68;
  color: #171615;
  font-weight: 600;
}
.btn-adm.primary:hover {
  background: #d5c1a3;
}
.btn-adm.danger {
  border-color: rgba(235, 87, 87, 0.4);
}
.btn-adm.danger:hover {
  background: #eb5757;
  color: #fff;
  border-color: #eb5757;
}

/* Live Product Card Admin Overlay */
.pc-admin-tools {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: none;
  gap: 4px;
}
body.is-admin-mode .pc-admin-tools {
  display: flex;
}
.btn-pc-adm {
  background: rgba(23, 22, 21, 0.88);
  color: #fff;
  border: 1px solid rgba(213, 193, 163, 0.4);
  backdrop-filter: blur(4px);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.btn-pc-adm:hover {
  background: #b79a68;
  color: #171615;
}
.btn-pc-adm.del:hover {
  background: #eb5757;
  color: #fff;
}

/* Secret Lock Button in Footer */
.admin-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8c827a;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  padding: 4px 6px;
  margin-left: 8px;
  font-size: 0.85rem;
}
.admin-lock-btn:hover {
  color: #b79a68;
  transform: scale(1.15);
}

/* Admin Modals */
.adm-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(23, 22, 21, 0.7);
  backdrop-filter: blur(6px);
  z-index: 99950;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.adm-modal-bg.is-open {
  display: flex;
}
.adm-modal {
  background: #fff;
  color: #292624;
  width: min(820px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  position: relative;
  padding: 32px;
}
body.ar .adm-modal {
  direction: rtl;
}
.adm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7ded3;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.adm-modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: #292624;
}
.adm-modal-close {
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8f5f0;
  transition: background 0.2s;
}
.adm-modal-close:hover {
  background: #292624;
  color: #fff;
}
.adm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.adm-form-full {
  grid-column: 1 / -1;
}
.adm-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b7167;
  margin-bottom: 6px;
}
.adm-input, .adm-select, .adm-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e7ded3;
  background: #fff;
  color: #292624;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  outline: none;
  border-color: #b79a68;
  box-shadow: 0 0 0 3px rgba(183, 154, 104, 0.15);
}
.adm-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Catalog Table in Admin Modal */
.adm-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}
body.ar .adm-table {
  text-align: right;
}
.adm-table th {
  background: #f8f5f0;
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: #7b7167;
  text-transform: uppercase;
  border-bottom: 1px solid #e7ded3;
}
.adm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f2ede6;
  vertical-align: middle;
}
.adm-table tr:hover td {
  background: #fdfbf7;
}
.adm-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

/* ==========================================================================
   GLOBAL BACK BUTTON & NAVIGATION CONTROLS
   ========================================================================== */
.floating-back-btn {
  position: fixed;
  top: 86px;
  left: 24px;
  z-index: 890;
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 196, 176, 0.7);
  color: var(--charcoal, #292624);
  padding: 8px 18px;
  font-family: var(--font-b, sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border-radius: 40px;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.floating-back-btn:hover {
  background: var(--charcoal, #292624);
  color: #ffffff;
  border-color: var(--charcoal, #292624);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
}
[dir="rtl"] .floating-back-btn,
body.ar .floating-back-btn {
  left: auto;
  right: 24px;
}
[dir="rtl"] .floating-back-btn svg,
body.ar .floating-back-btn svg {
  transform: rotate(180deg);
}
@media (max-width: 768px) {
  .floating-back-btn {
    top: auto;
    bottom: 24px;
    left: 16px;
    padding: 10px 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  }
  [dir="rtl"] .floating-back-btn,
  body.ar .floating-back-btn {
    left: auto;
    right: 16px;
  }
}

.subpage-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  background: #ffffff;
  color: var(--charcoal, #292624);
  border: 1px solid var(--soft-beige, #e7ded3);
  border-radius: 3px;
  transition: all 0.2s ease;
}
.btn-back:hover {
  background: var(--charcoal, #292624);
  color: #ffffff;
  border-color: var(--charcoal, #292624);
}
[dir="rtl"] .btn-back svg,
body.ar .btn-back svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   CHECKOUT & ORDERS ENHANCEMENTS
   ========================================================================== */
.input-error {
  border-color: #d94343 !important;
  background-color: #fff9f9 !important;
  box-shadow: 0 0 0 3px rgba(217, 67, 67, 0.15) !important;
}

.btn-copy-sm {
  background: #f4ede4;
  border: 1px solid #dcd1c2;
  color: #4a3e35;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-copy-sm:hover {
  background: #292624;
  color: #fff;
  border-color: #292624;
}

/* Order Success Modal */
.order-success-box {
  text-align: center;
  padding: 10px 0;
}
.order-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eef7ee;
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 0 8px rgba(46, 125, 50, 0.08);
}
.order-success-title {
  font-family: var(--font-h, Georgia, serif);
  font-size: 1.8rem;
  color: #292624;
  margin-bottom: 6px;
}
.order-success-num {
  display: inline-block;
  background: #fbf6ee;
  border: 1px dashed #d1b894;
  color: #8c6d3b;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.order-success-card {
  background: #faf8f5;
  border: 1px solid #eae2d6;
  border-radius: 6px;
  padding: 16px;
  text-align: right;
  margin-bottom: 20px;
  font-size: 0.8rem;
}
[dir="ltr"] .order-success-card {
  text-align: left;
}
.order-success-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25d366;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 14px 24px;
  border-radius: 6px;
  text-decoration: none;
  width: 100%;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}
.order-success-wa-btn:hover {
  background: #1eb956;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

/* Admin Orders Management UI */
.adm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.adm-stat-box {
  background: #fbf9f6;
  border: 1px solid #e7ded3;
  border-radius: 6px;
  padding: 12px 16px;
}
.adm-stat-num {
  font-family: var(--font-h, Georgia, serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #292624;
}
.adm-stat-lbl {
  font-size: 0.68rem;
  color: #7b7167;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.adm-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.adm-pill {
  border: 1px solid #dfd5c8;
  background: #fff;
  padding: 5px 12px;
  font-size: 0.72rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #554d46;
}
.adm-pill.active {
  background: #292624;
  color: #fff;
  border-color: #292624;
}

.adm-order-card {
  border: 1px solid #e7ded3;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}
.adm-order-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.adm-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #f0eae1;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.adm-order-id {
  font-weight: 700;
  font-size: 0.95rem;
  color: #8c6d3b;
}
.adm-order-date {
  font-size: 0.72rem;
  color: #8a7f75;
}

.adm-status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
}
.adm-status-badge.new {
  background: #fff4e5;
  color: #b76e00;
  border: 1px solid #ffd599;
}
.adm-status-badge.processing {
  background: #e8f4fd;
  color: #1769aa;
  border: 1px solid #b6defb;
}
.adm-status-badge.delivered {
  background: #edf7ed;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.adm-status-badge.cancelled {
  background: #fdeded;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}

.adm-order-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .adm-order-body {
    grid-template-columns: 1fr;
  }
}
.adm-cust-info {
  font-size: 0.8rem;
  line-height: 1.6;
}
.adm-items-mini {
  background: #faf8f5;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.76rem;
}
.adm-items-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #e6dec3;
}
.adm-items-mini-row:last-child {
  border-bottom: none;
}

