/**
 * assets/css/style.css
 * The Royal Club - Luxury Fashion E-Commerce
 * Deep Emerald & Gold Design System
 */

/* ==============================
   CSS CUSTOM PROPERTIES - LULLABY CARE TOKENS
============================== */
:root {
  /* Lullaby Care Design System */
  --color-brand-milk: #f4faff;
  --color-brand-canvas: #d9f2ff;
  --color-brand-emerald: #3c6474;
  --color-brand-emerald-light: #446371;
  --color-brand-gold: #625e57;
  --color-brand-gold-light: #e5dfd6;
  --color-brand-cream: #e6f6ff;
  --color-brand-charcoal: #001f2a;

  /* Aliases for compatibility */
  --color-primary: #3c6474;
  --color-white: #f4faff;
  --color-accent: #625e57;
  --color-accent-glow: #e5dfd6;
  --color-surface: #f4faff;
  --color-text-heading: #001f2a;
  --color-text-body: #41484b;
  --color-error: #ba1a1a;
  --color-success: #15803d;

  /* Typography - Nunito Sans */
  --font-heading: "Nunito Sans", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
  --font-elegant: "Nunito Sans", sans-serif;

  /* Spacing */
  --header-height: 80px;
  --container-max: 1280px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;

  /* Effects */
  --glass-bg: rgba(244, 250, 255, 0.85);
  --glass-border: rgba(192, 223, 238, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 31, 42, 0.08);
  --blur-amount: 12px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ==============================
   BASE STYLES
============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

*::before,
*::after {
  max-width: 100%;
}

img,
video,
iframe,
canvas {
  max-width: 100% !important;
  height: auto !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body,
html {
  overflow-x: hidden !important;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-brand-milk);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

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

p {
  color: var(--color-text-body);
  line-height: 1.7;
}

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

/* ==============================
   CONTAINER & GRID
============================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .grid-products {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .grid-products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==============================
   HORIZONTAL SCROLL CAROUSEL
============================== */
.horizontal-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll__item {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.horizontal-scroll::after {
  content: "";
  flex: 0 0 24px;
}

@media (min-width: 480px) {
  .horizontal-scroll__item {
    width: 240px;
  }
}

@media (min-width: 640px) {
  .horizontal-scroll__item {
    width: 260px;
  }
}

@media (min-width: 768px) {
  .horizontal-scroll__item {
    width: 280px;
  }
}

@media (min-width: 1024px) {
  .horizontal-scroll {
    margin: 0;
    padding: 0;
  }
  .horizontal-scroll__item {
    width: 300px;
  }
}

/* ==============================
   SWIPE SCROLL - Simple horizontal swipe
============================== */
.swipe-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -24px;
  padding: 0 24px 8px;
}

.swipe-scroll::-webkit-scrollbar {
  display: none;
}

.swipe-scroll__item {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.swipe-scroll__item .product-card {
  height: 100%;
  min-height: 0;
}

@media (min-width: 480px) {
  .swipe-scroll__item {
    width: 240px;
  }
}

@media (min-width: 640px) {
  .swipe-scroll__item {
    width: 260px;
  }
  .swipe-scroll__item .product-card__image {
    aspect-ratio: 3/4 !important;
  }
}

@media (min-width: 768px) {
  .swipe-scroll__item {
    width: 280px;
  }
}

@media (min-width: 1024px) {
  .swipe-scroll {
    margin: 0;
    padding: 0 0 8px;
  }
  .swipe-scroll__item {
    width: 300px;
  }
}

/* ==============================
   BUTTONS
============================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-brand-gold);
  color: var(--color-brand-emerald);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background-color: var(--color-brand-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-white);
  padding: 13px 27px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0;
  transition: all var(--transition-base);
  border: 1.5px solid var(--color-white);
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-brand-emerald);
}

/* ==============================
   INPUTS & FORMS
============================== */
.input-field {
  width: 100%;
  background-color: var(--color-white);
  border: 1px solid var(--color-brand-canvas);
  padding: 14px 16px;
  border-radius: 0;
  outline: none;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-heading);
}

.input-field:focus {
  border-color: var(--color-brand-emerald);
  box-shadow: 0 0 0 3px rgba(26, 47, 37, 0.1);
}

.input-field::placeholder {
  color: #9ca3af;
}

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231A2F25' 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 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Radio Buttons */
input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 47, 37, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

input[type="radio"]:checked {
  border-color: var(--color-brand-emerald);
  background: var(--color-brand-emerald);
  box-shadow: inset 0 0 0 3px var(--color-white);
}

/* Checkboxes */
input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 47, 37, 0.2);
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

input[type="checkbox"]:checked {
  border-color: var(--color-brand-emerald);
  background: var(--color-brand-emerald);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==============================
   PRODUCT CARDS - FIXED
============================== */
.product-card {
  position: relative !important;
  cursor: pointer;
  background: var(--color-white) !important;
  transition: all var(--transition-base);
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.product-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(26, 47, 37, 0.15) !important;
}

.product-card__image {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 3/4 !important;
  overflow: hidden !important;
  background-color: var(--color-brand-canvas) !important;
  flex-shrink: 0 !important;
}

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

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

.product-card__info {
  padding: 16px 0;
  flex: 1;
}

.product-card__category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-brand-gold);
  margin-bottom: 8px;
}

.product-card__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.product-card:hover .product-card__title {
  color: var(--color-brand-gold);
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-heading);
}

.product-card__price--original {
  font-size: 13px;
  font-weight: 400;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 8px;
}

/* Color Swatches */
.color-swatches {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.color-swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow:
    0 0 0 2px var(--color-white),
    0 0 0 4px rgba(212, 175, 55, 0.2);
}

.color-swatch:hover,
.color-swatch--active {
  transform: scale(1.15);
  box-shadow:
    0 0 0 2px var(--color-white),
    0 0 0 4px var(--color-brand-gold);
}

/* Quick View Button */
.product-card__quick-view {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(26, 47, 37, 0.8), transparent);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.product-card:hover .product-card__quick-view {
  transform: translateY(0);
}

.product-card__quick-view button {
  width: 100%;
  padding: 10px;
  background: var(--color-white);
  color: var(--color-brand-emerald);
  border: none;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-card__quick-view button:hover {
  background: var(--color-brand-gold);
}

/* ==============================
   BADGES & TAGS
============================== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0;
}

.badge--sale {
  background-color: var(--color-error);
  color: var(--color-white);
}

.badge--new {
  background-color: var(--color-brand-gold);
  color: var(--color-brand-emerald);
}

/* ==============================
   QUANTITY SELECTOR
============================== */
.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-brand-canvas);
  border-radius: 0;
  overflow: hidden;
}

.qty-selector__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-body);
}

.qty-selector__btn:hover {
  background: var(--color-brand-canvas);
  color: var(--color-brand-emerald);
}

.qty-selector__input {
  width: 50px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-brand-canvas);
  border-right: 1px solid var(--color-brand-canvas);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  -moz-appearance: textfield;
}

.qty-selector__input::-webkit-outer-spin-button,
.qty-selector__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==============================
   NAVIGATION
============================== */
.header-scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount)) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-body);
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-brand-gold);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link--active {
  color: var(--color-brand-emerald);
}

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-brand-emerald);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(100%);
  transition: transform var(--transition-base);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--color-white);
  margin: 16px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-menu.open a:nth-child(2) {
  transition-delay: 0.15s;
}
.mobile-menu.open a:nth-child(3) {
  transition-delay: 0.2s;
}
.mobile-menu.open a:nth-child(4) {
  transition-delay: 0.25s;
}
.mobile-menu.open a:nth-child(5) {
  transition-delay: 0.3s;
}

/* ==============================
   SECTION STYLES
============================== */
.section-header {
  margin-bottom: 48px;
  text-align: center;
}

.section-header__subtitle {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-brand-gold);
  margin-bottom: 12px;
}

.section-header__title {
  font-size: 40px;
  font-weight: 600;
  color: var(--color-text-heading);
}

/* Section Backgrounds */
.section--light {
  background-color: var(--color-brand-canvas);
}

.section--dark {
  background-color: var(--color-brand-emerald);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* ==============================
   TRUST BAR
============================== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(26, 47, 37, 0.08);
  flex-wrap: wrap;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-bar__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 0;
  color: var(--color-brand-gold);
}

.trust-bar__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-heading);
}

/* ==============================
   HERO SECTION
============================== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: var(--color-brand-emerald);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 55%;
}

.hero__image {
  position: relative;
  z-index: 10;
  max-width: 45%;
}

/* ==============================
   ANIMATIONS
============================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.8s ease forwards;
}

.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}
.stagger-6 {
  animation-delay: 0.6s;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.animate-scale-in {
  animation: scaleIn 0.8s ease forwards;
}

/* Scroll Animation Observer */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   UTILITY CLASSES
============================== */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.uppercase {
  text-transform: uppercase;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}

/* Color Utilities */
.text-primary {
  color: var(--color-brand-emerald);
}
.text-secondary {
  color: var(--color-text-body);
}
.text-accent {
  color: var(--color-brand-gold);
}
.text-white {
  color: var(--color-white);
}
.text-error {
  color: var(--color-error);
}
.text-success {
  color: var(--color-success);
}

/* Background Utilities */
.bg-primary {
  background-color: var(--color-brand-emerald);
}
.bg-white {
  background-color: var(--color-white);
}
.bg-surface {
  background-color: var(--color-brand-canvas);
}
.bg-accent {
  background-color: var(--color-brand-gold);
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero__content,
  .hero__image {
    max-width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 80px 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  .container {
    padding: 0 16px;
  }

  .section-header__title {
    font-size: 28px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 12px;
  }

  .grid-products {
    gap: 16px;
  }

  .trust-bar {
    gap: 24px;
  }

  .trust-bar__item {
    flex: 1 1 calc(50% - 12px);
    justify-content: center;
  }
}

/* Mobile Scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==============================
   FOOTER STYLES
============================== */
.footer {
  background: var(--color-brand-emerald);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--color-brand-gold);
}

.footer h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.footer input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.footer input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer input:focus {
  border-color: var(--color-brand-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ==============================
   CART BADGE
============================== */
.cart-badge {
  transition: transform var(--transition-fast);
}

.cart-badge.bounce {
  animation: bounce 0.4s ease;
}

@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}
