/* ========================================
   Promoções Zart - Static Site Styles
   ======================================== */

:root {
    /* Colors */
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #6b6b80;
    --color-border: #e8e8ed;

    /* Accent - Red/Orange for discounts */
    --color-accent: #e84d2a;
    --color-accent-hover: #d03d1f;
    --color-accent-light: #fff0ed;
    --color-accent-glow: rgba(232, 77, 42, 0.3);

    /* Success green for prices */
    --color-success: #16a34a;
    --color-success-light: #ecfdf5;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Layout */
    --container-max: 1200px;
    --header-height: auto;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f0f1a;
        --color-surface: #1a1a2e;
        --color-text: #f1f1f5;
        --color-text-muted: #9a9aa8;
        --color-border: #2d2d44;
        --color-accent-light: #2d1a16;
        --color-success-light: #142d1e;
    }
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========================================
   Container
   ======================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   Header
   ======================================== */

.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-accent), #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ========================================
   Main Content
   ======================================== */

.main {
    flex: 1;
    padding: 2rem 0;
}

/* ========================================
   Loading State
   ======================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    gap: 1rem;
    color: var(--color-text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* ========================================
   Empty State
   ======================================== */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
    gap: 1rem;
    color: var(--color-text-muted);
}

.empty-icon {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.empty h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.empty p {
    font-size: 0.95rem;
}

/* ========================================
   Offers Grid
   ======================================== */

.offers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .offers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   Offer Card
   ======================================== */

.offer-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

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

.offer-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 2.5rem;
    overflow: hidden;
}

.offer-image svg {
    width: 48px;
    height: 48px;
}

.offer-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.offer-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-text);
}

.offer-prices {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-new {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
}

.price-old {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px var(--color-accent-glow);
}

.offer-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
}

.offer-action {
    margin-top: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 2px 8px var(--color-accent-glow);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--color-accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
}

.footer a {
    color: var(--color-accent);
    font-weight: 500;
}

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

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ========================================
   Error Toast
   ======================================== */

.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 320px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--color-text);
}