/* ==========================================================================
   1. VARIABLES & BASE SETUP
   ========================================================================== */
:root {
  --site-bg: #fdfbf7;
  --site-text: #1a1a1a;
  --nav-bg: #fdfbf7;

  --main-bg: #fdfbf7;
  --accent-bg: #ffffff;
  --main-text: #1a1a1a;
  --text-hover: #d4a373;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--main-bg) !important;
  background-size: 400% 400%;
  color: var(--main-text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  animation: gradientShift 18s ease infinite;
  transition: background-color 0.3s ease;
}

body, p, h1, h2, h3, h4, h5, h6, a {
  color: var(--main-text);
}

a:hover,
.btn:hover,
.nav-links a:hover {
  color: var(--text-hover) !important;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   2. NAVIGATION BAR
   ========================================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 35px 6%;
  background-color: var(--accent-bg);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

nav.scrolled {
  background: var(--accent-bg);
  backdrop-filter: blur(12px);
  padding: 20px 6%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--main-text);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

nav.scrolled .nav-logo {
  opacity: 1;
  transform: translateY(0);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 45px;
  list-style: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  color: var(--main-text);
  transition: color 0.3s ease;
}

/* Navbar Actions & Cart Icon */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1002; /* Ensures button stays clickable above overlay */
}

.cart-icon-btn {
  background: transparent;
  border: none;
  color: var(--main-text);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  padding: 4px 8px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background-color: var(--text-hover);
  color: #000000;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--main-text);
  transition: all 0.3s ease;
}

/* Hamburger to 'X' animation when menu is open */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Overlay Breakpoint */
@media (max-width: 768px) {
  nav {
    padding: 20px 4%;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-logo {
    font-size: 18px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--accent-bg);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s ease;
    z-index: 1001;
  }

  .nav-links.active {
    right: 0;
  }
}
/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 0 20px;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(70px, 14vw, 160px);
  font-weight: 400;
  letter-spacing: 6px;
  text-align: center;
  color: var(--main-text);
  will-change: transform, opacity;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

/* ==========================================================================
   4. FLOATING PRODUCT SECTION
   ========================================================================== */
.floating-product-section {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--main-bg);
  overflow: hidden;
}

.background-text {
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(110px, 29vw, 300px);
  font-weight: 600;
  color: rgba(0, 0, 0, 0.04);
  letter-spacing: 10px;
  z-index: 1;
  user-select: none;
  text-align: center;
  filter: blur(2.5px);
}

.floating-wrapper {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  width: 280px;
  max-width: 40vw;
}

.floating-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(50px 50px 40px rgba(0, 0, 0, 0.30));
}

@media (max-width: 768px) {
  .floating-product-section {
    height: 80vh;
    padding: 0 15px;
  }

  .background-text {
    font-size: clamp(70px, 20vw, 120px);
    color: rgba(0, 0, 0, 0.07);
    letter-spacing: 4px;
  }

  .floating-wrapper {
    width: 220px;
    max-width: 75vw;
  }
}

/* ==========================================================================
   5. PRODUCT SLIDER SECTION
   ========================================================================== */
.slider-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 0;
  background-color: var(--main-bg);
}

.slider-wrapper {
  position: relative;
  width: 85%;
  height: 350px;
  border: 2px solid var(--accent-bg);
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--main-bg);
}

@media (min-width: 768px) {
  .slider-wrapper {
    width: 80%;
    height: 500px;
  }
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

.slider-track img {
  width: 100%;
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2);
  color: var(--main-text);
  border: 1px solid var(--main-text);
  font-size: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.slider-arrow:hover {
  color: var(--text-hover);
  border-color: var(--text-hover);
}

.slider-arrow.left  { left: 15px; }
.slider-arrow.right { right: 15px; }

/* ==========================================================================
   6. CATEGORIES & HORIZONTAL CARDS SCROLL
   ========================================================================== */
.category-section {
  margin: 35px 0;
}

.category-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 5%;
  border-radius: 8px;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.see-all-btn {
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.see-all-btn:hover {
  opacity: 0.85;
}

.horizontal-cards-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 18px 5%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.horizontal-cards-scroll::-webkit-scrollbar {
  height: 6px;
}

.horizontal-cards-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.horizontal-cards-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.scroll-card {
  flex: 0 0 210px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.scroll-card:hover {
  transform: translateY(-4px);
}

.card-image-box {
  width: 100%;
  height: 190px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.scroll-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 12px 0 4px 0;
  line-height: 1.3;
}

.card-price {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

/* ==========================================================================
   7. CART DRAWER & OVERLAY
   ========================================================================== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--main-bg);
  color: var(--main-text);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-header h3 {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 2px;
  font-size: 1.2rem;
  margin: 0;
}

.close-cart-btn {
  background: none;
  border: none;
  color: var(--main-text);
  font-size: 1.8rem;
  cursor: pointer;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.03);
}

.cart-item-details {
  flex: 1;
}

.cart-item-details h4 {
  font-size: 0.9rem;
  margin: 0 0 5px 0;
}

.cart-item-details .price {
  font-size: 0.85rem;
  opacity: 0.8;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  background: rgba(0, 0, 0, 0.08);
  border: none;
  color: var(--main-text);
  width: 22px;
  height: 22px;
  border-radius: 3px;
  cursor: pointer;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #ff5555;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--text-hover);
  color: var(--main-text) !important;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s, opacity 0.2s;
}

.checkout-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ==========================================================================
   8. AUTH MODAL
   ========================================================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.auth-modal-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666666;
}

.social-login-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.social-login-btn:hover {
  background: #f8f9fa;
}

.auth-divider {
  margin: 20px 0;
  border-bottom: 1px solid #eeeeee;
  line-height: 0.1em;
}

.auth-divider span {
  background: #ffffff;
  padding: 0 10px;
  color: #888888;
  font-size: 12px;
}

.auth-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #dddddd;
  border-radius: 6px;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   9. ADMIN & FORM INPUTS
   ========================================================================== */
.admin-section input[type="file"] {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  border: 2px dashed var(--admin-border, rgba(0, 0, 0, 0.15));
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-section input[type="file"]:hover {
  border-color: var(--main-text);
  background-color: rgba(0, 0, 0, 0.04);
}

.admin-section select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px !important;
}

/* ==========================================================================
   10. SITE FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--accent-bg);
  color: var(--main-text);
  padding: 60px 5% 20px 5%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-cta {
  text-align: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-cta a {
  color: var(--text-hover);
  text-decoration: none;
  font-weight: 500;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.brand-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--main-text);
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.3s, color 0.3s;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--text-hover);
}

.hotline {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 15px;
}

.hotline strong {
  color: var(--text-hover);
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--main-text);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

.social-links a:hover {
  background: var(--text-hover);
  color: #ffffff;
}

.footer-locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.location-card {
  background: rgba(0, 0, 0, 0.02);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pin-icon {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 8px;
}

.location-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.location-card p {
  font-size: 0.8rem;
  opacity: 0.8;
  line-height: 1.4;
}

.location-card .phone {
  margin-top: 8px;
  opacity: 0.9;
}

.map-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  background: var(--text-hover);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.75rem;
  opacity: 0.6;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}