/* Vint — custom visual layer over Bootstrap 5.
   Restrained, warm vintage palette; clear hierarchy; ~8px radii. */

:root {
    --bg: #faf8f4;
    --surface: #ffffff;
    --ink: #2c2723;
    --ink-soft: #6b6259;
    --border: #e7e1d8;
    --accent: #8a5a3b;      /* muted terracotta / leather */
    --accent-dark: #6f4830;
    --brand-ink: #3a342e;   /* embossed taupe for the wordmark */
    --brand-soft: #9a8b78;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(44, 39, 35, 0.06), 0 4px 16px rgba(44, 39, 35, 0.05);
    /* Elegant serif for the logo and headings; Latin falls to Cormorant,
       Hebrew glyphs fall through to Frank Ruhl Libre. */
    --font-display: "Cormorant Garamond", "Frank Ruhl Libre", Georgia, serif;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

/* Brand logo (typographic wordmark) */
.brand-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    padding: 0.3rem 0;
    text-decoration: none;
}
.brand-wordmark {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--brand-ink);
    direction: ltr;   /* keep VINT—AGE order even in RTL pages */
}
.brand-word {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    font-size: 1.7rem;
    letter-spacing: 0.28em;
    text-indent: 0.28em;   /* balance the trailing letter-spacing */
}
.brand-rule {
    width: 2rem;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}
.brand-sub {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.62rem;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    text-transform: uppercase;
    color: var(--brand-soft);
    margin-top: 0.3rem;
}
.brand-sub-he {
    font-family: "Frank Ruhl Libre", serif;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--brand-soft);
    margin-top: 0.15rem;
}

/* Navbar */
.site-navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}
.site-navbar .navbar-brand { color: var(--brand-ink); }
.site-navbar .nav-link {
    color: var(--ink-soft);
    font-weight: 500;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
    color: var(--accent);
}

/* Language switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}
.lang-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
}
.lang-link:hover { color: var(--accent); }
.lang-link.active { color: var(--ink); font-weight: 700; }
.lang-sep { color: var(--border); }

/* Buttons */
.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
}
.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

/* Hero */
.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.4rem, 5.5vw, 3.4rem);
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}
.hero-subtitle {
    color: var(--ink-soft);
    max-width: 34rem;
    font-size: 1.1rem;
}

/* Cards / surfaces (ready for the product grid in the next phase) */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Error pages */
.error-code {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-title { font-weight: 600; margin-bottom: 0.5rem; }
.error-message { color: var(--ink-soft); }

/* Section headings */
.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.9rem;
    letter-spacing: 0.01em;
}
.empty-state {
    color: var(--ink-soft);
    padding: 3rem 0;
    text-align: center;
}

/* Shop header: title + search */
.shop-search {
    display: flex;
    gap: 0.5rem;
    max-width: 22rem;
    width: 100%;
    flex: 0 1 22rem;
}
.shop-search .form-control { min-width: 0; }
.results-count {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination-nav { margin-top: 2.5rem; }
.pagination .page-link {
    color: var(--ink);
    border-color: var(--border);
}
.pagination .page-link:hover {
    color: var(--accent);
    background-color: var(--bg);
}
.pagination .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-item.disabled .page-link { color: var(--border); }

/* Product grid + cards */
.product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(44, 39, 35, 0.1);
    color: inherit;
}
.product-thumb,
.product-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3ede3, #e9e0d3);
    color: #c3b6a3;
    overflow: hidden;
}
/* Fixed height so every card's image box is identical, regardless of
   the photo's own aspect ratio (flex-item min-height would otherwise let
   a tall portrait photo stretch its box). */
.product-thumb {
    height: 240px;
    flex: 0 0 auto;
}
.product-hero {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.product-thumb img,
.product-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-thumb.is-sold img,
.product-hero.is-sold img { opacity: 0.6; }
.product-thumb-icon {
    width: 38%;
    max-width: 88px;
    height: auto;
}
.product-badge {
    position: absolute;
    top: 0.6rem;
    inset-inline-start: 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.badge-sold {
    background-color: var(--ink);
    color: #fff;
}
.product-body {
    padding: 0.9rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.product-name {
    font-size: 1.02rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.product-price {
    color: var(--accent);
    font-weight: 700;
}

/* Product detail */
.back-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.back-link:hover { color: var(--accent); }
.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}
.badge-available {
    background-color: #e6efe6;
    color: #3d6b46;
}
.product-title {
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.product-detail-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}
.product-description {
    color: var(--ink-soft);
    font-size: 1.05rem;
    white-space: pre-line;
}
.checkout-note {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* Content pages (About, Contact) */
.content-page {
    max-width: 42rem;
    margin-top: 1rem;
}
.content-page p {
    color: var(--ink-soft);
    font-size: 1.05rem;
}
.page-lead {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--ink) !important;
    margin-bottom: 1.5rem;
}
.subsection-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* ===== Admin (backoffice) ===== */
.admin-link { color: var(--accent) !important; font-weight: 600; }
.admin-body { background: #f3efe8; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    flex: 0 0 220px;
    background: var(--ink);
    color: #e9e0d3;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
}
.admin-brand {
    font-family: var(--font-display);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 1.5rem;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-nav a {
    color: #cfc4b4;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav a.active { background: var(--accent); color: #fff; }
.admin-sidebar-foot {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
}
.admin-sidebar-foot a, .admin-sidebar-foot button { color: #cfc4b4; text-decoration: none; text-align: start; }
.admin-sidebar-foot a:hover, .admin-sidebar-foot button:hover { color: #fff; }
.admin-main { flex: 1 1 auto; padding: 1.75rem 2rem; min-width: 0; }
.admin-h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; margin-bottom: 1.25rem; }
.admin-count { color: var(--ink-soft); font-size: 1rem; }
.admin-back { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; display: inline-block; margin-bottom: 0.5rem; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.stat-num { font-size: 1.8rem; font-weight: 700; }
.stat-num.accent { color: var(--accent); }
.stat-label { color: var(--ink-soft); font-size: 0.85rem; }

.admin-excelbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.import-form { display: flex; align-items: center; gap: 0.4rem; }
.import-form .form-control { max-width: 16rem; }
.import-help { color: var(--ink-soft); font-size: 0.82rem; flex: 1 1 12rem; }

.content-block { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.content-block:last-child { border-bottom: none; }
.content-key { display: block; font-size: 0.75rem; color: var(--ink-soft); font-family: monospace; margin-bottom: 0.35rem; }
.content-lang { display: block; font-size: 0.7rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.admin-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.admin-filters .form-control, .admin-filters .form-select { max-width: 14rem; }

.admin-table { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; }
.admin-table th, .admin-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: start; }
.admin-table thead th { background: #faf7f2; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--ink); font-weight: 500; text-decoration: none; }
.admin-table a:hover { color: var(--accent); }
.admin-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }

.price-form { display: flex; gap: 0.4rem; align-items: center; }
.price-input { width: 6.5rem; }
.price-input.placeholder-price { border-color: var(--accent); background: #fbf3ec; }
.loc-form { display: flex; gap: 0.3rem; align-items: center; }
.loc-input { width: 5.5rem; font-size: 0.85rem; }

.pill { font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; }
.pill-available { background: #e6efe6; color: #3d6b46; }
.pill-reserved { background: #f4ecd9; color: #9a7b2e; }
.pill-sold { background: var(--ink); color: #fff; }
.pill-hidden { background: #eee; color: #666; }

.admin-edit-grid { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 1.25rem; align-items: start; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.admin-preview img { width: 100%; border-radius: 6px; }
.admin-messages { display: flex; flex-direction: column; gap: 0.75rem; }
.message-card { max-width: 42rem; }

@media (max-width: 820px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { flex-basis: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
    .admin-brand { margin-bottom: 0; margin-inline-end: 1rem; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-sidebar-foot { margin: 0; border: none; padding: 0; flex-direction: row; gap: 1rem; }
    .admin-edit-grid { grid-template-columns: 1fr; }
}

/* Nav utility cluster (auth, cart, language) */
.navbar-utils {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cart icon in nav */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--ink-soft);
    padding: 0.25rem;
    line-height: 0;
}
.cart-link:hover { color: var(--accent); }
.cart-icon { width: 22px; height: 22px; }
.cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -6px;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.05rem;
}

@media (max-width: 991.98px) {
    .navbar-utils {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding-top: 0.5rem;
    }
}

/* Cart page */
.cart-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cart-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
}
.cart-row:last-child { border-bottom: none; }
.cart-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3ede3;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.15rem; }
.cart-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.cart-name:hover { color: var(--accent); }
.cart-price { color: var(--accent); font-weight: 700; }
.cart-remove { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; padding: 0; }
.cart-remove:hover { color: #b3261e; }
.cart-footer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1rem;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
}
.cart-total-amount { color: var(--accent); }

/* Order / checkout summary */
.summary-list { margin-top: 0.5rem; }
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    text-align: start;
}
.summary-name { color: var(--ink); }
.summary-price { color: var(--ink-soft); white-space: nowrap; }
.summary-total {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid var(--border);
    margin-top: 0.25rem;
    color: var(--ink);
}
.summary-total span:last-child { color: var(--accent); }

/* Payment result icon */
.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}
.result-icon.success { background: #e6efe6; color: #3d6b46; }
.result-icon.pending { background: #f4ecd9; color: #9a7b2e; }

/* Auth pages */
.auth-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 26rem;
    margin-top: 1.5rem;
}
.auth-title {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}
.auth-alt { color: var(--ink-soft); font-size: 0.95rem; }
.auth-alt a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.85rem;
    margin: 1.25rem 0;
}
.oauth-divider::before,
.oauth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.oauth-divider span { padding: 0 0.75rem; }

.oauth-btn { font-weight: 500; }

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.account-wrap { max-width: 40rem; }
.orders-history { display: flex; flex-direction: column; }
.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { color: var(--accent); }
.order-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.order-row-id { font-weight: 600; font-family: monospace; }
.order-row-date { color: var(--ink-soft); font-size: 0.9rem; }
.order-row-items { color: var(--ink-soft); font-size: 0.9rem; }

.account-details dt {
    color: var(--ink-soft);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.9rem;
}
.account-details dd { margin: 0.15rem 0 0; font-weight: 500; }

/* Footer */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--ink-soft);
    font-size: 0.9rem;
}
.footer-brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    color: var(--brand-ink);
}
