/* Header + footer styles */

/* ============ HEADER (nav) ============ */
/* ════════════════════════════════════════
   NAV BASE
════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--nav-h);
  padding: 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}

nav.hidden {
  transform: translateY(-100%);
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(2rem);
  border-bottom: 0.1rem solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ════════════════════════════════════════
   NAV LOGO
════════════════════════════════════════ */
.nav-logo {
  font-family: "Playfair Display", serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.05rem;
  transition: color 0.3s;
  text-decoration: none;
}
nav.scrolled .nav-logo {
  color: var(--dark);
}
.nav-logo em {
  font-style: normal;
  color: var(--primary-light);
}
nav.scrolled .nav-logo em {
  color: var(--primary);
}

/* ════════════════════════════════════════
   NAV LINKS
════════════════════════════════════════ */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}
.nav-links a {
  font-size: 1.4rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-full);
  transition: var(--t);
  text-decoration: none;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
nav.scrolled .nav-links a {
  color: var(--text-2);
}
nav.scrolled .nav-links a:hover,
nav.scrolled .nav-links a.active {
  background: var(--primary-pale);
  color: var(--primary);
}

/* ════════════════════════════════════════
   NAV CTA
════════════════════════════════════════ */
.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 0.6rem 2rem !important;
  font-weight: 600 !important;
  border-radius: var(--r-full) !important;
  box-shadow: 0 0.4rem 1.6rem var(--primary-glow) !important;
  text-decoration: none;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-0.1rem);
}

/* ════════════════════════════════════════
   CART BUTTON
════════════════════════════════════════ */
.nav-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 0.1rem solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--r-full);
  font-size: 1.35rem;
  font-weight: 600;
  transition: var(--t);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}
.nav-cart-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
nav.scrolled .nav-cart-btn {
  background: #fff;
  color: var(--text-2);
  border-color: var(--border);
}
nav.scrolled .nav-cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}
.cart-badge {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ════════════════════════════════════════
   HAMBURGER
════════════════════════════════════════ */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  overflow: hidden;
}
.hamburger span {
  display: block;
  width: 2.4rem;
  height: 0.2rem;
  border-radius: 0.2rem;
  background: #fff;
  transition:
    transform 0.35s ease,
    opacity 0.25s ease,
    background 0.3s;
}
nav.scrolled .hamburger span {
  background: var(--dark);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(0.7rem) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-0.7rem) rotate(-45deg);
}

/* ════════════════════════════════════════
   MOBILE NAV
════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 0.1rem solid var(--border);
  padding: 1.6rem 2.4rem;
  z-index: 490;
  flex-direction: column;
  gap: 0.4rem;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  padding: 1.2rem 1.6rem;
  border-radius: var(--r-md);
  transition: var(--t);
  text-decoration: none;
}
.mobile-nav a:hover {
  background: var(--primary-pale);
  color: var(--primary);
}
.mobile-nav .nav-cta {
  text-align: center;
  margin-top: 0.8rem;
}

/* ════════════════════════════════════════
   TABLET
════════════════════════════════════════ */
@media (min-width: 768px) {
  nav {
    padding: 0 3.2rem;
  }
}

/* ════════════════════════════════════════
   DESKTOP
════════════════════════════════════════ */
@media (min-width: 1024px) {
  nav {
    padding: 0 4.8rem;
  }
  .nav-links {
    display: flex;
  }
  .hamburger {
    display: none;
  }
}

/* ============ FOOTER ============ */
/* start: footer-base */
footer {
  background: var(--dark-footer);
  padding: 6.4rem 4.8rem 3.2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.1rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(194, 98, 42, 0.5),
    transparent
  );
}
/* end: footer-base */

/* start: footer-grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4.8rem;
  margin-bottom: 4.8rem;
}
/* centered, brand-only footer */
.footer-grid-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-grid-center .footer-brand {
  max-width: 60rem;
}
/* end: footer-grid */

/* start: footer-brand */
.footer-logo {
  font-family: "Playfair Display", serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.6rem;
}

.footer-logo em {
  font-style: normal;
  color: var(--primary-light);
}

.footer-desc {
  font-size: 1.45rem;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.32);
  margin-bottom: 2rem;
}

.footer-contact {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.28);
}
/* end: footer-brand */

/* start: footer-col */
.footer-col-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.6rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.38);
  transition: var(--t);
}

.footer-links a:hover {
  color: var(--primary-light);
}
/* end: footer-col */

/* start: footer-hours */
.footer-hours {
  font-size: 1.4rem;
  line-height: 2.2;
  color: rgba(255, 255, 255, 0.38);
}

.footer-closed {
  color: #ef4444;
}
/* end: footer-hours */

/* start: footer-bottom */
.footer-bottom {
  border-top: 0.1rem solid rgba(255, 255, 255, 0.08);
  padding-top: 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  flex-wrap: wrap;
  gap: 1.6rem;
  color: rgba(255, 255, 255, 0.25);
}
/* Footer bottom links */
.footer-bottom a {
  color: inherit;
  transition: var(--t);
}
.footer-bottom a:hover {
  color: var(--primary-light);
}
/* end: footer-bottom */

/* ── RESPONSIVE ── */
@media (max-width: 64em) {
  footer {
    padding: 4.8rem 3.2rem 2.4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.2rem;
    margin-bottom: 3.2rem;
  }

  .footer-logo {
    font-size: 2.6rem;
  }
  .footer-desc {
    font-size: 1.45rem;
  }
  .footer-contact {
    font-size: 1.3rem;
  }

  .footer-col-title {
    font-size: 1.1rem;
    margin-bottom: 1.6rem;
  }
  .footer-links a {
    font-size: 1.4rem;
  }
  .footer-links {
    gap: 1rem;
  }
  .footer-hours {
    font-size: 1.4rem;
  }
  .footer-bottom {
    font-size: 1.3rem;
    padding-top: 2.4rem;
    gap: 1.6rem;
  }
}

@media (max-width: 48em) {
  footer {
    padding: 4.8rem 2.4rem 2.4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    margin-bottom: 2.4rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

[x-cloak]{display:none!important;}

/* hero description */
.hero-desc { color: rgba(255, 255, 255, 0.5); max-width: 42rem; }

/* ============ CART SIDEBAR ============ */
.cart-overlay {
  background: rgba(22, 14, 6, 0.65);
  backdrop-filter: blur(0.6rem);
  z-index: 800;
}
.cart-sidebar {
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  z-index: 900;
  transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -0.8rem 0 4rem rgba(0, 0, 0, 0.15);
}
.cart-sidebar.open {
  right: 0;
}
.cart-close {
  width: 3.6rem;
  height: 3.6rem;
}
.cart-close:hover {
  background: var(--primary-pale);
  color: var(--primary);
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item-img {
  width: 7.2rem;
  height: 7.2rem;
  background: linear-gradient(145deg, #fff8f5, #ffe8d6);
}
.qty-btn {
  width: 2.8rem;
  height: 2.8rem;
}
.qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}
.qty-num {
  min-width: 2rem;
}
.cart-remove {
  background: none;
  align-self: center;
}
.cart-remove:hover {
  color: var(--danger);
}
.cart-checkout-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 0.8rem 2.4rem var(--primary-glow);
}
.cart-continue-btn {
  background: transparent;
  border: 0.2rem solid var(--primary);
}
.cart-continue-btn:hover {
  background: var(--primary-pale);
}
@media (min-width: 768px) {
  .cart-sidebar {
    width: 44rem;
    right: -48rem;
  }
}


/* ════════════════════════════════════════════════════════════════════════
   PRODUCT MODAL + LIGHTBOX
   ════════════════════════════════════════════════════════════════════════ */
/* ══ CLOSE BTN FIXED ══ */
@media (min-width: 0px) {
  .close-wrap {
    position: relative;
  }
}
.modal-close-btn-fixed {
  position: absolute;
  /* top: 1.4rem;
  right: 1.4rem; */
  right: 1rem;
  top: 1rem;
  z-index: 1100;
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  transition:
    transform 0.22s ease,
    background 0.18s ease;
  backdrop-filter: blur(0.4rem);
}
.modal-close-btn-fixed:hover {
  transform: rotate(90deg) scale(1.1);
  background: #fff;
}

/* ══ OVERLAY ══ */
.modal-overlay {
  background: rgba(22, 14, 6, 0.82);
  backdrop-filter: blur(1rem);
  z-index: 800;
  padding: 0 1.6rem;
}

/* ══ BOX — MOBILE FIRST ══ */
/* الـ box نفسه بيسكرول على الموبايل */
.modal-box {
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  max-height: calc(100dvh - 3.6rem);
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 52rem;
  -webkit-overflow-scrolling: touch;
  animation: modal-in 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-box::-webkit-scrollbar {
  display: none;
}

/* ══ IMAGE SIDE ══ */
.modal-img-side {
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.modal-img-side:active {
  cursor: grabbing;
}
.modal-img {
  cursor: zoom-in;
  width: 100%;
  height: 26rem;
  object-fit: cover;
  display: block;
}
.modal-emoji-img {
  height: 26rem;
  background: linear-gradient(145deg, #fff8f5, #ffe8d6);
}
.modal-img-overlay {
  background: linear-gradient(to top, rgba(22, 14, 6, 0.2) 0%, transparent 50%);
}
.modal-img-badges {
  top: 1.6rem;
  left: 1.6rem;
  z-index: 2;
}

.prod-badge {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-full);
  display: inline-block;
}
.badge-sale {
  background: #ef4444;
  color: #fff;
}
.badge-new {
  background: var(--primary);
  color: #fff;
}
.badge-bestseller {
  background: #d97706;
  color: #fff;
}

.modal-slide-btn {
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.9);
}
.modal-slide-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.modal-slide-prev {
  left: 1.2rem;
}
.modal-slide-next {
  right: 1.2rem;
}

.modal-dots {
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.modal-dot {
  width: 0.8rem;
  height: 0.8rem;
  background: rgba(255, 255, 255, 0.6);
}
.modal-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ══ BODY ══ */
.modal-body {
  /* على موبايل: flow عادي تحت الصورة */
  overflow: visible;
}

/* ══ DETAILS / QTY ══ */
.modal-stars {
  color: #d97706;
}
.modal-price-old {
  text-decoration: line-through;
}
.modal-details {
  grid-template-columns: 1fr 1fr;
}
.modal-detail-label {
  letter-spacing: 0.08rem;
}
.modal-qty-ctrl {
  background: #f5f5f5;
}
.modal-qty-btn {
  width: 3.2rem;
  height: 3.2rem;
}
.modal-qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.modal-qty-num {
  min-width: 2.4rem;
}
.modal-actions {
  margin-top: auto;
}
.modal-add-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 0.8rem 2.4rem var(--primary-glow);
}
.modal-add-btn.added {
  background: var(--success);
}

/* ══ DESKTOP ══ */
@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 2.4rem;
  }
  .modal-box {
    border-radius: var(--r-2xl);
    max-width: 88rem;
    height: auto;
    max-height: auto;
    flex-direction: row;
    overflow: hidden; 
  }
  .modal-img-side {
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
  }
  .modal-img {
    width: 100%;
    height: 100%;
    min-height: 52rem;
  }
  .modal-emoji-img {
    height: 100%;
    min-height: 52rem;
  }
  
  .modal-body {
    width: 50%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
    scrollbar-width: none;
  }
  .modal-body::-webkit-scrollbar {
    display: none;
  }
}

/* ══ LIGHTBOX ══ */
.lightbox-overlay {
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
}
.lightbox-close {
  right: 2rem;
  top: -7rem;
  width: 4.4rem;
  height: 4.4rem;
  background: rgba(255, 255, 255, 0.15);
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-btn {
  position: absolute;
  width: 5.6rem;
  height: 5.6rem;
  background: rgba(255, 255, 255, 0.15);
  bottom: 3rem;
}
.lightbox-prev {
  left: 25%;
}
.lightbox-next {
  right: 25%;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90rem;
  padding: 16px;
}
.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox-dots {
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
}
.lightbox-dot {
  width: 1rem;
  height: 1rem;
  background: rgba(255, 255, 255, 0.4);
}
.lightbox-dot.active {
  background: #fff;
  transform: scale(1.3);
}

@media (min-width: 640px) {
  .lightbox-btn {
    font-size: 3.6rem;
    position: static;
    bottom: auto;
  }
  .lightbox-close {
    right: -4.4rem;
    top: -2rem;
  }
}
