/* Delight Sweet House — Premium Bakery UI */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&display=swap');

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.site-logo .logo-main {
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  color: #d22c7a;
  letter-spacing: 1px;
}
.site-logo .logo-sub {
  font-size: 14px;
  color: #555;
  letter-spacing: 2px;
}
/* Footer: light text on dark background */
footer .site-logo .logo-main { color: #FFF7ED; }
footer .site-logo .logo-sub { color: rgba(255, 247, 237, 0.75); }

:root {
  --amber: #F59E0B;
  --cream: #FFF7ED;
  --chocolate: #4B2E2B;
  --beige: #F5E6D3;
  --shadow: 0 4px 6px -1px rgba(75, 46, 43, 0.08), 0 2px 4px -2px rgba(75, 46, 43, 0.04);
  --shadow-hover: 0 20px 25px -5px rgba(75, 46, 43, 0.1), 0 8px 10px -6px rgba(75, 46, 43, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Global RTL support */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body {
  text-align: right;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.5s ease;
}
.img-zoom:hover img {
  transform: scale(1.05);
}

.btn-press:active, .active\:scale-98:active {
  transform: scale(0.98);
}

.cart-badge-pop {
  animation: pop 0.3s ease;
}
@keyframes pop {
  0% { transform: scale(1.2); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.slide-in-right {
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Shared hero overlay and text styling (LTR + RTL) */
.hero {
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.45)
  );
  z-index: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 0 1rem;
}

.hero h1,
.hero p {
  color: #ffffff;
}

/* Mobile-first hero image slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-slider {
    height: 60vh;
  }
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

#dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

#dots .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 5px;
  background: #fff;
  opacity: 0.5;
  border-radius: 50%;
  cursor: pointer;
}

#dots .dot.active {
  opacity: 1;
}

/* Navbar mobile icons: force cart icon first, then menu icon */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row;
  flex-wrap: nowrap;
}

.nav-icons .cart-icon {
  order: 1;
}

.nav-icons .menu-btn {
  order: 2;
}

/* Safety: ensure RTL never flips icon order */
html[dir="rtl"] .nav-icons {
  flex-direction: row !important;
}

/* Account profile: premium editable UI */
.profile-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #eee;
  box-shadow: var(--shadow);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.profile-row span {
  color: #888;
  font-weight: 600;
}

.profile-row p {
  margin: 0;
  font-weight: 500;
  text-align: end;
  word-break: break-word;
}

.profile-edit-form input {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
}

.profile-edit-form input:focus {
  border-color: #d4a373;
  outline: none;
}

.save-btn {
  background: #d4a373;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-btn {
  background: transparent;
  border: 1px solid #ccc;
  color: var(--chocolate);
  padding: 10px 18px;
  border-radius: 10px;
}

.edit-btn {
  background: transparent;
  border: none;
  color: #d4a373;
  cursor: pointer;
  font-weight: 600;
}

.profile-status {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}

/* Category carousel */
.cat-carousel-viewport {
  overflow-x: hidden;
  padding: 12px;
  margin: -12px;
}

.cat-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cat-slide {
  flex-shrink: 0;
}

.cat-carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.cat-carousel-btns {
  display: flex;
  gap: 8px;
}

.cat-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #4B2E2B;
  background: white;
  color: #4B2E2B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  padding: 0;
}

.cat-btn:hover:not(:disabled) {
  background: #4B2E2B;
  color: white;
}

.cat-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cat-carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(75, 46, 43, 0.25);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.cat-dot.active {
  background: #4B2E2B;
  transform: scale(1.4);
}
