/**
 * HerbalOnline - Premium UI/UX Styles
 * Pakistani Herbal Supplements E-commerce
 * Conversion-focused, modern ecommerce design
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --herbal-green: #2D5A27;
  --herbal-green-light: #3D7A35;
  --herbal-green-dark: #1E3D1A;
  --herbal-beige: #F5F0E8;
  --herbal-cream: #FAF8F5;
  --section-spacing: 5rem;
  --section-spacing-lg: 7rem;
  --container-max: 1280px;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 3px rgba(45, 90, 39, 0.06);
  --shadow-card-hover: 0 20px 40px -15px rgba(45, 90, 39, 0.12), 0 8px 16px -8px rgba(0, 0, 0, 0.08);
  --radius-card: 1rem;
  --radius-btn: 0.75rem;
}

/* ===== SMOOTH SCROLLING & BASE ===== */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ===== STICKY HEADER - Premium feel ===== */
.header-sticky {
  transition: box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}

.header-sticky.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ===== TRUST BAR ===== */
.trust-bar {
  background: linear-gradient(90deg, var(--herbal-green-dark), var(--herbal-green));
  color: rgba(255, 255, 255, 0.95);
}

/* ===== HERO - Premium entrance ===== */
.hero-section h1 {
  animation: heroFadeUp 0.9s ease-out forwards;
}

.hero-section .hero-badge {
  animation: heroFadeUp 0.8s ease-out forwards;
}

.hero-section p {
  animation: heroFadeUp 0.9s ease-out 0.12s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-section .btn-primary {
  animation: heroFadeUp 0.9s ease-out 0.24s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-section .hero-float-badge {
  animation: heroFadeUp 0.9s ease-out 0.35s forwards, heroFloat 6s ease-in-out infinite;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-section .hero-float-delay {
  animation-delay: 0.4s, 1s;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Hero organic shape float */
.animate-float {
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, -15px) rotate(2deg); }
  66% { transform: translate(-5px, 10px) rotate(-1deg); }
}

/* Hero visual ring subtle pulse */
.hero-visual-ring {
  animation: heroRingPulse 4s ease-in-out infinite;
}

@keyframes heroRingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel-viewport {
  -webkit-overflow-scrolling: touch;
}

.hero-carousel-track {
  will-change: transform;
}

.hero-carousel-slide {
  flex: 0 0 auto;
  box-sizing: border-box;
}

.hero-carousel-card {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 90, 39, 0.08);
  overflow: hidden;
  background: white;
}

.hero-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -12px rgba(45, 90, 39, 0.15);
}

.hero-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(45, 90, 39, 0.3);
  transition: background 0.3s, transform 0.3s;
}

.hero-carousel-dot.active {
  background: var(--herbal-green);
  transform: scale(1.25);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== PRODUCT CARD - Premium ecommerce ===== */
.product-card {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 90, 39, 0.08);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(45, 90, 39, 0.15);
}

.product-card .product-image-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fafaf9 0%, var(--herbal-cream) 100%);
}

.product-card .product-image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.06);
}

/* Product card badges */
.product-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.product-badge--natural {
  background: rgba(45, 90, 39, 0.92);
  color: white;
}

.product-badge--bestseller {
  background: rgba(180, 83, 9, 0.95);
  color: white;
}

.product-badge--pk {
  background: rgba(255, 255, 255, 0.95);
  color: var(--herbal-green);
  border: 1px solid rgba(45, 90, 39, 0.2);
}

/* Quick add button - appears on hover */
.product-card .quick-add {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  z-index: 3;
}

.product-card:hover .quick-add {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== BENEFIT CARDS ===== */
.benefit-card {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 90, 39, 0.06);
}

.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(45, 90, 39, 0.1);
}

/* ===== CATEGORY CARDS ===== */
.category-card {
  transition: all var(--transition-smooth);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 90, 39, 0.06);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(45, 90, 39, 0.2);
}

.category-card .category-icon-wrap {
  transition: transform var(--transition-smooth), background-color var(--transition-smooth);
}

.category-card:hover .category-icon-wrap {
  transform: scale(1.08);
  background-color: rgba(45, 90, 39, 0.12);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-smooth);
  border: 1px solid rgba(45, 90, 39, 0.06);
  border-radius: var(--radius-card);
}

.testimonial-card:hover {
  box-shadow: 0 16px 32px -12px rgba(45, 90, 39, 0.1);
  transform: translateY(-2px);
  border-color: rgba(45, 90, 39, 0.1);
}

/* ===== BLOG CARDS ===== */
.blog-card {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border-radius: var(--radius-card);
  border: 1px solid rgba(45, 90, 39, 0.06);
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ===== FOOTER PROFESSIONAL ===== */
.footer-professional .footer-top {
  background: rgba(0, 0, 0, 0.15);
}

.footer-professional .footer-heading {
  letter-spacing: 0.05em;
}

.footer-professional .footer-bottom {
  background: rgba(0, 0, 0, 0.2);
}

/* Product description - Urdu RTL */
.product-description-body {
  direction: rtl;
  font-family: 'Noto Nastaliq Urdu', 'Urdu Typesetting', serif;
  font-size: 1.125rem;
  line-height: 1.85;
}

/* ===== BUTTONS - Conversion focused ===== */
.btn-primary {
  transition: all var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(45, 90, 39, 0.35);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline-green {
  transition: all var(--transition-smooth);
  border: 2px solid var(--herbal-green);
}

.btn-outline-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(45, 90, 39, 0.25);
}

/* ===== CART POPUP - Premium slide-in ===== */
.cart-popup {
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
  border-radius: 1rem 0 0 1rem;
}

.cart-popup.open {
  transform: translateX(0);
}

.cart-overlay {
  transition: opacity 0.35s ease;
  backdrop-filter: blur(4px);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cart item hover */
.cart-item-row {
  transition: background-color 0.2s ease;
}

.cart-item-row:hover {
  background-color: rgba(245, 240, 232, 0.6);
}

/* ===== FORM INPUTS ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--herbal-green);
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.12);
}

/* ===== SECTION SPACING ===== */
.section-spacing {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

.section-spacing-lg {
  padding-top: var(--section-spacing-lg);
  padding-bottom: var(--section-spacing-lg);
}

/* ===== CONVERSION BANNER ===== */
.conversion-banner {
  background: linear-gradient(135deg, var(--herbal-green) 0%, var(--herbal-green-light) 100%);
  box-shadow: 0 4px 24px rgba(45, 90, 39, 0.2);
}

/* ===== STICKY ADD TO CART (product detail) ===== */
.sticky-cta-bar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sticky-cta-bar.visible {
  transform: translateY(0);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

/* ===== RATING STARS ===== */
.star-rating {
  color: #d4a017;
  letter-spacing: 0.1em;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--herbal-beige);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--herbal-green);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--herbal-green-dark);
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NAV LINK UNDERLINE ===== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--herbal-green);
  transition: width var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== FULL-WIDTH BADGE (100vw) ===== */
.badge-full-width {
  width: 100vw;
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* ===== ASPECT RATIO ===== */
.aspect-product {
  aspect-ratio: 1 / 1;
}

/* ===== IMAGE SHIMMER (loading) ===== */
.product-image-wrapper {
  background: linear-gradient(90deg, #f0efec 25%, #e8e6e1 50%, #f0efec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== PRINT ===== */
@media print {
  .header-sticky,
  #cart-popup,
  #cart-overlay,
  .trust-bar,
  .sticky-cta-bar,
  button[type="button"] {
    display: none !important;
  }
}
