/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  /* Colors - Feminine pink & rose gold palette */
  --color-primary: #e91e8c;
  --color-primary-light: #ff6bb3;
  --color-primary-dark: #c4176f;
  --color-secondary: #2d2d2d;
  --color-accent: #fff0f5;
  --color-rose-gold: #b76e79;
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-gray-100: #fdf2f8;
  --color-gray-200: #fce7f3;
  --color-gray-300: #f9a8d4;
  --color-gray-500: #9ca3af;
  --color-gray-700: #4b5563;
  --color-gray-900: #1f2937;
  --color-success: #10b981;
  --color-error: #ef4444;

  /* Typography */
  --font-primary: 'Playfair Display', Georgia, serif;
  --font-secondary: 'Lato', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(233, 30, 140, 0.05);
  --shadow-md: 0 4px 6px rgba(233, 30, 140, 0.1);
  --shadow-lg: 0 10px 15px rgba(233, 30, 140, 0.1);
  --shadow-xl: 0 20px 25px rgba(233, 30, 140, 0.15);

  /* Dots pattern */
  --dots-pattern: radial-gradient(circle, var(--color-primary) 2px, transparent 2px);
  --dots-size: 30px 30px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-gray-900);
  background-color: var(--color-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: 25px;
  transition: all var(--transition-normal);
}

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

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn--secondary:hover {
  background-color: var(--color-black);
  border-color: var(--color-black);
}

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

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

.btn--full {
  width: 100%;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
  transition: all var(--transition-normal);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo__img {
  height: 45px;
  width: auto;
}

.nav__menu {
  display: flex;
  gap: var(--spacing-lg);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-700);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-primary);
}

.cart-toggle {
  position: relative;
  background: none;
  border: none;
  padding: var(--spacing-sm);
  color: var(--color-gray-700);
  transition: color var(--transition-fast);
}

.cart-toggle:hover {
  color: var(--color-primary);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 0.625rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: var(--spacing-sm);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-gray-700);
  transition: all var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff0f5 0%, #fdf2f8 50%, #fce7f3 100%);
  color: var(--color-secondary);
  text-align: center;
  overflow: hidden;
}

/* Polka dots pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--dots-pattern);
  background-size: var(--dots-size);
  opacity: 0.15;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--spacing-xl);
}

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

.hero__logo {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  width: clamp(250px, 50vw, 450px);
  height: auto;
}

.hero__tagline {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: var(--spacing-xl);
  color: var(--color-gray-700);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero .btn {
  padding: 1rem 2.5rem;
}

/* Hero with custom background image */
.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero__background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* When hero has background image, hide the polka dots behind the image */
.hero--has-bg::before {
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: var(--spacing-2xl) 0;
  position: relative;
}

.section--category {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Alternating polka dot backgrounds */
.section--category:nth-child(odd) {
  background-color: var(--color-white);
}

.section--category:nth-child(even) {
  background-color: var(--color-gray-100);
  position: relative;
}

.section--category:nth-child(even)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--dots-pattern);
  background-size: var(--dots-size);
  opacity: 0.08;
  pointer-events: none;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.section__title {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.section__description {
  font-size: 1.125rem;
  color: var(--color-gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.product-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-primary-light);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--color-gray-100);
  cursor: pointer;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-card__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.product-card:hover .product-card__video {
  opacity: 1;
}

/* Product Card Slideshow */
.product-card__slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-card__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform var(--transition-slow);
}

.product-card__slide.active {
  opacity: 1;
}

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

.product-card__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.product-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.product-card__dot.active {
  background: var(--color-white);
  transform: scale(1.2);
}

.product-card__zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
  z-index: 10;
}

.product-card:hover .product-card__zoom {
  opacity: 1;
  transform: scale(1);
}

.product-card__zoom:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.product-card__content {
  padding: var(--spacing-lg);
}

.product-card__name {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
}

.product-card__description {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

.product-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.product-card__price {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

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

.product-card__size {
  padding: 0.5rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  font-size: 0.875rem;
  background-color: var(--color-white);
}

.product-card__size:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.section--about {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.section--about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.about__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.about__content h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--color-white);
}

.about__content p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  opacity: 0.95;
}

/* ==========================================================================
   Message Pages (Success/Cancelled)
   ========================================================================== */
.section--message {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 70px;
  background-color: var(--color-gray-100);
  position: relative;
}

.section--message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--dots-pattern);
  background-size: var(--dots-size);
  opacity: 0.08;
}

.message {
  text-align: center;
  padding: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.message svg {
  margin-bottom: var(--spacing-lg);
}

.message--success svg {
  color: var(--color-success);
}

.message--cancelled svg {
  color: var(--color-error);
}

.message h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.message p {
  font-size: 1.125rem;
  color: var(--color-gray-500);
  margin-bottom: var(--spacing-sm);
}

.message .btn {
  margin-top: var(--spacing-lg);
}

/* ==========================================================================
   Modal Base
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: all var(--transition-normal);
}

.modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal__content {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.modal[aria-hidden="false"] .modal__content {
  transform: translateX(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-gray-200);
}

.modal__header h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
}

.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-gray-500);
  padding: var(--spacing-sm);
  line-height: 1;
}

.modal__close:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Cart Modal
   ========================================================================== */
.cart__items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.cart__empty {
  text-align: center;
  color: var(--color-gray-500);
  padding: var(--spacing-xl);
}

.cart__item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.cart__item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background-color: var(--color-gray-100);
  border-radius: 8px;
}

.cart__item-details {
  flex: 1;
}

.cart__item-name {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.cart__item-size {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.cart__item-price {
  color: var(--color-primary);
  font-weight: 600;
}

.cart__item-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.cart__item-quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-gray-300);
  border-radius: 20px;
}

.cart__item-quantity button {
  background: none;
  border: none;
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
  color: var(--color-primary);
}

.cart__item-quantity span {
  padding: 0 0.5rem;
  min-width: 30px;
  text-align: center;
}

.cart__item-remove {
  background: none;
  border: none;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  text-decoration: underline;
}

.cart__item-remove:hover {
  color: var(--color-error);
}

.cart__footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-100);
}

.cart__summary {
  margin-bottom: var(--spacing-lg);
}

.cart__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--color-gray-700);
}

.cart__row--total {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-gray-300);
}

/* ==========================================================================
   Checkout Modal
   ========================================================================== */
.modal--checkout .modal__content {
  max-width: 500px;
  overflow-y: auto;
}

.checkout-form {
  padding: var(--spacing-lg);
}

.checkout-section {
  margin-bottom: var(--spacing-lg);
}

.checkout-section h3 {
  font-size: 1rem;
  font-family: var(--font-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  color: var(--color-gray-700);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

/* Delivery Options */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.delivery-option {
  cursor: pointer;
  display: block;
}

.delivery-option input {
  position: absolute;
  opacity: 0;
}

.delivery-option__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border: 2px solid var(--color-gray-300);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.delivery-option input:checked + .delivery-option__label {
  border-color: var(--color-primary);
  background-color: rgba(233, 30, 140, 0.05);
}

.delivery-option__title {
  font-weight: 500;
}

.delivery-option__price {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.delivery-option input:checked + .delivery-option__label .delivery-option__price {
  color: var(--color-primary);
  font-weight: 500;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  gap: var(--spacing-md);
}

.payment-method {
  flex: 1;
  cursor: pointer;
}

.payment-method input {
  position: absolute;
  opacity: 0;
}

.payment-method__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border: 2px solid var(--color-gray-300);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.payment-method input:checked + .payment-method__box {
  border-color: var(--color-primary);
  background-color: rgba(233, 30, 140, 0.05);
}

.payment-method__box span {
  font-size: 0.875rem;
  font-weight: 500;
}

.payment-icon {
  border-radius: 4px;
}

/* Checkout Summary */
.checkout-summary {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-gray-200);
}

.checkout-total {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.checkout-total span {
  color: var(--color-primary);
}

.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #1a1a1a 100%);
  color: var(--color-white);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle, rgba(233, 30, 140, 0.3) 2px, transparent 2px);
  background-size: 40px 40px;
  opacity: 0.15;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.footer h3 {
  font-size: 1.5rem;
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-sm);
}

.footer h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary-light);
}

.footer p {
  color: var(--color-gray-300);
  line-height: 1.6;
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer__links a {
  color: var(--color-gray-300);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-primary-light);
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-links a {
  color: var(--color-gray-300);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.footer__contact a {
  color: var(--color-gray-300);
}

.footer__contact a:hover {
  color: var(--color-primary-light);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.footer__bottom p {
  font-size: 0.875rem;
}

/* ==========================================================================
   Placeholder Image
   ========================================================================== */
.product-card__image[src*="placeholder"] {
  background: linear-gradient(135deg, var(--color-gray-200) 0%, var(--color-gray-100) 100%);
}

/* ==========================================================================
   Product Detail Modal
   ========================================================================== */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: all var(--transition-normal);
}

.product-modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.product-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
}

.product-modal__content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.product-modal[aria-hidden="false"] .product-modal__content {
  transform: scale(1);
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.product-modal__close:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.product-modal__gallery {
  background: var(--color-gray-100);
  display: flex;
  flex-direction: column;
}

.product-modal__main-image {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.product-modal__main-image img,
.product-modal__main-image video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-modal__nav:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.product-modal__nav--prev {
  left: 16px;
}

.product-modal__nav--next {
  right: 16px;
}

.product-modal__thumbnails {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  overflow-x: auto;
  background: var(--color-white);
}

.product-modal__thumb {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.product-modal__thumb.active {
  border-color: var(--color-primary);
}

.product-modal__thumb img,
.product-modal__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal__thumb--video .product-modal__thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal__info {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-modal__name {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
}

.product-modal__description {
  font-size: 1rem;
  color: var(--color-gray-500);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.product-modal__price {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xl);
}

.product-modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.product-modal__size-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-modal__size-wrapper label {
  font-weight: 500;
  color: var(--color-secondary);
}

.product-modal__size {
  padding: 0.75rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.product-modal__size:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .nav__menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    border-bottom: 1px solid var(--color-gray-200);
  }

  .nav__menu.active {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__logo {
    width: clamp(200px, 70vw, 300px);
  }

  .hero__tagline {
    font-size: 1rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    flex-direction: column;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* Product Modal Mobile */
  .product-modal {
    align-items: flex-start;
  }

  .product-modal__content {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100%;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    overflow-y: auto;
  }

  .product-modal__gallery {
    flex-shrink: 0;
    max-height: 45vh;
    max-height: 45dvh;
  }

  .product-modal__main-image {
    min-height: 200px;
    height: 100%;
  }

  .product-modal__main-image img,
  .product-modal__main-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .product-modal__thumbnails {
    padding: var(--spacing-sm);
  }

  .product-modal__thumb {
    width: 50px;
    height: 50px;
  }

  .product-modal__info {
    flex: 1;
    padding: var(--spacing-lg);
    padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom, 0));
  }

  .product-modal__name {
    font-size: 1.25rem;
  }

  .product-modal__description {
    font-size: 0.875rem;
  }

  .product-modal__price {
    font-size: 1.25rem;
  }

  .product-modal__actions {
    flex-direction: column;
  }

  .product-modal__close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }

  .product-modal__nav {
    width: 32px;
    height: 32px;
  }

  .product-modal__nav--prev {
    left: 8px;
  }

  .product-modal__nav--next {
    right: 8px;
  }
}
