/* ==========================================================================
   AnyAuction — custom palette on top of Bootstrap 5.
   Design tokens copied from the Figma export so the Twig/Bootstrap side
   stays visually close to the Tailwind/shadcn source.
   ========================================================================== */

:root {
    --aa-primary:        #030213;
    --aa-primary-hover:  #1a1a2e;
    --aa-amber:          #f59e0b;
    --aa-amber-hover:    #fbbf24;
    --aa-emerald:        #059669;
    --aa-emerald-hover:  #047857;
    --aa-muted:          #717182;
    --aa-surface:        #f3f3f5;
    --aa-border:         rgba(0, 0, 0, 0.1);
    --aa-radius-lg:      0.75rem;
    --aa-radius-xl:      1rem;
}

/* Bootstrap token overrides (affects .btn-primary, .bg-primary, etc.) */
:root,
[data-bs-theme="light"] {
    --bs-primary:          var(--aa-primary);
    --bs-primary-rgb:      3, 2, 19;
    --bs-body-color:       #1a1a2e;
    --bs-border-color:     var(--aa-border);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
}

/* Navbar -------------------------------------------------------------- */
.aa-navbar {
    background: #fff;
    border-bottom: 1px solid var(--aa-border);
}

.aa-brand-badge {
    width: 32px;
    height: 32px;
    background: var(--aa-primary);
    color: #fff;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aa-search {
    background: var(--aa-surface);
    border: 0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    width: 100%;
}

.aa-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 2, 19, 0.12);
}

.aa-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: #fff;
    border: 1px solid var(--aa-border);
    border-radius: var(--aa-radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    max-height: 24rem;
    overflow-y: auto;
}
.aa-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f3f5;
}
.aa-search-item:last-child { border-bottom: none; }
.aa-search-item:hover,
.aa-search-item.is-active {
    background: var(--aa-surface);
}
.aa-search-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--aa-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aa-muted);
}
.aa-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aa-search-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.aa-search-title {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aa-search-meta {
    font-size: 0.8rem;
    color: var(--aa-emerald);
}
.aa-search-empty {
    padding: 1rem;
    text-align: center;
    color: var(--aa-muted);
    font-size: 0.9rem;
}

/* Buttons ------------------------------------------------------------- */
.btn-primary {
    background-color: var(--aa-primary);
    border-color: var(--aa-primary);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--aa-primary-hover);
    border-color: var(--aa-primary-hover);
}

.btn-amber {
    background-color: var(--aa-amber);
    color: #000;
    border: 0;
}
.btn-amber:hover,
.btn-amber:focus {
    background-color: var(--aa-amber-hover);
    color: #000;
}

.btn-emerald {
    background-color: var(--aa-emerald);
    color: #fff;
    border: 0;
}
.btn-emerald:hover,
.btn-emerald:focus {
    background-color: var(--aa-emerald-hover);
    color: #fff;
}

/* Utility classes matching the Figma palette -------------------------- */
.text-emerald    { color: var(--aa-emerald) !important; }
.text-amber      { color: var(--aa-amber) !important; }
.text-muted-aa   { color: var(--aa-muted) !important; }

.bg-primary-aa   { background-color: var(--aa-primary) !important; color: #fff; }
.bg-surface-aa   { background-color: var(--aa-surface) !important; }

.rounded-xl      { border-radius: var(--aa-radius-xl) !important; }
.rounded-lg-aa   { border-radius: var(--aa-radius-lg) !important; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero ---------------------------------------------------------------- */
.aa-hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.15), transparent 40%),
        linear-gradient(135deg, #030213 0%, #1a1a2e 60%, #242443 100%);
    color: #fff;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.aa-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    font-weight: 500;
}

.aa-hero .amber { color: var(--aa-amber); }

.aa-hero-stats > div p:first-child {
    color: var(--aa-amber);
    font-size: 1.6rem;
    margin: 0;
}
.aa-hero-stats > div p:last-child {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
    margin: 0.25rem 0 0;
}

/* Category pill ------------------------------------------------------- */
.aa-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--aa-border);
    border-radius: var(--aa-radius-lg);
    text-decoration: none;
    color: inherit;
    transition: background-color .15s ease, border-color .15s ease;
    text-align: center;
}
.aa-category:hover {
    background-color: var(--aa-surface);
    border-color: rgba(3, 2, 19, 0.3);
    color: var(--aa-primary);
}
.aa-category i { font-size: 1.25rem; color: var(--aa-muted); }
.aa-category:hover i { color: var(--aa-primary); }

/* Auction card -------------------------------------------------------- */
.aa-card {
    background: #fff;
    border: 1px solid var(--aa-border);
    border-radius: var(--aa-radius-xl);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.aa-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.aa-card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background: var(--aa-surface);
}
.aa-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.aa-card:hover .aa-card-img img {
    transform: scale(1.04);
}
.aa-card-body { padding: 1rem; }

.aa-badge {
    position: absolute;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.aa-badge-featured {
    top: 0.75rem;
    left: 0.75rem;
    background: var(--aa-amber);
    color: #000;
}
.aa-badge-buynow {
    bottom: 0.75rem;
    left: 0.75rem;
    background: var(--aa-emerald);
    color: #fff;
    font-size: 0.65rem;
}
.aa-heart {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
    z-index: 2;
}
.aa-heart:hover {
    transform: scale(1.08);
}
.aa-heart.is-active {
    background: rgba(255, 255, 255, 0.95);
}

/* Auction detail ------------------------------------------------------ */
.aa-bid-box {
    background: rgba(243, 243, 245, 0.6);
    border: 1px solid var(--aa-border);
    border-radius: var(--aa-radius-xl);
    padding: 1.25rem;
}

.aa-trust-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(243, 243, 245, 0.6);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: var(--aa-muted);
}

/* Footer -------------------------------------------------------------- */
.aa-footer {
    background: var(--aa-primary);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4rem;
}
.aa-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    display: block;
    padding: 0.15rem 0;
    font-size: 0.9rem;
}
.aa-footer a:hover { color: #fff; }
.aa-footer h4 { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; margin-bottom: 0.75rem; }

/* Auth split-screen --------------------------------------------------- */
.aa-auth-shell { min-height: 100vh; display: flex; }
.aa-auth-form  { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.aa-auth-visual {
    display: none;
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
}
@media (min-width: 992px) {
    .aa-auth-visual { display: block; }
}
.aa-auth-visual img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.aa-auth-visual::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
}
.aa-auth-visual .caption {
    position: absolute; left: 2rem; right: 2rem; bottom: 2.5rem;
    color: #fff;
}
