/* ============================================================
   Buttons — Ella parity: 40px pill, 16/700, 1px letter-spacing
   Default = ghost (transparent + dark border). Hover fills orange.
   Secondary = solid orange (inverse of default).
   Solid-dark kept for strong submits (e.g., PDP quote form).
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: var(--ls-button);
    border: 1px solid var(--color-fg);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-fg);
    text-decoration: none;
    transition: background var(--duration-base) var(--ease-smooth),
                color var(--duration-base) var(--ease-smooth),
                border-color var(--duration-base) var(--ease-smooth);
    cursor: pointer;
}

/* Primary (Ella's default) — ghost outline, hovers to orange */
.btn-primary,
.btn-outline {
    background: transparent;
    color: var(--color-fg);
    border-color: var(--color-fg);
}
.btn-primary:hover,
.btn-outline:hover {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}

/* Secondary — solid orange, hovers to ghost-orange */
.btn-secondary,
.btn-brand {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}
.btn-secondary:hover,
.btn-brand:hover {
    background: transparent;
    color: var(--color-brand);
    border-color: var(--color-brand);
}

/* Solid dark — reserved for strong submits (form CTA) */
.btn-solid-dark {
    background: var(--color-fg);
    color: #fff;
    border-color: var(--color-fg);
}
.btn-solid-dark:hover {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}

/* Ghost on dark surfaces (footer, hero) */
.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-ghost:hover {
    background: #fff;
    color: var(--color-fg);
}

/* Size modifiers */
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px;  font-size: 14px; }

/* ============================================================
   Badges — soft-tint, Ella Home 04 style
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px 5px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: var(--ls-button);
    border-radius: var(--radius-badge);
    line-height: 12px;
    text-transform: capitalize;
}
.badge-new     { background: var(--badge-new-bg);    color: var(--badge-new-fg); }
.badge-custom  { background: var(--badge-custom-bg); color: var(--badge-custom-fg); }
.badge-popular { background: var(--color-fg); color: #fff; }

/* Nav tag callouts — "Nuevo" only (no sale/hot since B2B quote-flow has no offers) */
.nav-tag {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    line-height: 1.5;
    vertical-align: top;
    margin-left: 2px;
    position: relative;
    top: -8px;
}
.nav-tag.is-new  { background: var(--badge-new-bg);  color: var(--badge-new-fg); }

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ============================================================
   Form inputs — ellamart+ pill search, rounded inputs
   ============================================================ */
.input {
    width: 100%;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-fg);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    transition: border-color var(--duration-fast);
}
.input:focus {
    outline: none;
    border-color: var(--color-brand);
}
.input::placeholder { color: var(--color-fg-muted); }

textarea.input {
    border-radius: 20px;
    min-height: 96px;
    line-height: 1.5;
    resize: vertical;
}

/* ============================================================
   Cotizacion drawer — slide-in confirmation after add-to-cart
   ============================================================ */
.quote-drawer[hidden],
.quote-drawer-overlay[hidden] { display: none !important; }

.quote-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-default);
    z-index: 9998;
}
.quote-drawer-overlay.is-open { opacity: 1; }

.quote-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 420px;
    max-width: 100vw;
    background: var(--color-bg);
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out-smooth);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}
.quote-drawer.is-open { transform: translateX(0); }

.quote-drawer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}
.quote-drawer-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-success);
    color: #ffffff;
    flex-shrink: 0;
}
.quote-drawer-head h2 {
    flex: 1;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: var(--fw-bold);
    color: var(--color-fg);
    letter-spacing: var(--ls-heading);
}
.quote-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    color: var(--color-fg);
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--duration-fast);
}
.quote-drawer-close:hover { background: var(--color-bg-muted); }

.quote-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px 8px;
}
.quote-drawer-counter {
    margin: 0 0 14px;
    font-family: var(--font-sub);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--ls-eyebrow);
    color: var(--color-fg-muted);
}
.quote-drawer-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--color-fg-muted);
    font-size: var(--text-sm);
}
.quote-drawer-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.quote-drawer-item {
    display: flex;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border-light);
}
.quote-drawer-item:last-child { border-bottom: 0; }
.quote-drawer-item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--color-bg-muted);
    flex-shrink: 0;
}
.quote-drawer-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.quote-drawer-item-name {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--color-fg);
    line-height: 1.35;
}
.quote-drawer-item-meta,
.quote-drawer-item-qty {
    font-family: var(--font-sub);
    font-size: var(--text-xs);
    color: var(--color-fg-muted);
}

.quote-drawer-foot {
    flex-shrink: 0;
    padding: 18px 24px 24px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quote-drawer-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--ls-button);
    text-decoration: none;
    color: var(--color-bg);
    background: var(--color-fg);
    border: 0;
    border-radius: var(--radius-pill);
    transition: background var(--duration-fast);
    cursor: pointer;
}
.quote-drawer-cta-primary:hover { background: var(--color-brand); }
.quote-drawer-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--color-fg);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color var(--duration-fast), color var(--duration-fast);
}
.quote-drawer-cta-secondary:hover {
    border-color: var(--color-fg);
}
.quote-drawer-trust {
    margin: 6px 0 0;
    text-align: center;
    font-family: var(--font-sub);
    font-size: var(--text-xs);
    color: var(--color-fg-muted);
}

/* Add-to-cart button success flash */
.btn.is-added,
button.is-added {
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
    color: #ffffff !important;
}

/* Mobile: bottom sheet */
@media (max-width: 768px) {
    .quote-drawer {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 88dvh;
        max-height: 88dvh;
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
    }
    .quote-drawer.is-open { transform: translateY(0); }
    .quote-drawer-head { padding: 18px 20px; }
    .quote-drawer-body { padding: 16px 20px 8px; }
    .quote-drawer-foot { padding: 16px 20px 22px; }
}
