:root {
    --white: #FFFFFF;
    --off-white: #FAFAF8;
    --beige: #E8E0D5;
    --beige-light: #F5F0EB;
    --beige-dark: #D4C9BB;
    --red: #B91C1C;
    --red-dark: #991B1B;
    --red-light: #DC2626;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);

    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.main-content { min-height: calc(100vh - 80px - 200px); }

/* ====== NAVBAR ====== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 72px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
}

.logo-icon { color: var(--red); font-size: 20px; }
.logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
}
.logo-sub {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--gray-400);
    text-transform: uppercase;
}

.search-container {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--gray-50);
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(185,28,28,0.1);
}

.search-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
}

.search-results:has(*) { display: block; }

.search-results-list { max-height: 320px; overflow-y: auto; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    transition: background 0.15s;
}

.search-result-item:hover { background: var(--beige-light); }

.search-result-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--beige-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-image img { width: 100%; height: 100%; object-fit: cover; }

.search-result-info { display: flex; flex-direction: column; gap: 1px; }
.search-result-brand { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }
.search-result-name { font-size: 13px; font-weight: 500; }
.search-result-price { font-size: 13px; color: var(--red); font-weight: 600; }

.search-results-empty { padding: 16px; text-align: center; color: var(--gray-400); font-size: 13px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    transition: color 0.2s;
}
.nav-link:hover { color: var(--red); }

.cart-link { position: relative; }

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 100px;
    padding: 0 5px;
    position: absolute;
    top: -8px;
    right: -10px;
}
.cart-badge:not(.has-items) { display: none; }

/* ====== HERO ====== */
.hero {
    background: linear-gradient(135deg, var(--white) 0%, var(--beige-light) 50%, var(--beige) 100%);
    padding: 80px 24px;
    text-align: center;
}

.hero-content { max-width: 640px; margin: 0 auto; }

.hero-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.hero-title .highlight { color: var(--red); }

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-500);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* ====== SECTIONS ====== */
.section { padding: 64px 0; }
.section-alt { background: var(--beige-light); }
.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: var(--gray-900);
}

.page-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ====== PRODUCT GRID ====== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--beige);
}

.product-card-link { display: block; }

.product-card-image {
    aspect-ratio: 1;
    background: var(--beige-light);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.product-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--beige-light), var(--beige));
    color: var(--red);
    font-size: 48px;
}
.product-placeholder.small { font-size: 24px; }
.product-placeholder.tiny { font-size: 16px; }

.product-card-body { padding: 16px; }

.product-brand {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    display: block;
    margin-bottom: 4px;
}

.product-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-meta {
    font-size: 12px;
    color: var(--gray-400);
    display: block;
    margin-bottom: 12px;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.product-original-price {
    font-size: 13px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--red);
}

.product-stock-badge {
    font-size: 12px;
    color: #16a34a;
    font-weight: 500;
}
.product-stock-badge.unavailable { color: var(--gray-400); }

/* ====== PRODUCT DETAIL ====== */
.back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--gray-500);
    transition: color 0.2s;
}
.back-link:hover { color: var(--red); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-detail-image {
    aspect-ratio: 1;
    background: var(--beige-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-info { padding-top: 8px; }
.product-detail-info .product-brand { font-size: 13px; margin-bottom: 8px; }
.product-detail-info .product-name { font-size: 28px; margin-bottom: 8px; }
.product-detail-info .product-category {
    font-size: 14px;
    color: var(--gray-400);
    display: block;
    margin-bottom: 20px;
}

.product-detail-info .product-pricing { margin-bottom: 20px; }
.product-detail-info .product-price { font-size: 28px; }

.product-description {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
}

.product-stock { margin-bottom: 24px; }
.stock-available { color: #16a34a; font-size: 14px; font-weight: 500; }
.stock-unavailable { color: var(--gray-400); font-size: 14px; }

/* ====== FEATURES ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 16px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--beige);
}

.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.feature-card p { font-size: 13px; color: var(--gray-500); }

/* ====== PRODUCTS PAGE ====== */
.products-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}

.results-count { font-size: 14px; color: var(--gray-400); }

.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

.filters-sidebar { position: sticky; top: 96px; align-self: start; }

.filter-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.filter-group { margin-bottom: 24px; }
.filter-group-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.filter-link {
    display: block;
    font-size: 14px;
    color: var(--gray-600);
    padding: 6px 0;
    transition: color 0.2s;
}
.filter-link:hover, .filter-link.active { color: var(--red); }
.filter-link.active { font-weight: 600; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.page-info { font-size: 14px; color: var(--gray-500); }

/* ====== CART ====== */
.cart-items { display: flex; flex-direction: column; gap: 16px; }

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--beige-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; }
.cart-item-brand { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.cart-item-name { font-size: 15px; font-weight: 500; display: block; }
.cart-item-meta { font-size: 12px; color: var(--gray-400); display: block; }

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s;
}
.qty-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }

.qty-value { font-size: 15px; font-weight: 500; min-width: 20px; text-align: center; }

.cart-item-price { font-size: 16px; font-weight: 600; white-space: nowrap; }

.cart-item-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.15s;
}
.cart-item-remove:hover { background: #FEE2E2; color: var(--red); }

.cart-summary {
    margin-top: 24px;
    padding: 24px;
    background: var(--beige-light);
    border-radius: var(--radius-lg);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.cart-total {
    border-top: 1px solid var(--beige);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.free-shipping-reminder {
    background: var(--white);
    border: 1px dashed var(--red);
    border-radius: var(--radius);
    padding: 12px;
    margin: 16px 0;
    text-align: center;
    font-size: 13px;
    color: var(--gray-600);
}

.text-success { color: #16a34a; font-weight: 600; }

.cart-empty {
    text-align: center;
    padding: 64px 24px;
}

.cart-empty-icon { font-size: 48px; margin-bottom: 16px; }
.cart-empty h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
.cart-empty p { color: var(--gray-500); margin-bottom: 24px; }

/* ====== CHECKOUT ====== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.form-section {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.form-section-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(185,28,28,0.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: 2fr 1fr 1fr; }

.checkout-summary {
    position: sticky;
    top: 96px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.summary-items { margin-bottom: 20px; }

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.summary-item-info { display: flex; flex-direction: column; gap: 2px; }
.summary-item-brand { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }
.summary-item-name { font-size: 14px; font-weight: 500; }
.summary-item-qty { font-size: 12px; color: var(--gray-400); }
.summary-item-price { font-size: 14px; font-weight: 600; white-space: nowrap; }

.summary-totals { border-top: 1px solid var(--gray-100); padding-top: 16px; }

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.summary-total {
    border-top: 1px solid var(--gray-200);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.payment-icons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.payment-icon {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ====== ORDER CONFIRMATION ====== */
.order-confirmation {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 0;
}

.order-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--beige-light);
    color: var(--red);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.order-icon.success { background: #DCFCE7; color: #16a34a; }

.order-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.order-number { color: var(--gray-400); margin-bottom: 24px; }

.order-details {
    background: var(--beige-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.order-detail-group { margin-bottom: 16px; }
.order-detail-group:last-child { margin-bottom: 0; }
.order-detail-group h3 { font-size: 12px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.order-detail-group p { font-size: 14px; color: var(--gray-600); }

.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
}
.order-status-pending { background: #FEF3C7; color: #92400E; }
.order-status-paid { background: #DCFCE7; color: #166534; }

.order-total { font-size: 24px; font-weight: 700; color: var(--red); }

.order-message {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.payment-pending {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.order-info {
    text-align: left;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

/* ====== FOOTER ====== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 48px 0 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-brand { margin-bottom: 24px; }
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-sub { color: var(--gray-500); }

.footer-links {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    color: var(--gray-400);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-copy {
    border-top: 1px solid var(--gray-800);
    padding-top: 24px;
    font-size: 13px;
    color: var(--gray-500);
}

/* ====== HTMX ====== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-settling .htmx-indicator { display: none; }

/* ====== LUXURY ANIMATIONS & EFFECTS ====== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

body {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.main-content > * {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.navbar {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.product-card {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 25px 35px -10px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(185, 28, 28, 0.08);
    border-color: rgba(212, 175, 55, 0.5);
}

.cart-badge:not(:empty) {
    animation: pulseBadge 0.4s ease-in-out;
}

.hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #FDFBF7 40%, #F5EFE6 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatGlow 8s ease-in-out infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(20px) scale(1.1); }
}

.btn {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .nav-container { gap: 16px; }
    .search-container { display: none; }
    .hero-title { font-size: 32px; }
    .hero { padding: 48px 24px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .products-layout { grid-template-columns: 1fr; }
    .filters-sidebar { display: none; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .checkout-layout { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
