/* Aureum - Layout global */
:root {
    --color-primary: #0d47a1;
    --color-primary-light: #1565c0;
    --color-primary-dark: #002171;
    --color-accent: #1976d2;
    --color-text: #1a1a2e;
    --color-text-muted: #5c5c7a;
    --color-bg: #f8f9fc;
    --color-white: #ffffff;
    --color-border: #e2e4ec;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(13, 71, 161, 0.12);
    --shadow-lg: 0 8px 24px rgba(13, 71, 161, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.875rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.top-links a {
    color: var(--color-white);
    margin-left: 1rem;
    opacity: 0.95;
}

.top-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.main-header .container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    color: var(--color-primary);
    font-weight: 700;
}

.logo-text {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.header-search {
    flex: 1;
    max-width: 420px;
}

.search-form {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg);
}

.search-input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 0;
    font-size: 0.9375rem;
    font-family: inherit;
    background: transparent;
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 0.65rem 1rem;
    border: 0;
    background: var(--color-primary);
    color: var(--color-white);
    cursor: pointer;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-cart-toggle {
    position: relative;
    padding: 0.5rem;
    border: 0;
    background: none;
    color: var(--color-primary);
    cursor: pointer;
    border-radius: var(--radius);
}

.btn-cart-toggle:hover {
    background: rgba(13, 71, 161, 0.08);
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

/* Nav */
.main-nav {
    background: var(--color-primary-dark);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-white);
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-list a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
}

/* Main */
.site-main {
    min-height: 60vh;
    padding-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: var(--color-text);
    color: var(--color-white);
    padding: 2.5rem 0 1rem;
    margin-top: 2rem;
}

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

.footer-col h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.footer-col p,
.footer-col ul {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

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

.footer-col ul a {
    color: var(--color-white);
}

.footer-col ul a:hover {
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.8125rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .main-header .container {
        flex-wrap: wrap;
    }
    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
}

/* Cart drawer */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    visibility: hidden;
}

.cart-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cart-drawer.is-open .cart-drawer-overlay {
    opacity: 1;
}

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-drawer.is-open .cart-drawer-panel {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-drawer-header h2 {
    margin: 0;
    font-size: 1.125rem;
}

.cart-close {
    padding: 0.25rem;
    border: 0;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
}

.cart-close:hover {
    color: var(--color-text);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.cart-empty {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-text-muted);
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.cart-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    font-weight: 600;
    color: var(--color-primary);
}

.cart-drawer-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

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

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

.btn-block {
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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