@import url('https://fonts.googleapis.com/css2?family=Young+Serif&family=Mulish:wght@300;400;500;600;700&family=Pinyon+Script&display=swap');

:root {
    /* Color Palette — Committed Forest & Rust Strategy */
    --bg: #FFFFFF;
    --bg-card: #F6F8F6;
    --accent: #224830;
    --accent-light: #E7ECE8;
    --text-dark: #121512;
    --text-mid: #1A1F1A;
    --text-light: #4A524A;
    --border: #D1DDD3;
    --success: #C85A32; /* Terracotta Rust */
    --success-light: #F9ECE8;
    --radius: 12px;
    --shadow-soft: 0 4px 20px rgba(34, 72, 48, 0.06);
    --shadow-hover: 0 12px 32px rgba(34, 72, 48, 0.12);
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text-mid);
    font-family: 'Mulish', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 0;
    min-height: 100vh;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-family: 'Young Serif', serif;
    font-weight: 400;
    line-height: 1.3;
}

.font-playfair, .font-dm {
    font-family: 'Young Serif', serif;
}

.font-roboto, .font-inter {
    font-family: 'Mulish', sans-serif;
}

.font-dancing {
    font-family: 'Pinyon Script', cursive;
    font-size: 1.8rem;
}

.text-accent {
    color: var(--accent);
}

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

/* Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
    background-color: var(--bg);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background-color: var(--accent-light);
    padding: 6px;
    border-radius: var(--radius);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--accent);
    line-height: 0.8;
}

.brand-subtitle {
    font-family: 'Young Serif', serif;
    font-size: 0.85rem;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    color: var(--accent);
    margin-bottom: 16px;
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 28px;
    text-wrap: pretty;
}

.hero-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Brand Story Section */
.brand-story {
    background-color: var(--bg-card);
    padding: 60px 40px;
    border-radius: var(--radius);
    margin-bottom: 60px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .brand-story {
        grid-template-columns: 1.2fr 1fr;
    }
}

.story-content h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.story-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
    text-wrap: pretty;
}

.story-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
}

.story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Catalog Filter Bar */
.catalog-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    .catalog-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.catalog-title {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.search-wrap {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Mulish', sans-serif;
    font-size: 0.95rem;
    background-color: var(--bg);
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 0.95rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.product-card-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--bg-card);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.04);
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-name {
    font-family: 'Young Serif', serif;
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-card-price {
    font-family: 'Mulish', sans-serif;
    font-size: 0.95rem;
    color: var(--success);
    font-weight: 700;
    margin-top: auto;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 24px;
    margin-bottom: 60px;
}

.product-layout > * {
    min-width: 0; /* Fixes grid track overflow with carousels */
}

@media (min-width: 768px) {
    .product-layout {
        grid-template-columns: 1.1fr 1fr;
        gap: 60px;
        align-items: start;
    }
}

/* Image Carousel */
.carousel-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--border);
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    min-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

#hero-container .hero-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.carousel-btn:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Detail Info */
.product-info-panel {
    display: flex;
    flex-direction: column;
}

.product-title-wrap {
    margin-bottom: 24px;
}

.product-detail-title {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.product-detail-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.variant-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.variant-chip {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    color: var(--text-mid);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.variant-chip.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Info Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card h2, .card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

/* Stepper Component */
.stepper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.stepper-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--accent);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.stepper-btn:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.stepper-val {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
    min-width: 32px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius);
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.btn-primary {
    background-color: var(--success);
    color: white;
}

.btn-primary:hover {
    background-color: #b54924; /* Darkened rust */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 90, 50, 0.2);
}

.btn-secondary {
    background-color: var(--bg);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
}

/* Cart Page - Split Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .cart-layout {
        grid-template-columns: 1.3fr 1fr;
        gap: 60px;
        align-items: start;
    }
}

/* Cart Rows */
.cart-items-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 24px;
    background-color: var(--bg);
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--bg-card);
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-family: 'Young Serif', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.cart-item-price {
    font-size: 0.95rem;
    color: var(--success);
    font-weight: 700;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.mini-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.mini-stepper-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--accent);
    background: var(--bg);
    transition: background 0.15s;
    user-select: none;
}

.mini-stepper-btn:hover {
    background-color: var(--accent-light);
}

.mini-stepper-val {
    min-width: 28px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
}

.remove-btn {
    font-size: 0.8rem;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}

.remove-btn:hover {
    color: #c0392b;
}

/* Order Summary */
.cart-summary {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.cart-summary-row.total-row {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px dashed var(--border);
    color: var(--text-dark);
}

.total-row .cart-total-label {
    font-family: 'Young Serif', serif;
    font-size: 1.15rem;
}

.total-row .cart-total-value {
    font-family: 'Mulish', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success);
}

/* Delivery Option Toggles */
.delivery-toggle {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    margin-bottom: 20px;
    gap: 6px;
}

.delivery-toggle-btn {
    flex: 1;
    padding: 12px 8px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.delivery-toggle-btn.active {
    background-color: var(--bg);
    color: var(--accent);
    box-shadow: var(--shadow-soft);
}

.delivery-banner {
    background-color: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Forms */
.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg);
    font-family: 'Mulish', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Recipe Steps */
.step-card {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: flex-start;
}

.step-num {
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Floating Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    cursor: pointer;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cart-bar.visible {
    transform: translateY(0);
}

.cart-bar-badge {
    background-color: var(--success);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
}

.cart-bar-right {
    background-color: var(--bg);
    color: var(--accent);
    border-radius: 20px;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* General Layouts */
.back-link {
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 10px 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background-color: var(--accent-light);
    color: var(--accent);
}

hr.divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

/* Site Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 48px 24px;
    background-color: var(--bg-card);
    color: var(--text-light);
    border-radius: var(--radius);
}

@media (min-width: 768px) {
    .site-footer {
        padding: 48px 48px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-brand h4 {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-col h5 {
    font-family: 'Young Serif', serif;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-col a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loading Shimmer */
.skeleton-img {
    background: linear-gradient(90deg, #f0f4f0 25%, #e1e9e1 50%, #f0f4f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    background-color: var(--accent-light);
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Added-to-Cart Feedback overlay */
.added-feedback {
    background: var(--success);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(200,90,50,0.3);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Stock status tags */
.stock-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    margin-top: 8px;
}

.stock-badge.low-stock {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.stock-badge.out-of-stock {
    background-color: #FDF2F2;
    color: #9C1C1C;
    border: 1px solid #F8B4B4;
}

/* Utilities */
.visible {
    display: flex !important;
}

.hidden {
    display: none !important;
}

.animate-pulse {
    animation: pulse 0.3s ease-in-out;
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}