/* === Theme Variables === */
:root {
  --primary: #4B256D;      /* Purple */
  --secondary: #E9E4F0;    /* Soft Lavender */
  --highlight: #F2C94C;
  --cta-bg: #ffffff;
  --cta-hover: #000000;
  --accent: #FBEFF5;
  --text: #333333;
  --border: #D6CFE3;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --spacing: 20px;
  --bp-md: 768px;         /* Responsive breakpoint */
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: #FAFAF7;
  color: var(--text);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover, a:focus {
  color: var(--cta-hover);
  outline: none;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: var(--spacing);
}

/* === Logo Sizing === */
.logo {
  max-width: 25%;
  height: auto;
}
@media (max-width: var(--bp-md)) {
  .logo {
    max-width: 10%;
  }
/* === Header Parts Backgrounds === */
.header-top {
  background: var(--primary);
}
.header-middle {
  background: var(--secondary);
}
.header-bottom {
  background: var(--primary);
}

/* === Header Inner Wrappers === */
.header-top__inner,
.header-middle__inner,
.header-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

/* === Top Bar === */
.header-top .welcome-note {
  font-weight: 500;
  color: #fff;
}
.header-top .contact-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  margin-left: 1rem;
}
.header-top .whatsapp-btn {
  background: #25D366;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.header-top .call-link {
  margin-left: 1rem;
}

/* === Middle Nav and Hamburger === */
.nav-boxed-menu {
  position: relative;
}

/* Reset list-style for menu */
.nav-menu,
.nav-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  justify-content: space-around;
  align-items: center;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.nav-menu a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 0 rgba(0,0,0,0.05);
  color: var(--primary);
}
.nav-menu a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

/* Taxonomy-specific styling */
.taxonomy-women .nav-link {
  border-bottom: 2px solid var(--primary);
}
.taxonomy-men .nav-link {
  border-bottom: 2px solid var(--highlight);
}
.taxonomy-kids .nav-link {
  border-bottom: 2px solid var(--secondary);
}
.taxonomy-cart .nav-link,
.taxonomy-checkout .nav-link {
  text-transform: uppercase;
}

/* Dropdown menus */
.dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
.dropdown-menu.open {
  display: block;
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--primary);
  text-decoration: none;
}
.dropdown-link:hover {
  background: var(--accent);
}

/* Hamburger button hidden by default */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* Mobile styles */
@media (max-width: var(--bp-md)) {
  .hamburger {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--secondary);
    padding: var(--spacing) 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu li {
    margin: 0.5rem 0;
    text-align: center;
  }
}

/* === Bottom Quick Links === */
.header-bottom .quick-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  color: var(--primary);
}
.header-bottom .quick-link:hover {
  transform: translateY(-4px) rotateX(5deg) scale(1.05);
  box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* === Popup Modal === */
.whatsapp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none; 
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.whatsapp-modal {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}
.whatsapp-modal h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}
.whatsapp-modal p {
  margin-bottom: 1.5rem;
}
.whatsapp-modal .modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}
.whatsapp-modal .whatsapp-btn-modal {
  display: inline-block;
  background: #25D366;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
}

/* === Forms & Buttons === */
form input,
form select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--primary);
}
form button {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

/* === Grids & Cards === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--spacing);
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.product-card h3,
.product-card p {
  margin: 0.5em 0;
}

/* === Responsive Images === */
picture,
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* === Product Detail Layout === */
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
  margin: var(--spacing) 0;
}
.product-detail__back {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing);
  color: var(--primary);
}
.product-detail__info {
  flex: 1;
  min-width: 300px;
}
.product-detail__info h2 {
  margin-bottom: 0.5em;
}
.product-detail__add-to-cart {
  margin-top: var(--spacing);
}

/* === Detail Image Bound & Hover-Zoom === */
.product-detail__image {
  flex: 0 0 auto;
  width: 300px;
  height: 300px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin: 0 auto;
}
.product-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-detail__image:hover img {
  transform: scale(1.2);
}

/* === Carousel Item Bound & Hover-Zoom === */
.carousel-item {
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}
.carousel-item img {
  transition: transform 0.3s ease;
}
.carousel-item:hover img {
  transform: scale(1.05);
}

/* === Related Products Carousel === */
.related-section .related-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--spacing);
  padding-bottom: var(--spacing);
  -webkit-overflow-scrolling: touch;
}
.related-section .related-carousel::-webkit-scrollbar {
  height: 6px;
}
.related-section .related-carousel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.related-section .related-carousel .product-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: transform 0.3s ease;
}
.related-section .related-carousel .product-card:hover {
  transform: translateY(-5px);
}
.related-section .related-carousel .product-card img {
  transition: transform 0.3s ease;
}
.related-section .related-carousel .product-card:hover img {
  transform: scale(1.1);
}

/* === Accessibility: Focus States === */
.nav-link:focus,
.dropdown-link:focus,
.quick-link:focus {
  outline: 2px dashed var(--highlight);
  outline-offset: 3px;
}
/* Make the Bra Size Calculator link match the other nav-link boxes */
.taxonomy-bra-calculator .nav-link {
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: background-color 0.2s, border-color 0.2s;
  padding: 0.5rem 1rem; /* match your other px-3 py-2 spacing */
}
.taxonomy-bra-calculator .nav-link:hover,
.taxonomy-bra-calculator .nav-link:focus {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--primary) !important;
}

