/* Luxury B2B Storefront: Warm Ivory & Forest Olive */
:root {
    --color-bg: #f7f6f0; /* Warm organic ivory background */
    --color-bg-card: #ffffff; /* Pure crisp white card surface */
    --color-surface: #ffffff;
    --color-terracotta: #354a26; /* Deep refined Forest Olive */
    --color-terracotta-hover: #26381a;
    --color-olive: #354a26;
    --color-olive-dark: #26381a;
    --color-sage: #e8e6dc;
    --color-peach: #e8e6dc;

    --color-text-dark: #1e241c; /* Deep rich charcoal */
    --color-text-muted: #72776c; /* Elegant muted tone */
    --color-border: #e6e3d8; /* Refined subtle divider */
    
    --font-serif: 'Cormorant Garamond', 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-dark);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
}

/* Decorative Blobs */
.bg-shape-top-right,
.bg-shape-bottom-left {
    display: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-terracotta);
    color: #ffffff;
    padding: 16px 28px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(50, 70, 33, 0.18);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Header */
.header {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 10;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 500;
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-terracotta);
    margin-top: 4px;
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-size: 15px;
    color: var(--color-text-dark);
    font-weight: 400;
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.7;
}

.header-actions {
    display: flex;
    align-items: center;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-dark);
    font-weight: 400;
}

.cart-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--color-terracotta);
    color: #ffffff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    padding: 60px 40px 100px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 58px;
    font-weight: 400;
    line-height: 1.12;
    color: var(--color-text-dark);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 36px;
    font-weight: 400;
}

.btn-terracotta {
    display: inline-block;
    background-color: var(--color-terracotta);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.2s;
}

.btn-terracotta:hover:not(:disabled) {
    background-color: var(--color-terracotta-hover);
    transform: translateY(-2px);
}

.btn-terracotta:disabled {
    background-color: #b0b5a6;
    cursor: not-allowed;
}

/* Hero Image Card */
.hero-image-col {
    display: flex;
    justify-content: flex-end;
}

.hero-card {
    background-color: var(--color-bg-card);
    border-radius: 48px;
    padding: 24px;
    padding-bottom: 36px;
    position: relative;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}

.hero-card:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 4px;
}

.hero-img-wrap {
    width: 100%;
    height: 380px;
    border-radius: 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-card);
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 8px;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(1);
    will-change: opacity, transform;
}

.hero-img-wrap img.hero-fade-out {
    opacity: 0;
    transform: scale(0.96);
}

.hero-badge {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background-color: var(--color-terracotta);
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(50, 70, 33, 0.2);
    z-index: 10;
    transition: opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1), transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.hero-badge.hero-fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
}

/* Atmosphere Section */
.atmosphere-section {
    padding: 40px 40px 80px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 40px;
}

.atmosphere-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.atmosphere-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.atmosphere-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-terracotta);
    flex-shrink: 0;
    margin-top: 2px;
}

.atmosphere-info h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 4px;
}

.atmosphere-info p {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Meta Bar */
.meta-bar {
    width: 100%;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 18px 40px;
    position: relative;
    z-index: 5;
}

.meta-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

/* Catalog Section */
.catalog-section {
    padding: 80px 40px 100px;
    max-width: 1300px;
    margin: 0 auto;
}

.catalog-header {
    margin-bottom: 50px;
}

.catalog-header h2 {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.catalog-header p {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.filter-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-pill {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-dark);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
}

.filter-pill:hover,
.filter-pill.active {
    background-color: var(--color-terracotta);
    color: #ffffff;
    border-color: var(--color-terracotta);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.product-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 20px;
    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), border-color 0.25s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07);
    border-color: #d6d1c4;
}

.product-image {
    width: 100%;
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
    background-color: #faf9f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.35;
    margin-bottom: 6px;
}

.product-packaging {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qty-input {
    width: 58px;
    height: 42px;
    padding: 0 4px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background-color: #ffffff;
    outline: none;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 40px;
    color: var(--color-text-dark);
    -moz-appearance: textfield;
    appearance: textfield;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qty-input:focus {
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 2px rgba(53, 74, 38, 0.15);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add {
    flex: 1;
    height: 42px;
    background-color: var(--color-terracotta);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add:hover {
    background-color: var(--color-terracotta-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 74, 38, 0.2);
}

/* Footer */
.footer {
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: 60px 40px 0;
    position: relative;
    z-index: 5;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-brand .logo-title {
    font-size: 36px;
}

.footer-desc {
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-text-muted);
    max-width: 380px;
}

.footer-links-group h4 {
    font-family: var(--font-serif);
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--color-text-dark);
}

.footer-links-group a {
    display: block;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links-group a:hover {
    color: var(--color-terracotta);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Side Cart Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(39, 48, 36, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active,
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-side {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.modal-overlay.active .modal-side,
.modal-overlay.open .modal-side {
    transform: translateX(0);
}

.modal-header {
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
}

.cart-items {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-info h4 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.35;
}

.cart-item-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cart-qty-ctrl {
    display: inline-flex;
    align-items: center;
    background-color: #f7f6f1;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
}

.btn-qty-minus,
.btn-qty-plus {
    width: 28px;
    height: 100%;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
    user-select: none;
}

.btn-qty-minus:hover,
.btn-qty-plus:hover {
    background-color: rgba(53, 74, 38, 0.12);
    color: var(--color-terracotta);
}

.cart-qty-val {
    min-width: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-dark);
    padding: 0 4px;
    user-select: none;
}

.btn-remove-item {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #a3483f;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-remove-item:hover {
    background-color: #faeceb;
    border-color: #f5c6cb;
    color: #c82333;
}

.empty-cart-msg {
    text-align: center;
    color: var(--color-text-muted);
    padding: 60px 0;
    font-size: 15px;
}

.cart-footer {
    padding: 28px 32px;
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-family: var(--font-serif);
    margin-bottom: 12px;
}

.cart-summary-total {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-terracotta);
    border-top: 1px dashed var(--color-border);
    padding-top: 12px;
    margin-bottom: 20px;
}

.cart-note {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-full {
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-image-col {
        justify-content: center;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .atmosphere-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 16px 20px;
    }
    .main-nav {
        display: none;
    }
    .hero-section {
        padding: 40px 20px;
    }
    .hero-title {
        font-size: 40px;
    }
    .catalog-section {
        padding: 40px 20px 80px;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- Sprint 2C Dynamic Catalog Styles --- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    background-color: var(--color-bg-card);
    border-radius: 32px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.skeleton-img, .skeleton-line, .skeleton-btn {
    background: linear-gradient(90deg, #e7e7df 25%, #f2f1eb 50%, #e7e7df 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-img {
    width: 100%;
    height: 260px;
    border-radius: 24px;
}

.skeleton-line {
    height: 20px;
    width: 100%;
}
.skeleton-line.short {
    width: 60%;
}

.skeleton-btn {
    height: 48px;
    width: 100%;
    border-radius: 24px;
    margin-top: auto;
}

.catalog-status-card {
    grid-column: 1 / -1;
    background-color: var(--color-bg-card);
    border-radius: 32px;
    padding: 60px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.status-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.status-title {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--color-text-dark);
}

.status-msg {
    font-size: 16px;
    color: var(--color-text-muted);
    max-width: 400px;
}

.btn-retry {
    background-color: var(--color-terracotta);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 16px;
}
.btn-retry:hover {
    background-color: var(--color-terracotta-hover);
}

.product-meta {
    font-size: 11px;
    font-weight: 600;
    color: #8e9388;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.product-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    line-height: 1.4;
    flex: 1;
}

.product-price-box {
    margin-top: auto;
    margin-bottom: 14px;
    padding: 10px 14px;
    background-color: #f7f6f1;
    border-radius: 10px;
    border: 1px solid #eae7de;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
    letter-spacing: -0.2px;
}

.product-price-unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Catalog Actions & Load More Button */
.catalog-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    width: 100%;
}

.catalog-counter {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.btn-load-more {
    background-color: var(--color-olive);
    color: #ffffff;
    border: 1px solid var(--color-olive);
    border-radius: 30px;
    padding: 14px 44px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(50, 70, 33, 0.12);
}

.btn-load-more:hover {
    background-color: var(--color-olive-dark);
    border-color: var(--color-olive-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(50, 70, 33, 0.2);
}

.btn-load-more:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 3px;
}

/* Scroll To Top Floating Button */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 90;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--color-terracotta);
    color: #ffffff;
    border-color: var(--color-terracotta);
    box-shadow: 0 12px 28px rgba(184, 80, 66, 0.25);
    transform: translateY(-3px);
}

.scroll-to-top:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .catalog-actions {
        margin-top: 32px;
    }
    .btn-load-more {
        width: 100%;
        padding: 14px 24px;
    }
    .scroll-to-top {
        bottom: 24px;
        right: 24px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-img-wrap img,
    .hero-badge,
    .btn-load-more,
    .product-card {
        transition: none !important;
        transform: none !important;
    }
}
