/* Base styles */
body {
  margin: 0;
  padding: 0;
  /* Using a serif font for a classic, high-contrast look */
  font-family: "Playfair Display", serif;
  background-color: white;
  color: black;
  min-height: 100vh;
  /* allow vertical scrolling but prevent accidental horizontal scroll */
  overflow-x: hidden;
  scroll-behavior: smooth;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Page Transition Wiper */
.page-wipe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* White background as requested */
  z-index: 99999;

  /* Flexbox to center the random image */
  display: flex;
  flex-direction: column; /* Stack image and text */
  justify-content: center;
  align-items: center;

  /* Transition settings: animate clip-path */
  transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s linear;
  /* Default State: Fully Visible (Covering screen) */
  clip-path: inset(0 0 0 0);

  pointer-events: none;
}

/* Utility to disable transition for instant resetting */
.page-wipe.no-transition {
  transition: none !important;
}

/* Hidden state: Wiped away to the RIGHT (Left edge moves to 100%) */
.page-wipe.hidden {
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
}

/* Start state for "Covering" animation (Wipe In from Left) 
   (This class is used in JS to set the starting position before animating to default) */
.page-wipe.wipe-in-start {
  clip-path: inset(0 100% 0 0);
}

/* Exiting state: Used when clicking a link. 
   We reset origin to LEFT so it Grows from Left to Right. */
.page-wipe.mask-in {
  clip-path: inset(0 0 0 0);
  pointer-events: auto; /* Block clicks */
}

.wipe-quote {
  margin-top: 20px;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  color: #000;
  letter-spacing: 1px;
  font-style: italic;
  text-align: center;
  max-width: 80%;
  /* Simplified fade to avoid layout shift/jumping */
  animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html {
  scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

.container {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* --- Header and Navigation --- */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  /* Places the logo (left) and menu (right) on opposite ends */
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  box-sizing: border-box;
  z-index: 10;
}

.logo-link svg {
  color: black;
  height: 24px;
  width: 24px;
}

/* Logo image sizing: keeps logo inside header and preserves aspect ratio */
.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.logo-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Basic styling for the container */
.menu-btn {
  position: relative;
  height: 22px; /* Adjust size as needed */
  width: 28px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Styling the hamburger lines */
.btn-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  margin: 0 auto;
  background: #000; /* Default to black for general pages */
  border-radius: 10px;
  transform-origin: center;
  will-change: transform, opacity, top;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s linear, top 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s;
}

/* precise stacking positions for the three lines */
.btn-line:nth-child(1) {
  top: 4px;
}
.btn-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.btn-line:nth-child(3) {
  bottom: 4px;
}

/* Styles when the '.close' class is added (the 'X' state) */

.menu-btn.close .btn-line {
  background: #fff; /* White lines when menu is open (against black nav) */
}

.menu-btn.close .btn-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-btn.close .btn-line:nth-child(2) {
  opacity: 0; /* Fade out middle line */
}

.menu-btn.close .btn-line:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* Remove default blue focus outline on click, keep a clear style for keyboard users */
.menu-btn:focus {
  outline: none;
}

/* For browsers that support focus-visible, show a subtle non-blue outline for keyboard navigation */
.menu-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.85);
  outline-offset: 4px;
}

/* --- Hero Section Specific Header Overrides --- */
/* When we are on the home page (or any page with .hero-section), 
   we might want the header to be white initially */
body:has(.hero-section) .btn-line {
  background: #fff;
}
/* Fallback for browsers not supporting :has - we can also add a class via JS or manually */
/* Fallback for browsers not supporting :has - we can also add a class via JS or manually */
.hero-header-lines .btn-line {
  background: #fff;
}

/* --- Header Right Group (Cart + Menu) --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  padding: 0;
}

.cart-icon-btn svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: black;
  color: white;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* Hero section specific overrides for cart icon too */
body:has(.hero-section) .cart-icon-btn {
  color: white;
}
body:has(.hero-section) .cart-count {
  background-color: white;
  color: black;
}

/* --- Main Content and Graphic --- */
/* --- Main Content Layout --- */
.main-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  padding-top: 0; /* Hero touches top */
  padding-bottom: 0;
  min-height: auto;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  width: 100%;
  height: 90vh; /* Takes up most of the screen */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6); /* Darken image for better text readability */
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  animation: fadeUp 1s ease-out;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  margin: 0 0 10px 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-family: "Segoe UI", sans-serif;
  font-size: 1.2rem;
  margin: 0 0 40px 0;
  opacity: 0.9;
  letter-spacing: 1px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 40px;
  border: 2px solid white;
  color: white;
  text-decoration: none;
  font-family: "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  background: transparent;
}

.hero-btn:hover {
  background: white;
  color: black;
}

/* --- Featured Collection Section --- */
.featured-section {
  padding: 80px 20px;
  background: #fff;
  text-align: center;
}

.featured-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  font-weight: 400;
  letter-spacing: 1px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 50px auto;
}

.featured-item {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  max-width: 350px;
  width: 100%;
  margin: 0 auto;
}

.featured-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin-bottom: 20px;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-item:hover .featured-img-wrap img {
  transform: scale(1.05);
}

.featured-info h3 {
  font-size: 1.1rem;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.featured-info span {
  font-family: "Segoe UI", sans-serif;
  color: #666;
}

.view-all-link {
  font-family: "Segoe UI", sans-serif;
  text-decoration: none;
  color: black;
  border-bottom: 1px solid black;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.view-all-link:hover {
  color: #555;
  border-color: #555;
}

/* --- Signature Block (Refined) --- */
.signature-block {
  /* fill the full viewport */
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  /* No longer full 100vh mandatory, but substantial */
  min-height: 60vh;
  margin: 0;
  padding: 0px;
  box-sizing: border-box;
  color: white;
  background: #111; /* Dark background for contrast with hero/featured */
}

.signature-image-placeholder {
  flex: 1;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.signature-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8; /* Slightly dim image */
}

.signature-text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.signature-text-content {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-style: italic;
  margin: 0 0 20px 0;
  line-height: 1.4;
  max-width: 80%;
}

.signature-ceo {
  font-family: "Segoe UI", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  margin: 0;
}

/* --- Dropdown / Overlay Navigation --- */
.nav-panel {
  /* dropdown anchored to the top-right, directly under the menu button */
  position: absolute;
  top: 64px; /* distance from top; aligns beneath header */
  right: 40px; /* match header padding so it sits under the button */
  width: 240px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 8px;
  padding: 12px 16px;
  transform-origin: top right;
  transform: translateY(-8px) scaleY(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  z-index: 9; /* below header (10) so the X button stays visible above it */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.nav-panel.open {
  transform: translateY(0) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: color 0.12s ease, transform 0.18s ease;
  display: inline-block;
  padding: 6px 4px;
}

.nav-link:hover,
.nav-link:focus {
  color: #ddd;
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .nav-panel {
    right: 20px;
    width: 200px;
    top: 58px;
  }
  .nav-link {
    font-size: 0.95rem;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .signature-block {
    flex-direction: column;
    min-height: auto;
  }

  .signature-image-placeholder {
    width: 100%;
    height: 300px;
    flex: none;
  }

  .signature-text-container {
    padding: 60px 20px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  /* Allow featured items to stay 2-up or stack? 
       Usually 1-up is better for Featured on tiny screens */
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation Helper */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
