@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --color-bg: #f7f5f2;
    --color-surface: #ffffff;
    --color-text: #1c1917;
    --color-muted: #78716c;
    --color-border: #e7e5e4;
    --color-accent: #2d6a4f;
    --color-accent-hover: #1b4332;
    --color-badge: #40916c;
    --shadow-card: 0 1px 3px rgba(28, 25, 23, 0.06), 0 4px 12px rgba(28, 25, 23, 0.04);
    --shadow-card-hover: 0 8px 24px rgba(28, 25, 23, 0.1);
    --shadow-modal: 0 24px 48px rgba(28, 25, 23, 0.18);
    --radius-card: 1rem;
    --radius-btn: 9999px;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

.font-display {
    font-family: 'Fraunces', Georgia, serif;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    color: var(--color-text);
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
    background: var(--color-bg);
}

/* Cards */
.ad-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid transparent;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s;
    overflow: hidden;
}

.ad-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
    border-color: var(--color-border);
}

.ad-card__image {
    aspect-ratio: 1;
    background: #f5f5f4;
    overflow: hidden;
}

.ad-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.price-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-btn);
    transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-btn);
    border: 1px solid var(--color-border);
    transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
    background: var(--color-bg);
    border-color: #d6d3d1;
}

.btn-cart {
    width: 100%;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-btn);
    background: var(--color-text);
    color: white;
    transition: background 0.15s;
}

.btn-cart:hover {
    background: #44403c;
}

.btn-cart--in {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Category pills */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: white;
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.15s;
    box-shadow: var(--shadow-card);
}

.category-pill:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: var(--shadow-card-hover);
}

/* Auth modal */
.modal-overlay {
    background: rgba(28, 25, 23, 0.45);
    backdrop-filter: blur(4px);
}

.modal-panel {
    background: white;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-modal);
    max-height: 90vh;
    overflow-y: auto;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-muted);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.auth-tab--active {
    color: var(--color-text);
    border-bottom-color: var(--color-accent);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    background: #fafaf9;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
    background: white;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f7f5f2 50%, #edf4ef 100%);
    border-radius: 1.5rem;
    border: 1px solid var(--color-border);
}

/* Search bar */
.search-bar {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: 1rem;
}

/* Messages toast-style */
.message-toast {
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid var(--color-border);
}

/* Dropdown */
.account-dropdown {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-card-hover);
    min-width: 12rem;
}

/* Pagination */
.page-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    background: white;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.page-btn:hover {
    background: var(--color-bg);
}
