/**
 * ==========================================================================
 * Perfumería Anyelie - Core Styles
 * Based on DESIGN.md (Nike-inspired Clean Design System)
 * ==========================================================================
**/

@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* ==========================================================================
   1. CSS Variables (Design Tokens)
   ========================================================================== */

:root {
    /* Colors */
    --color-ink: #111111;
    --color-on-primary: #ffffff;
    --color-canvas: #ffffff;
    --color-soft-cloud: #f5f5f5;
    --color-charcoal: #39393b;
    --color-ash: #4b4b4d;
    --color-mute: #707072;
    --color-stone: #9e9ea0;
    --color-hairline: #cacacb;
    --color-hairline-soft: #e5e5e5;
    --color-sale: #d30005;
    --color-sale-deep: #780700;
    --color-success: #007d48;
    --color-success-bright: #1eaa52;
    --color-info: #1151ff;
    --color-info-deep: #0034e3;

    /* Category Accents */
    --accent-pink: #ed1aa0;
    --accent-pink-soft: #ffb0dd;
    --accent-purple-soft: #beaffd;
    --accent-purple-pale: #d6d1ff;
    --accent-teal: #0a7281;
    --accent-pink-deep: #4c012d;

    /* Rounded */
    --radius-none: 0px;
    --radius-sm: 18px;
    --radius-md: 24px;
    --radius-lg: 30px;
    --radius-full: 9999px;

    /* Spacing (8px base) */
    --space-xxs: 2px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 18px;
    --space-xl: 24px;
    --space-xxl: 30px;
    --space-section: 48px;

    /* Typography Scale - DESIGN.md TEXT IS LAW */
    --font-family: 'Albert Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 48px;
    --font-h-xl: 36px;
    --font-h-lg: 28px;
    --font-h-md: 22px;
    --font-body: 16px;
    --font-button: 16px;
    --font-caption: 14px;
    --font-caption-sm: 12px;
    --font-utility: 11px;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

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

* {
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-canvas);
    color: var(--color-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* ==========================================================================
   3. Typography Utilities
   ========================================================================== */

.text-display {
    font-size: var(--font-display);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: none;
}

.heading-xl {
    font-size: var(--font-h-xl);
    font-weight: 600;
    line-height: 1.15;
}

.heading-lg {
    font-size: var(--font-h-lg);
    font-weight: 600;
    line-height: 1.2;
}

.heading-md {
    font-size: var(--font-h-md);
    font-weight: 600;
    line-height: 1.3;
}

.body-md {
    font-size: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
}

.body-strong {
    font-size: var(--font-body);
    font-weight: 500;
    line-height: 1.6;
}

.caption-md {
    font-size: var(--font-caption);
    font-weight: 500;
    line-height: 1.45;
}

.caption-sm {
    font-size: var(--font-caption-sm);
    font-weight: 500;
    line-height: 1.4;
}

.utility-xs {
    font-size: var(--font-utility);
    font-weight: 500;
    line-height: 1.35;
}

/* Responsive Font Sizes */
@media (max-width: 960px) {
    .text-display { font-size: 36px; }
    .heading-xl { font-size: 28px; }
    .heading-lg { font-size: 22px; }
}

@media (max-width: 599px) {
    .text-display { font-size: 28px; }
    .heading-xl { font-size: 24px; }
}

/* ==========================================================================
   4. Layout & Containers
   ========================================================================== */

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

@media (max-width: 1024px) {
    .container { padding: 0 40px; }
}

@media (max-width: 599px) {
    .container { padding: 0 20px; }
}

.section {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
}

.grid {
    display: grid;
    gap: var(--space-sm);
}

/* ==========================================================================
   5. Components (Modular & Reusable)
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: var(--font-button);
    font-weight: 500;
    padding: 16px 32px;
    height: 48px;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.95);
    opacity: 0.5;
}

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

.btn-secondary {
    background-color: var(--color-soft-cloud);
    color: var(--color-ink);
}

.btn-block {
    width: 100%;
}

.btn-outline-on-image {
    background-color: var(--color-canvas);
    color: var(--color-ink);
    padding: 12px 24px;
}

.btn-icon-circular {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-soft-cloud);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Page Headers */
.products-header {
    padding-top: var(--space-section);
    padding-bottom: var(--space-lg);
    text-align: left;
}

.products-header h1 {
    margin-bottom: var(--space-xs);
}

/* Catalog Container & Layout */
.catalog-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--space-sm);
    row-gap: var(--space-xl); /* Increased vertical air */
    width: 100%;
}

@media (max-width: 1023px) {
    .products-grid { 
        grid-template-columns: repeat(2, 1fr);
        row-gap: var(--space-lg); 
    }
}

@media (max-width: 600px) {
    .products-grid { 
        grid-template-columns: 1fr; /* Single column as per DESIGN.md text */
        row-gap: var(--space-lg);
    }
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-canvas);
    border-radius: var(--radius-none);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
    gap: var(--space-sm);
}

.product-card:hover { opacity: 0.8; }

.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--color-soft-cloud);
    border-radius: var(--radius-none);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-soft-cloud);
    color: var(--color-mute);
}

.product-card-meta {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.product-card-brand {
    font-size: var(--font-caption);
    color: var(--color-mute);
    font-weight: 500;
}

.product-card-name {
    font-size: var(--font-body);
    font-weight: 500;
    color: var(--color-ink);
    line-height: 1.4;
    margin: 0;
}

.product-card-subtitle {
    font-size: var(--font-caption);
    color: var(--color-mute);
    font-weight: 400;
}

.product-card-price {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-ink);
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    color: var(--color-ink);
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-caption-sm);
    font-weight: 500;
}

/* Swatch Dots */
.swatch-row {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.swatch-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-hairline);
    background-color: var(--color-ink);
    display: inline-block;
}

.swatch-dot.active {
    box-shadow: 0 0 0 2px var(--color-canvas), 0 0 0 4px var(--color-ink);
}

/* Inputs & Forms */
.pill-input, .search-pill {
    background-color: var(--color-soft-cloud);
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.pill-input input, .search-pill input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    font-size: var(--font-body);
}

.pill-input:focus-within, .search-pill:focus-within {
    background-color: var(--color-canvas);
    box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 12px var(--color-soft-cloud);
}

/* Catalog Toolbar */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    background-color: var(--color-canvas);
    border-bottom: 1px solid var(--color-hairline-soft);
    margin-bottom: var(--space-md);
}

.toolbar-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-md);
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.toolbar-select {
    padding: 0 20px;
    height: 48px; /* Touch-friendly height */
    background-color: var(--color-soft-cloud);
    border: 1px solid transparent;
    border-radius: var(--radius-lg); /* Pill geometry */
    font-size: 14px;
    font-weight: 500;
    color: var(--color-ink);
    cursor: pointer;
    transition: all 0.2s;
    appearance: none; /* Custom arrow look */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.toolbar-select:hover {
    background-color: var(--color-hairline-soft);
}

.toolbar-select:focus {
    outline: none;
    background-color: var(--color-canvas);
    border-color: var(--color-ink);
    box-shadow: 0 0 0 4px var(--color-soft-cloud);
}

.toolbar-clear {
    color: var(--color-mute);
    text-decoration: underline;
    font-size: var(--font-caption);
    font-weight: 500;
    white-space: nowrap;
}

.toolbar-clear:hover { color: var(--color-ink); }

@media (max-width: 768px) {
    .catalog-toolbar {
        padding: var(--space-md) 0;
    }
    
    .toolbar-form {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    
    .toolbar-group {
        justify-content: flex-start;
        width: 100%;
    }

    .toolbar-select {
        flex: 1; /* Stretch select on mobile if needed */
        min-width: 140px;
    }
}

/* Brand Wall (Editorial Logo Grid) */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-xl);
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm); /* Fixed 8px gap as per DESIGN.md */
    text-decoration: none;
    color: inherit;
}

.brand-item:hover {
    opacity: 0.8; /* Replaced transform with standard opacity feedback */
}

.brand-logo-container {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background-color: var(--color-soft-cloud);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
}

.brand-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-info {
    text-align: center;
}

@media (max-width: 599px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    .brand-logo-container {
        width: 100px;
        height: 100px;
        padding: 16px;
    }
}

/* ==========================================================================
   6. Navigation Components
   ========================================================================== */

/* Utility Bar */
.utility-bar {
    height: 36px;
    background-color: var(--color-soft-cloud);
    font-size: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-hairline-soft);
}

.utility-bar .container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.utility-cluster {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.utility-link { 
    font-weight: 500; 
    color: var(--color-ink);
}

.utility-dot { color: var(--color-mute); }

@media (max-width: 960px) {
    .utility-bar { display: none; }
}

/* Primary Nav */
.primary-nav {
    height: 64px;
    background-color: var(--color-canvas);
    border-bottom: 1px solid var(--color-hairline-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.primary-nav .container {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Exact centering for nav-center */
    align-items: center;
    width: 100%;
}

.nav-brand { 
    display: flex; 
    align-items: center;
    justify-self: start;
}

.brand-logo img { 
    height: 32px; 
    width: auto; 
}

.nav-center {
    display: flex;
    gap: var(--space-xl);
    justify-self: center;
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    padding: 20px 0;
    position: relative;
    white-space: nowrap;
    color: var(--color-ink);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-ink);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    justify-self: end;
}

.search-container {
    min-width: 180px;
}

/* Icon Cluster */
.nav-icons {
    display: flex;
    align-items: center;
    gap: var(--space-xs); /* Tighter as per design */
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--color-ink);
    transition: background-color 0.2s;
    background: transparent;
    padding: 0;
}

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

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-width: 100vw; /* Support for small screens */
    background-color: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    margin-top: var(--space-sm);
    display: none; 
    z-index: 1001;
    padding: var(--space-xl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@media (max-width: 600px) {
    .cart-dropdown {
        width: 100vw;
        position: fixed; /* Immersive feel on mobile */
        top: 64px; /* Exact height of header */
        left: 0;
        right: 0;
        border: none; /* Cleaner look */
        margin-top: 0; /* Removed visual gap */
        height: auto;
        max-height: calc(100vh - 64px);
        border-bottom: 1px solid var(--color-hairline);
    }
}

.cart-dropdown.is-active {
    display: block !important;
}

.cart-dropdown-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
}

.cart-dropdown-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    max-height: 400px;
    overflow-y: auto;
}

.cart-dropdown-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-md);
    align-items: start;
}

.dropdown-item-image {
    aspect-ratio: 1/1;
    background-color: var(--color-soft-cloud);
    overflow: hidden;
}

.dropdown-item-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.dropdown-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-ink);
}

.dropdown-item-details {
    font-size: 12px;
    color: var(--color-mute);
}

.dropdown-item-price {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.cart-dropdown-footer {
    border-top: 1px solid var(--color-hairline-soft);
    padding-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.dropdown-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.total-label { font-size: 14px; font-weight: 500; }
.total-amount { font-size: 18px; font-weight: 600; }

.dropdown-empty {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--color-mute);
}

/* Cart Specifics */
.cart-wrapper { position: relative; }
.cart-count {
    position: absolute;
    top: 6px;
    right: 4px;
    background-color: var(--color-ink);
    color: var(--color-on-primary);
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-canvas);
}

/* Mobile Menu & Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 80%;
    height: 100%;
    background-color: var(--color-canvas);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
}

.mobile-drawer.is-active { right: 0; }

.drawer-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--space-xl);
}

.drawer-links {
    padding: var(--space-md) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.drawer-link {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-ink);
}

.drawer-divider {
    border: 0;
    border-top: 1px solid var(--color-hairline-soft);
    margin: var(--space-sm) 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.drawer-overlay.is-active { opacity: 1; visibility: visible; }

@media (max-width: 960px) {
    .primary-nav .container {
        grid-template-columns: 1fr auto auto; /* Brand | Icons | Toggle */
        gap: 0;
    }
    .nav-center { display: none; }
    
    .mobile-menu-toggle {
        margin-left: 0; /* Removed unnecessary margin */
        padding-right: 0; /* Ensure it stays tight to the edge */
    }
    
    .nav-right {
        gap: var(--space-xs); /* Tighter icons on mobile */
    }
}

/* ==========================================================================
   7. Product Detail Page (PDP)
   ========================================================================== */

.pdp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: var(--space-section);
    width: 100%;
}

.pdp-media-rail {
    display: flex;
    gap: var(--space-sm);
    align-self: start;
}

.pdp-thumbnails {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 60px;
}

.pdp-thumb-item {
    aspect-ratio: 1/1;
    background-color: var(--color-soft-cloud);
    cursor: pointer;
    overflow: hidden;
}

.pdp-thumb-item:hover { opacity: 0.8; }

.pdp-main-image {
    flex: 1;
    background-color: var(--color-soft-cloud);
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative; /* For arrow positioning */
}

.pdp-gallery-nav {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.pdp-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-canvas);
    color: var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-hairline);
    transition: opacity 0.2s;
}

.pdp-nav-btn:hover { opacity: 0.8; }

.pdp-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-info-block {
    position: sticky;
    top: 112px; /* Header 64px + air */
    height: fit-content;
}

.pdp-brand {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-ink);
    margin-bottom: 4px;
    display: block;
}

.pdp-name {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-xs);
}

.pdp-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-ink);
    margin-bottom: var(--space-xl);
}

.pdp-price {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-section);
}

/* PDP Controls */
.pdp-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-section);
}

/* Disclosure Rows (Accordion Pattern) */
.pdp-disclosure-list {
    border-top: 1px solid var(--color-hairline);
    margin-top: var(--space-section);
}

.pdp-disclosure-row {
    border-bottom: 1px solid var(--color-hairline);
    padding: 24px 0;
}

.pdp-disclosure-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.pdp-disclosure-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-ink);
}

.pdp-disclosure-content {
    padding-top: var(--space-md);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-charcoal);
    display: none; /* Controlled via JS class */
}

.pdp-disclosure-row.is-active .pdp-disclosure-content {
    display: block;
}

@media (max-width: 1023px) {
    .pdp-layout {
        grid-template-columns: 1fr;
        gap: var(--space-section);
    }
    .pdp-info-block { position: static; }
}

@media (max-width: 599px) {
    .pdp-media-rail {
        flex-direction: column-reverse;
    }
    .pdp-thumbnails {
        flex-direction: row;
        width: 100%;
    }
    .pdp-thumb-item { width: 60px; }
}

/* ==========================================================================
   8. Authentication (Login & Register)
   ========================================================================== */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-section) var(--space-xl);
    background-color: var(--color-canvas);
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-title {
    font-size: var(--font-h-lg);
    font-weight: 600;
    margin-bottom: var(--space-section);
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-section);
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.auth-form label {
    font-size: var(--font-body);
    font-weight: 500;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius-sm);
    font-size: var(--font-body);
    background-color: var(--color-canvas);
    transition: border-color 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-ink);
}

.auth-form .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-caption);
}

.auth-form a, .auth-footer a {
    color: var(--color-ink);
    font-weight: 500;
    text-decoration: underline;
}

.alert-error {
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    background-color: rgba(211, 0, 5, 0.08);
    color: var(--color-sale-deep);
    border-left: 3px solid var(--color-sale);
    border-radius: var(--radius-sm);
    font-size: var(--font-body);
}

.auth-footer {
    text-align: center;
    font-size: var(--font-body);
    color: var(--color-mute);
}

/* ==========================================================================
   8. Footer Component
   ========================================================================== */

.main-footer {
    background-color: var(--color-canvas);
    border-top: 1px solid var(--color-hairline);
    padding-top: var(--space-section);
    padding-bottom: var(--space-xl);
    margin-top: var(--space-section);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-section);
}

.footer-heading {
    font-weight: 500;
    font-size: var(--font-body);
    margin-bottom: var(--space-lg);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-link {
    color: var(--color-mute);
    font-size: var(--font-caption);
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover { color: var(--color-ink); }

.footer-bottom {
    border-top: 1px solid var(--color-hairline-soft);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-mute);
    font-size: var(--font-utility);
    font-weight: 500;
}

@media (max-width: 1023px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-xxl); }
}

@media (max-width: 599px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

/* ==========================================================================
   9. Signature Components & Helpers
   ========================================================================== */

/* Campaign Tile */
.campaign-tile {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--color-ink);
    overflow: hidden;
}

.campaign-tile img { width: 100%; height: 100%; object-fit: cover; }

.campaign-content {
    position: absolute;
    bottom: var(--space-section);
    left: var(--space-section);
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    color: var(--color-on-primary);
}

@media (max-width: 599px) {
    .campaign-tile { aspect-ratio: 4 / 5; }
    .campaign-content { bottom: var(--space-xl); left: var(--space-xl); max-width: 80%; }
}

/* Pagination */
.pagination {
    margin-top: var(--space-section);
    display: flex;
    justify-content: center;
}

.pagination-wrapper { display: flex; align-items: center; gap: var(--space-md); }

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all 0.2s;
}

.page-number.is-active {
    background-color: var(--color-ink);
    color: var(--color-on-primary);
}

.page-number:not(.is-active):hover { background-color: var(--color-soft-cloud); }

/* Helpers */
.desktop-only { display: flex !important; }
.mobile-only { display: none !important; }

@media (max-width: 960px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
}

.form-error-text {
    display: block;
    font-size: var(--font-caption);
    color: var(--color-sale);
    margin-top: var(--space-xs);
}
