/* Import Google Fonts - Sans Serif Only */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --color-bg: #FAF9F6;
    --color-primary: #395144;
    --color-text: #2C3333;
    --color-accent: #AA8B56;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

/* All headings use Sans-Serif */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Selection color */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* ===== ANIMATION KEYFRAMES ===== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Icon Spin */
@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Slide In Toast */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== ANIMATION CLASSES ===== */

/* Base state for animated elements (hidden initially) */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When element is visible */
.animate-on-scroll.is-visible {
    opacity: 1;
}

/* Fade In Up */
.fade-in-up {
    transform: translateY(40px);
}

.fade-in-up.is-visible {
    transform: translateY(0);
}

/* Fade In Down */
.fade-in-down {
    transform: translateY(-30px);
}

.fade-in-down.is-visible {
    transform: translateY(0);
}

/* Fade In Left */
.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-left.is-visible {
    transform: translateX(0);
}

/* Fade In Right */
.fade-in-right {
    transform: translateX(40px);
}

.fade-in-right.is-visible {
    transform: translateX(0);
}

/* Scale In */
.scale-in {
    transform: scale(0.9);
}

.scale-in.is-visible {
    transform: scale(1);
}

/* Stagger Animation Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

.delay-600 {
    transition-delay: 0.6s;
}

/* ===== NAVBAR ANIMATIONS ===== */

.navbar-animate {
    animation: fadeInDown 0.6s ease-out;
}

/* Nav link hover effects */
.nav-link-animate {
    position: relative;
    overflow: hidden;
}

.nav-link-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link-animate:hover::after {
    width: 100%;
}

/* ===== BUTTON ANIMATIONS ===== */

.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animate:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(57, 81, 68, 0.3);
}

.btn-animate:active {
    transform: translateY(-1px);
}

/* ===== CARD ANIMATIONS ===== */

.card-animate {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Product Card Image Zoom */
.card-animate .product-image img {
    transition: transform 0.5s ease;
}

.card-animate:hover .product-image img {
    transform: scale(1.1);
}

/* ===== ICON ANIMATIONS ===== */

.icon-animate {
    transition: all 0.3s ease;
}

.icon-animate:hover {
    transform: scale(1.2);
    color: var(--color-accent);
}

.icon-float {
    animation: float 3s ease-in-out infinite;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Cart icon shake on add */
.icon-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-5deg);
    }

    75% {
        transform: translateX(5px) rotate(5deg);
    }
}

/* ===== HERO SECTION ===== */

.hero-content-animate {
    will-change: transform, opacity;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-image-animate {
    will-change: transform, opacity;
    animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-image-float {
    will-change: transform;
    animation: float 6s ease-in-out infinite;
}

/* Force hardware acceleration for smoother text rendering during anim */
.hero-content-animate *,
.hero-image-animate img {
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* ===== TESTIMONIAL CARDS ===== */

.testimonial-card-animate {
    transition: all 0.4s ease;
}

.testimonial-card-animate:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
}

/* ===== FOOTER ANIMATIONS ===== */

.footer-link-animate {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link-animate:hover {
    transform: translateX(5px);
    color: var(--color-accent);
}

/* Social icon animations */
.social-icon-animate {
    transition: all 0.3s ease;
}

.social-icon-animate:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--color-accent);
}

/* ===== MOBILE MENU ANIMATIONS ===== */

.mobile-menu-animate {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 0 solid transparent;
}

.mobile-menu-animate.menu-open {
    max-height: 300px;
    opacity: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Hamburger icon animation */
.hamburger-animate {
    transition: transform 0.3s ease;
}

.hamburger-animate.is-active {
    transform: rotate(90deg);
}

/* ===== LOADING ANIMATION ===== */

.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ===== TOAST NOTIFICATION ===== */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-exit {
    animation: slideOut 0.3s ease forwards;
}

/* ===== SCROLL PROGRESS BAR ===== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===== RESPONSIVE ANIMATIONS ===== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Optimize animations for mobile */
@media (max-width: 768px) {
    .animate-on-scroll {
        transition-duration: 0.4s;
    }

    .hero-image-float {
        animation: none;
    }

    .card-animate:hover {
        transform: translateY(-4px);
    }
}

/* ===== UTILITIES ===== */

.btn-primary {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 81, 68, 0.2);
}

/* Fix for Safari/Chrome border-radius clipping bug during transforms */
.fix-clip {
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}