/* YBlingerie - Premium Design System */

:root {
  --color-bg: #FCFCFC;
  --color-text-main: #121212;
  --color-text-secondary: #555555;
  --color-accent: #CFA15D;
  /* Muted Gold */
  --color-border: #E5E5E5;
  --color-white: #FFFFFF;
  --color-black: #000000;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  --container-max-width: 1400px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-main);
}

.heading-xl {
  font-size: 4rem;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: 3rem;
  letter-spacing: -0.01em;
}

.heading-md {
  font-size: 2rem;
}

.heading-sm {
  font-size: 1.5rem;
}

.text-sm {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Utilities */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-text-main);
  color: var(--color-white);
  border-color: var(--color-text-main);
}

.btn-primary:hover {
  background-color: var(--color-white);
  color: var(--color-text-main);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-main);
  border-color: var(--color-text-main);
}

.btn-outline:hover {
  background-color: var(--color-text-main);
  color: var(--color-white);
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(252, 252, 252, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  padding: var(--spacing-xs) 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  /* Bold for impact */
  letter-spacing: -0.03em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-menu {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 400;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-text-main);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-icons {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu / Hamburger */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--color-text-main);
  transition: var(--transition);
  display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100vh - 80px);
  background-color: rgba(252, 252, 252, 0.98);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  padding: var(--spacing-lg) var(--spacing-md);
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu .nav-link {
  font-size: 1.5rem;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu .nav-link::after {
  display: none;
}

/* Hero Section */
.hero {
  height: 90vh;
  margin-top: 80px;
  /* Header height */
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.8);
}

.hero-content {
  color: var(--color-white);
  max-width: 600px;
  animation: fadeUp 1s ease-out;
}

.hero-title {
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
  font-weight: 300;
  opacity: 0.9;
}

/* Collections / Categories */
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-padding {
  padding: var(--spacing-xl) 0;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.product-card {
  position: relative;
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
  background-color: #f4f4f4;
  aspect-ratio: 3/4;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  text-align: center;
}

.product-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.product-price {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.add-to-cart-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  transform: translateY(100%);
  transition: var(--transition);
  display: flex;
  justify-content: center;
}

.product-card:hover .add-to-cart-overlay {
  transform: translateY(0);
}

/* Newsletter */
.newsletter {
  background-color: #F8F8F8;
  text-align: center;
}

.newsletter-form {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center;
  gap: var(--spacing-xs);
}

.input-field {
  padding: 1rem;
  border: 1px solid var(--color-border);
  width: 300px;
  background: transparent;
  font-family: var(--font-body);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-text-main);
}

/* Footer */
.site-footer {
  background-color: var(--color-text-main);
  color: var(--color-white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
  font-family: var(--font-body);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: #a0a0a0;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: #a0a0a0;
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive - Mobile First Approach */

/* Tablets and below (iPad, tablets) */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .heading-xl {
    font-size: 3.5rem;
  }

  .heading-lg {
    font-size: 2.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-sm);
  }

  .section-padding {
    padding: var(--spacing-lg) 0;
  }
}

/* Mobile Landscape and below */
@media (max-width: 900px) {
  .heading-xl {
    font-size: 3rem;
  }

  .heading-lg {
    font-size: 2rem;
  }

  .heading-md {
    font-size: 1.5rem;
  }

  /* Hide desktop navigation */
  .nav-menu {
    display: none;
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Adjust brand logo for mobile */
  .brand-logo {
    position: static;
    transform: none;
    font-size: 1.5rem;
  }

  /* Footer responsive */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Product grid responsive */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  /* Reduce spacing */
  .section-padding {
    padding: var(--spacing-md) 0;
  }

  /* Newsletter form responsive */
  .newsletter-form {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .input-field {
    width: 100%;
    max-width: 400px;
  }

  /* Hero adjustments */
  .hero {
    height: 70vh;
    margin-top: 80px;
  }

  .hero-content {
    max-width: 90%;
  }
}

/* Mobile Portrait */
@media (max-width: 600px) {

  /* Typography scaling */
  .heading-xl {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .heading-lg {
    font-size: 1.75rem;
  }

  .heading-md {
    font-size: 1.25rem;
  }

  .heading-sm {
    font-size: 1.125rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Container padding */
  .container {
    padding: 0 1rem;
  }

  /* Navigation adjustments */
  .nav-wrapper {
    height: 70px;
  }

  .brand-logo {
    font-size: 1.25rem;
  }

  .nav-icons {
    gap: 0.5rem;
  }

  .icon-btn {
    padding: 0.375rem;
  }

  /* Hero section */
  .hero {
    height: 60vh;
    margin-top: 70px;
  }

  /* Product grid - single column on small screens */
  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .product-image-wrapper {
    aspect-ratio: 4/5;
  }

  /* Buttons responsive */
  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.8rem;
    width: 100%;
    max-width: 300px;
  }

  /* Footer single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Section spacing */
  .section-padding {
    padding: var(--spacing-md) 0;
  }

  .section-title {
    margin-bottom: var(--spacing-md);
  }

  /* Newsletter */
  .input-field {
    font-size: 0.9rem;
  }

  /* Overlay buttons */
  .add-to-cart-overlay {
    transform: translateY(0);
    opacity: 0.95;
  }

  .product-card:hover .add-to-cart-overlay {
    opacity: 1;
  }
}

/* Extra Small Devices */
@media (max-width: 375px) {
  .heading-xl {
    font-size: 2rem;
  }

  .heading-lg {
    font-size: 1.5rem;
  }

  .brand-logo {
    font-size: 1.125rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
  }
}

/* Language Toggle */
.lang-toggle {
  background: none;
  border: 1px solid var(--color-text-main);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 1rem;
  transition: var(--transition);
}

.lang-toggle:hover {
  background-color: var(--color-text-main);
  color: var(--color-white);
}

/* RTL Support (Arabic) */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-menu {
  gap: var(--spacing-md);
}

[dir="rtl"] .lang-toggle {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .newsletter-form {
  flex-direction: row-reverse;
}

[dir="rtl"] .input-field {
  text-align: right;
}

[dir="rtl"] .footer-col ul li {
  text-align: right;
}

[dir="rtl"] .mobile-menu .nav-link {
  text-align: right;
}

[dir="rtl"] .mobile-menu {
  right: 0;
}

/* Fix absolute positioning for RTL if needed, though flex handles most. 
   Brand logo is absolutely centered, so we need to flip the translate if strictly needed, 
   but translate(-50%) works relative to the element's own width, so it remains centered regardless of dir
   as long as left: 50% is set. However, in RTL, left: 50% still places it at 50% from left.
   So standard centering is fine.
*/