/* Sri Atchayam Store - Figma Design System */
:root {
  --sa-cream: #FFF5F8;
  --sa-brown: #c03664;
  --sa-brown-dark: #3a1a28;
  --sa-brown-deeper: #230e18;
  --sa-brown-text: #5e3347;
  --sa-peach: #f1c6d4;
  --sa-peach-border: #dda8b8;
  --sa-white: #FFFFFF;
  --sa-whatsapp: #25D366;
}
/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital,wght@0,400;1,400&family=Work+Sans:wght@400;500;600;700&display=swap');

.font-dm-serif { font-family: 'DM Serif Display', Georgia, serif; }
.font-work-sans { font-family: 'Work Sans', sans-serif; }

/* Announcement Bar */
.sa-announce-bar {
  background: var(--sa-brown);
  color: white;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
}

/* Main Header */
.sa-header {
  background: var(--sa-white);
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sa-logo-circle {
  width: 40px; height: 40px;
  background: var(--sa-brown);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-weight: 700;
  font-size: 18px;
}

.sa-logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--sa-brown);
  letter-spacing: -0.02em;
}

.sa-nav-link {
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--sa-brown-deeper);
  text-decoration: none;
  padding: 4px 0;
}

.sa-nav-link.active {
  color: var(--sa-brown);
  border-bottom: 2px solid var(--sa-brown);
  padding-bottom: 4px;
}

/* Category Cards */
.sa-category-card {
  background: var(--sa-white);
  border: 1px solid var(--sa-peach-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sa-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(114,51,0,0.12);
}

/* Product Cards */
.sa-product-card {
  background: var(--sa-white);
  border: 1px solid var(--sa-peach-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sa-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(114,51,0,0.12);
}
.sa-product-card .card-image-area {
  background: #F1DFD6;
  position: relative;
  height: 284px;
  overflow: hidden;
}
.sa-product-card .card-image-area img {
  width: 100%; height: 100%; object-fit: cover;
}
.sa-product-card .sale-badge {
  position: absolute; top: 12px; left: 12px;
  background: #BA1A1A; color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 2px;
}
.sa-product-card .wishlist-btn {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: white;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* CTA Button */
.sa-btn-primary {
  background: var(--sa-brown);
  color: white;
  border-radius: 9999px;
  padding: 16px 32px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
  transition: opacity 0.2s;
}
.sa-btn-primary:hover { opacity: 0.9; }

/* WhatsApp FAB */
.sa-whatsapp-fab {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 56px; height: 56px;
  background: var(--sa-whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0px 4px 6px -4px rgba(0,0,0,0.1), 0px 10px 15px -3px rgba(0,0,0,0.1);
  z-index: 100;
  text-decoration: none;
}

/* Footer */
.sa-footer {
  background: var(--sa-peach);
  border-top: 8px solid var(--sa-brown);
  padding: 64px 0 32px;
}
.sa-footer-dark {
  background: var(--sa-brown-dark);
  padding: 24px 0;
  text-align: center;
  color: #FFEDE5;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Section heading with left accent */
.sa-section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sa-section-heading .accent-bar {
  width: 6px; height: 32px;
  background: var(--sa-brown);
  border-radius: 9999px;
}
.sa-section-heading h2 {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 32px;
  line-height: 41.6px;
  color: var(--sa-brown);
}

/* Checkout progress */
.sa-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sa-progress-step .step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--sa-brown);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.sa-progress-step.active .step-circle {
  background: var(--sa-brown);
  color: white;
}
.sa-progress-step .step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--sa-brown-text);
}
@keyframes heritage-wiggle {
    0%   { transform: rotate(-2deg); }
    25%  { transform: rotate(-1deg) translateX(-2px); }
    50%  { transform: rotate(-3deg) translateX(2px); }
    75%  { transform: rotate(-1.5deg) translateX(-1px); }
    100% { transform: rotate(-2deg); }
}

.hero-image-card {
    transform: rotate(-2deg);
    transform-origin: center;
    transition: transform 0.3s ease;
}
.hero-image-card:hover {
    animation: heritage-wiggle 0.5s ease-in-out;
}

/* ═══════════════════════════════════════════════════
   SCROLL REVEAL ANIMATION SYSTEM
   ═══════════════════════════════════════════════════ */

/* Base — all animated elements start invisible */
.reveal,
.reveal-left,
.reveal-right,
.reveal-zoom,
.reveal-fade {
    opacity: 0;
    will-change: opacity, transform;
    transition:
        opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Starting transforms per variant */
.reveal        { transform: translateY(30px); }
.reveal-left   { transform: translateX(-44px); }
.reveal-right  { transform: translateX(44px); }
.reveal-zoom   { transform: scale(0.91); }
.reveal-fade   { transform: none; }

/* Active state — element is in viewport */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-zoom.active,
.reveal-fade.active {
    opacity: 1;
    transform: none !important;
}

/* Stagger delay helpers (add data-delay="1".."8" to children) */
[data-delay="1"] { transition-delay: 0.07s; }
[data-delay="2"] { transition-delay: 0.14s; }
[data-delay="3"] { transition-delay: 0.21s; }
[data-delay="4"] { transition-delay: 0.28s; }
[data-delay="5"] { transition-delay: 0.35s; }
[data-delay="6"] { transition-delay: 0.42s; }
[data-delay="7"] { transition-delay: 0.49s; }
[data-delay="8"] { transition-delay: 0.56s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-zoom, .reveal-fade {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════
   MOBILE SPACING UTILITIES
   ═══════════════════════════════════════════════════ */
.section-pad    { padding-top: 2rem;   padding-bottom: 2rem;   }
@media (min-width: 768px)  { .section-pad { padding-top: 3.5rem; padding-bottom: 3.5rem; } }
@media (min-width: 1024px) { .section-pad { padding-top: 5rem;   padding-bottom: 5rem;   } }

.page-header-pad { padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .page-header-pad { padding-top: 3rem; padding-bottom: 3rem; } }

/* Touch-friendly min heights */
.touch-target   { min-height: 44px; min-width: 44px; }
.touch-target-l { min-height: 48px; }

/* ── WhatsApp floating button ──────────────────── */

/* Pulse ring animation — green glow that breathes around the button */
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(37, 211, 102, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(37, 211, 102, 0);    }
}

/* Label badge blink — fades in and out to draw attention */
@keyframes wa-blink {
    0%, 100% { opacity: 1;    transform: translateX(0); }
    50%       { opacity: 0.6; transform: translateX(-3px); }
}

.wa-float {
    position: fixed;
    top: 120px;
    right: 24px;
    z-index: 45;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    animation: wa-pulse 2.2s ease-out infinite;
}

.wa-float:hover {
    transform: scale(1.10) translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.60);
    animation: none; /* stop pulse on hover — clean UX */
}

/* Blinking label that floats to the left of the button */
.wa-float__label {
    position: absolute;
    right: 62px; /* sit just left of the button */
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #fff;
    color: #075e54;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 13px;
    border-radius: 20px;
    border: 1px solid rgba(37, 211, 102, 0.25);
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    animation: wa-blink 2.4s ease-in-out infinite;
    pointer-events: none; /* click goes to the <a> tag */
}

/* Small arrow pointing right toward the button */
.wa-float__label::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #fff;
}

@media (max-width: 639px) {
    .sa-product-card .card-image-area { height: 180px; }
    .announce-bar { padding-top: 0.4rem; padding-bottom: 0.4rem; font-size: 0.75rem; }
    /* WhatsApp FAB at top-right below mobile navbar */
    .wa-float {
        top: 76px !important;
        right: 12px !important;
        width: 44px;
        height: 44px;
    }
    .wa-float svg {
        width: 22px;
        height: 22px;
    }
    .wa-float__label {
        right: 50px;
        font-size: 0.65rem;
        padding: 4px 9px;
    }
}

/* ═══════════════════════════════════════════════════
   BRAND TITLE RESPONSIVE
   ═══════════════════════════════════════════════════ */
.brand-title {
    font-family: var(--font-serif, 'DM Serif Display', Georgia, serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--color-brand-dark, #723300);
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════
   DYNAMIC FORM INPUT UX STATES (Heritage Festive)
   When user enters a value, the field smoothly changes
   background to the design system's warm blush/cream.
   ═══════════════════════════════════════════════════ */
.ux-input {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.2s ease !important;
    background-color: #ffffff;
    border: 1.5px solid #F1DFD6;
}

/* Active typing focus state */
.ux-input:focus {
    background-color: #ffffff !important;
    border-color: var(--color-brand-dark, #c03664) !important;
    box-shadow: 0 0 0 3.5px rgba(192, 54, 100, 0.14) !important;
    outline: none !important;
}

/* Value entered state: subtle warm blush tint from design system (--color-surface-container-low) */
.ux-input:not(:placeholder-shown):not(:focus),
.ux-input.has-value:not(:focus) {
    background-color: var(--color-surface-container-low, #ffeef3) !important;
    border-color: var(--color-outline-variant, #dda8b8) !important;
    color: var(--color-on-surface, #230e18) !important;
}

/* Hover state on empty fields */
.ux-input:hover:not(:focus):placeholder-shown {
    border-color: var(--color-outline-variant, #dda8b8);
}


