:root {
    --bg-color: #FDF8ED; /* Warmer cream background */
    --text-color: #1A1A1A;
    --accent-color: #C1A37F;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.03); /* Softer shadow for cream background */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --koi-orange: #FF7043; /* Koi fish accent color */
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
}

.loader-content {
    text-align: center;
}

.koi-symbol {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.progress-bar {
    width: 60px;
    height: 2px;
    background: var(--text-color);
    margin: 0 auto;
    transform-origin: left;
    animation: loading 0.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes loading {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(1); transform-origin: left; }
    51% { transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.cart-trigger {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--text-color);
    color: var(--bg-color);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.cart-bounce {
    animation: cartBounce 0.4s ease;
}

/* Hero */
.hero {
    height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transform: scale(1.1);
    transition: transform 10s ease;
}

.hero:hover .hero-img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(253, 248, 237, 0.4), rgba(253, 248, 237, 1));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-logo {
    max-width: 200px;
    margin-bottom: 2rem;
    opacity: 0.95;
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.15));
    transition: transform 0.5s ease;
}

.hero-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

@media (max-width: 768px) {
    .hero-logo {
        max-width: 140px;
    }
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* How it Works */
.how-it-works {
    background-color: var(--bg-color);
    padding: 60px 1.5rem;
    position: relative;
    overflow: hidden;
}

.how-it-works-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.how-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 3rem;
    font-weight: 500;
    opacity: 0.9;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    width: 100%;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--koi-orange);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.step-number::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1px;
    background: var(--koi-orange);
    opacity: 0.3;
}

.step-item h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.step-item p {
    font-size: 0.9rem;
    opacity: 0.7;
    max-width: 250px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .how-it-works {
        padding: 50px 1.5rem;
    }
    
    .how-it-works-container {
        padding: 0;
    }

    .steps-grid {
        display: flex;
        flex-direction: column;
        gap: 4rem;
        padding: 0;
    }

    .step-item {
        min-width: unset;
        width: 100%;
    }

    .step-number {
        font-size: 2rem;
    }

    .how-title {
        font-size: 1.5rem;
        margin-bottom: 2.5rem;
    }
}

/* Category Nav */
.category-nav {
    position: sticky;
    top: 60px;
    background: var(--bg-color);
    z-index: 90;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 0;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 1.5rem;
    gap: 1.5rem;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.4;
    transition: var(--transition);
}

.cat-link.active {
    opacity: 1;
    color: var(--accent-color);
}

/* Catalog */
.catalogo {
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.category-section {
    margin-bottom: 4rem;
    position: relative;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 120%;
    max-width: 600px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
    filter: grayscale(1);
}

.asym-koi {
    position: absolute;
    width: 400px;
    opacity: 0.04;
    pointer-events: none;
    z-index: -1;
    filter: grayscale(1);
}

.asym-koi-left {
    left: -150px;
    top: 10%;
    transform: rotate(-15deg);
}

.asym-koi-right {
    right: -150px;
    top: 30%;
    transform: rotate(165deg) scaleY(-1);
}

.category-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--text-color);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.product-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.8rem;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: rgba(193, 163, 127, 0.1);
}

.product-info h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.variants {
    margin-top: auto;
}

.variant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.variant-info {
    display: flex;
    flex-direction: column;
}

.variant-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.variant-price {
    font-size: 0.85rem;
    opacity: 0.7;
}

.add-btn {
    background: none;
    border: 1px solid var(--text-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.add-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.add-btn:active {
    transform: scale(0.9);
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    height: auto;
    background: var(--bg-color);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
}

@media (min-width: 768px) {
    .cart-drawer {
        width: 450px;
        left: calc(50% - 225px);
    }
}

.cart-drawer.open {
    transform: translateY(0);
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Handle for bottom sheet */
.cart-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.empty-cart-container {
    margin: auto;
    text-align: center;
    padding: 2rem;
}

.empty-cart-img {
    max-width: 150px;
    opacity: 0.25;
    margin-bottom: 1.5rem;
    mix-blend-mode: screen;
}

.empty-cart-msg {
    font-size: 0.9rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.item-details h5 {
    font-weight: 600;
    font-size: 0.95rem;
}

.item-details span {
    font-size: 0.8rem;
    opacity: 0.6;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.qty-btn:hover { opacity: 1; }

.delete-item-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: 0.2s;
    margin-left: 0.5rem;
}

.delete-item-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cart-footer {
    padding: 2rem 1.5rem;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1.2rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 4rem 1.5rem;
    text-align: center;
}

.footer-logo {
    max-width: 60px;
    margin-bottom: 1rem;
    filter: invert(1);
    opacity: 0.8;
}

.logo-footer {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-btn {
    color: var(--bg-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-btn:hover {
    transform: translateY(-5px);
    color: var(--accent-color);
}

.footer-tagline {
    opacity: 0.5;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-credits {
    font-size: 0.75rem;
    color: rgba(253, 248, 237, 0.6);
    letter-spacing: 1px;
}

.agency-link {
    color: var(--bg-color); /* #FDF8ED high contrast */
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.agency-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

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

/* Specific reveal for side Koi */
.asym-koi.reveal-on-scroll {
    transform: translateX(var(--koi-offset, -30px)) rotate(var(--koi-rot, -10deg));
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.asym-koi-left { --koi-offset: -50px; --koi-rot: -15deg; }
.asym-koi-right { --koi-offset: 50px; --koi-rot: 175deg; }

.asym-koi-color {
    opacity: 0.1 !important;
    filter: none !important; /* Remove grayscale for the orange one */
    mix-blend-mode: screen;
}

.asym-koi.reveal-visible {
    opacity: 0.04;
    transform: translateX(0) rotate(var(--koi-final-rot, -15deg));
}

.asym-koi-right.reveal-visible {
    transform: translateX(0) rotate(165deg) scaleY(-1);
}

/* Stagger delays (can also be set via JS) */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* Existing reveal refactoring */
.reveal, .reveal-delay {
    display: none; /* We are moving to the new system */
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 85px; /* Below the header */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: #1A1A1A;
    color: #FFFFFF;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: toastInTop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 3px solid var(--accent-color);
    pointer-events: auto;
}

.toast.fade-out {
    animation: toastOutTop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastInTop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOutTop {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .toast-container {
        top: 75px;
    }
}
