/* ══════════════════════════════════════
   FloriMar — Custom Styles
   Complements Tailwind CDN
   ══════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
    --sage-50: #f6f7f4;
    --sage-100: #e8eae2;
    --sage-200: #d2d6c8;
    --sage-500: #768163;
    --sage-600: #5e674e;
    --sage-700: #4a5040;
    --sage-800: #3d4235;
    --blush-50: #fdf5f3;
    --blush-300: #f4b5a8;
    --blush-400: #eb8975;
    --blush-500: #e16a4e;
    --cream-50: #fefcf7;
    --cream-100: #fdf6ea;
    --cream-200: #faecd2;
    --gold: #c9a96e;
    --gold-light: #dfc292;
}

/* ── Base ── */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #3d4235;
    background-color: var(--cream-50);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .font-serif {
    font-family: 'Playfair Display', serif;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

/* Staggered animations */
.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; }

/* ── Hero Section ── */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(254,252,247,0.92) 0%, rgba(253,245,243,0.85) 40%, rgba(0,0,0,0) 70%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease;
}

.hero-section:hover .hero-bg {
    transform: scale(1.03);
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ── Product Cards ── */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.product-card .card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .card-image img {
    transform: scale(1.08);
}

.product-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.product-card:hover .card-overlay {
    opacity: 1;
}

/* ── Category Cards ── */
.category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card .category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

/* ── Product Gallery ── */
.gallery-main {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-main:hover img {
    transform: scale(1.5);
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.6;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--sage-600);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Zoom Lens ── */
.zoom-lens {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 150px;
    height: 150px;
    pointer-events: none;
    display: none;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.3);
}

.gallery-main:hover .zoom-lens {
    display: block;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ── Toast Notifications ── */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    max-width: 380px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.toast-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* ── Order Timeline ── */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--sage-200);
}

.timeline-step {
    position: relative;
    padding-bottom: 24px;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sage-200);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--sage-200);
}

.timeline-step.completed::before {
    background: var(--sage-600);
    box-shadow: 0 0 0 2px var(--sage-600);
}

.timeline-step.current::before {
    background: var(--blush-400);
    box-shadow: 0 0 0 2px var(--blush-400), 0 0 0 6px rgba(235,137,117,0.2);
    animation: float 2s ease-in-out infinite;
}

/* ── Progress Bar ── */
.order-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
}

.order-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sage-200);
}

.order-progress .progress-fill {
    position: absolute;
    top: 15px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sage-600), var(--blush-400));
    transition: width 0.6s ease;
}

.progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.progress-step .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--sage-200);
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 12px;
}

.progress-step.completed .step-dot {
    background: var(--sage-600);
    border-color: var(--sage-600);
    color: white;
}

.progress-step.current .step-dot {
    background: var(--blush-400);
    border-color: var(--blush-400);
    color: white;
    box-shadow: 0 0 0 4px rgba(235,137,117,0.2);
}

/* ── Mobile Menu ── */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9990;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ── Rating Stars ── */
.stars {
    color: #fbbf24;
    letter-spacing: 2px;
}

.stars-input label {
    cursor: pointer;
    font-size: 24px;
    color: #d1d5db;
    transition: color 0.2s;
}

.stars-input input:checked ~ label,
.stars-input label:hover,
.stars-input label:hover ~ label {
    color: #fbbf24;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream-50);
}

::-webkit-scrollbar-thumb {
    background: var(--sage-300, #b3baa3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sage-500);
}

/* ── Glass Effect ── */
.glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ── Gold accent ── */
.text-gold { color: var(--gold); }
.border-gold { border-color: var(--gold); }
.bg-gold { background-color: var(--gold); }

/* ── Placeholder images ── */
.placeholder-img {
    background: linear-gradient(135deg, var(--sage-100), var(--blush-50), var(--cream-200));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sage-500);
    font-size: 14px;
}

/* ── Price Strike ── */
.price-compare {
    text-decoration: line-through;
    opacity: 0.5;
}

/* ── Loading Skeleton ── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ── Responsive Tweaks ── */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-section::before {
        background: linear-gradient(180deg, rgba(254,252,247,0.95) 0%, rgba(254,252,247,0.8) 60%, rgba(0,0,0,0) 100%);
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
}
