/* ============================================================
   VIRGO BOUTIQUE - Custom Styles
   Luxury discount fashion e-commerce
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --color-midnight: #0f0f1a;
  --color-navy: #1a1a2e;
  --color-gold: #c8a96e;
  --color-gold-light: #d4b87a;
  --color-gold-pale: #f5eed9;
  --color-rose: #b94a4a;
  --color-cream: #faf8f5;
  --color-warm-white: #fefdfb;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ---- Smooth Scroll ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Selection Color ---- */
::selection {
  background-color: var(--color-gold);
  color: white;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-light);
}

/* ============================================================
   Header
   ============================================================ */

#main-header {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.35s ease,
              box-shadow 0.35s ease,
              backdrop-filter 0.35s ease;
}

#main-header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#main-header.header-hidden {
  transform: translateY(-100%);
}

/* ============================================================
   Hero Section
   ============================================================ */

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero-parallax {
  position: absolute;
  inset: -20% 0;
  z-index: 0;
}

.hero-gradient-overlay {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 26, 0.85) 0%,
    rgba(26, 26, 46, 0.65) 40%,
    rgba(26, 26, 46, 0.3) 100%
  );
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Animated text reveal */
.text-reveal {
  clip-path: inset(0 100% 0 0);
  animation: textReveal 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes textReveal {
  to { clip-path: inset(0 0 0 0); }
}

.text-reveal-delay-1 { animation-delay: 0.2s; }
.text-reveal-delay-2 { animation-delay: 0.4s; }
.text-reveal-delay-3 { animation-delay: 0.6s; }

/* ============================================================
   Announcement Bar
   ============================================================ */

.announcement-bar {
  background: var(--color-midnight);
  overflow: hidden;
}

.announcement-scroll {
  display: flex;
  animation: scrollAnnouncement 30s linear infinite;
  white-space: nowrap;
}

@keyframes scrollAnnouncement {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   Product Cards
   ============================================================ */

.product-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.12);
}

.product-card .product-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}

.product-card .product-image {
  transition: opacity 0.5s ease, transform 0.7s ease;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.product-card .product-image-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.7s ease;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

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

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

/* Quick actions overlay */
.product-card .quick-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.product-card:hover .quick-actions {
  transform: translateY(0);
}

/* Badge styles */
.badge {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
}

.badge-new { background: var(--color-navy); color: white; }
.badge-sale { background: var(--color-rose); color: white; }
.badge-bestseller { background: var(--color-gold); color: white; }
.badge-low-stock { background: #ef4444; color: white; }

/* ============================================================
   Category Cards
   ============================================================ */

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
}

.category-card img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card .category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(15, 15, 26, 0.7));
  transition: background 0.4s ease;
}

.category-card:hover .category-overlay {
  background: linear-gradient(transparent 20%, rgba(15, 15, 26, 0.8));
}

/* ============================================================
   Section Titles
   ============================================================ */

.section-title {
  font-family: var(--font-display);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-gold);
}

.section-title-left::after {
  left: 0;
  transform: none;
}

/* ============================================================
   Trust Badges
   ============================================================ */

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.trust-badge:hover {
  transform: translateY(-4px);
}

.trust-badge-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-gold-pale);
  color: var(--color-gold);
}

/* ============================================================
   Testimonial Card
   ============================================================ */

.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Newsletter Section
   ============================================================ */

.newsletter-section {
  background: linear-gradient(135deg, var(--color-navy) 0%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* ============================================================
   Cart Drawer
   ============================================================ */

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cart-drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: white;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.cart-drawer.open {
  transform: translateX(0);
}

/* Free delivery progress bar */
.delivery-progress {
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  overflow: hidden;
}

.delivery-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Filters
   ============================================================ */

.filter-chip {
  padding: 0.375rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.filter-chip.active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: white;
}

/* Color swatch */
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.color-swatch:hover,
.color-swatch.active {
  border-color: var(--color-navy);
  transform: scale(1.15);
}

/* ============================================================
   Product Detail Page
   ============================================================ */

.product-image-zoom {
  cursor: crosshair;
  overflow: hidden;
  border-radius: 0.75rem;
}

.product-image-zoom img {
  transition: transform 0.3s ease;
  will-change: transform;
}

.product-thumbnail {
  width: 72px;
  height: 90px;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.6;
  overflow: hidden;
  padding: 0;
  background: none;
}

.product-thumbnail:hover,
.product-thumbnail.active {
  border-color: var(--color-gold);
  opacity: 1;
}

/* Size buttons */
.size-btn {
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-btn:hover {
  border-color: var(--color-navy);
}

.size-btn.active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: white;
}

.size-btn.out-of-stock {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ============================================================
   FAQ Accordion
   ============================================================ */

.faq-item {
  border-bottom: 1px solid #f0f0f0;
}

.faq-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-navy);
  transition: color 0.2s ease;
}

.faq-trigger:hover {
  color: var(--color-gold);
}

.faq-trigger svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-trigger[aria-expanded="true"] svg {
  transform: rotate(45deg);
}

.faq-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s ease;
  padding: 0 0;
}

.faq-content.open {
  max-height: 500px;
  padding: 0 0 1.25rem;
}

/* ============================================================
   Toast Notification
   ============================================================ */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--color-navy);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.toast-show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Cookie Banner
   ============================================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 997;
  background: white;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

/* ============================================================
   Newsletter Popup
   ============================================================ */

.newsletter-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 996;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.newsletter-popup-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.newsletter-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 997;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 480px;
  width: 90%;
}

.newsletter-popup.show {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
   Page Transitions
   ============================================================ */

.page-enter {
  animation: pageEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Breadcrumb
   ============================================================ */

.breadcrumb a {
  color: #9ca3af;
  transition: color 0.2s ease;
  text-decoration: none;
}

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

/* ============================================================
   Footer
   ============================================================ */

.footer-gradient {
  background: linear-gradient(180deg, var(--color-navy) 0%, #0d0d1a 100%);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: white;
  font-weight: 600;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 169, 110, 0.35);
}

.btn-gold:hover::before {
  opacity: 1;
}

.btn-gold span {
  position: relative;
  z-index: 1;
}

.btn-dark {
  background: var(--color-navy);
  color: white;
  font-weight: 600;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-dark:hover {
  background: #16213e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 26, 46, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  font-weight: 600;
  border: 1.5px solid var(--color-navy);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--color-navy);
  color: white;
  transform: translateY(-2px);
}

/* ============================================================
   Checkout
   ============================================================ */

.checkout-step {
  position: relative;
  padding-left: 3rem;
}

.checkout-step::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
}

/* ============================================================
   About Page Timeline
   ============================================================ */

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--color-gold);
}

.timeline-item:last-child::before {
  display: none;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .cart-drawer {
    width: 100%;
    max-width: 100vw;
  }

  .product-card:hover {
    transform: none;
  }

  .product-card .quick-actions {
    transform: translateY(0);
    opacity: 1;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
  }
}

/* ============================================================
   Loading shimmer
   ============================================================ */

.shimmer {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Misc Animations
   ============================================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 169, 110, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(200, 169, 110, 0); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-gold {
  animation: pulse-gold 2s infinite;
}

/* Lazy reveal */
.lazy-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.lazy-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Price styling */
.price-was {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.875rem;
}

.price-now {
  color: var(--color-rose);
  font-weight: 700;
  font-size: 1.125rem;
}

.price-save {
  background: #fef2f2;
  color: var(--color-rose);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}

/* Quantity selector */
.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.qty-selector button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-navy);
  font-size: 1.125rem;
  transition: background 0.2s ease;
}

.qty-selector button:hover {
  background: #f9fafb;
}

.qty-selector input {
  width: 48px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1.5px solid #e5e7eb;
  border-right: 1.5px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-navy);
}

.qty-selector input:focus {
  outline: none;
}

/* ============================================================
   Star rating interactive
   ============================================================ */

.star-rating-input {
  display: flex;
  gap: 0.25rem;
  cursor: pointer;
}

.star-rating-input svg {
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating-input svg:hover {
  transform: scale(1.2);
}

/* ============================================================
   Glassmorphism cards
   ============================================================ */

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
