/* ============================================================
   style.css  —  Safhan Collections  —  Pink & White Theme
   Single-Page Parallax Luxury Boutique
   ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Custom Properties ────────────────────────────────── */
:root {
  --pink-50:   #fff0f4;
  --pink-100:  #ffe0ea;
  --pink-200:  #ffb3c8;
  --pink-400:  #f472a0;
  --pink-500:  #ec4899;
  --pink-600:  #db2777;
  --pink-700:  #be185d;
  --rose-500:  #f43f5e;
  --white:     #ffffff;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --shadow-pink: 0 8px 32px -4px rgba(236, 72, 153, 0.28);
  --shadow-card: 0 4px 24px -2px rgba(0,0,0,0.08);
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #fff5f8;
  color: var(--slate-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Glassmorphism Header ──────────────────────────────────── */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px -4px rgba(236, 72, 153, 0.18);
}

/* ─── Hero Parallax Section ─────────────────────────────────── */
.parallax-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;  /* CSS parallax */
  min-height: 85vh;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  /* Fixed attachment causes issues on iOS — disable on mobile */
  .parallax-hero {
    background-attachment: scroll;
    min-height: 70vh;
  }
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 240, 244, 0.92) 0%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 240, 244, 0.80) 100%
  );
  z-index: 1;
}

.parallax-hero > * { position: relative; z-index: 2; }

/* ─── Parallax Banner Strip ─────────────────────────────────── */
.parallax-banner {
  position: relative;
  background-attachment: fixed;
  overflow: hidden;
}

@media (max-width: 768px) {
  .parallax-banner { background-attachment: scroll; }
}

/* ─── Product Grid ──────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

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

/* ─── Product Card ──────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid rgba(236, 72, 153, 0.12);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease,
              border-color 0.25s ease;
  cursor: pointer;
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-pink);
  border-color: rgba(236, 72, 153, 0.35);
}

.product-card:active {
  transform: translateY(-4px) scale(1.005);
}

/* ─── Card Image Wrapper ────────────────────────────────────── */
.card-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--pink-50);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

/* Badge */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--pink-600), var(--rose-500));
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.4);
  z-index: 2;
}

/* Quick View overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(219, 39, 119, 0.0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 3;
}

.product-card:hover .card-overlay {
  background: rgba(219, 39, 119, 0.08);
}

.quick-view-btn {
  background: white;
  color: var(--pink-600);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Card Body ─────────────────────────────────────────────── */
.card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.card-category {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pink-600);
}

.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 10px;
  color: var(--slate-500);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.size-tag {
  font-size: 9px;
  font-weight: 700;
  background: var(--pink-50);
  border: 1px solid var(--pink-200);
  color: var(--pink-700);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ─── Add to Cart (WhatsApp) Button ────────────────────────── */
.btn-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 99px;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.35);
  margin-top: auto;
}

.btn-cart:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.45);
}

.btn-cart svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ─── Floating WhatsApp Button ──────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 90px;
  right: 18px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 12px 18px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  z-index: 45;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: calc(100vw - 36px);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 80px;
    right: 14px;
    padding: 10px 14px;
    font-size: 11px;
  }
}

/* ─── Mobile Bottom Navigation ──────────────────────────────── */
.mobile-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1.5px solid rgba(236, 72, 153, 0.15);
  z-index: 44;
  padding: 0 8px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.mobile-bottom-nav a:hover { background: var(--pink-50); }

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none; }
}

/* ─── Product Modal ─────────────────────────────────────────── */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Scroll Reveal Animations ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Animated Gradient Text ────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient-text {
  background: linear-gradient(270deg, var(--pink-600), var(--rose-500), #a855f7, var(--pink-500));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 5s ease infinite;
}

/* ─── Shimmer Loading Skeleton ──────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ─── Pulse dot animation ───────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.35); opacity: 0.7; }
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.4s ease infinite;
}

/* ─── Utility ───────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}
