/* Explain: Styles for UI elements like product cards, buttons, forms, and admin modals. */
.site-header {
    background: rgba(10, 25, 41, 0.88);
    backdrop-filter: blur(16px);
}

/* Sobre relleno dorado el texto va siempre en azul marino */
[class*="bg-[var(--primary-color)]"],
[class*="bg-[var(--button-color)]"] {
    color: var(--button-text-color);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: var(--surface-color);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: var(--surface-color);
}

.arch-frame-hero {
    height: min(72vh, 660px);
    min-height: 420px;
}

.arch-frame-square {
    aspect-ratio: 4 / 5;
}

.floating-note {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    max-width: 250px;
    align-items: center;
    gap: 0.7rem;
    border-radius: 1rem;
    background: rgba(10, 25, 41, 0.9);
    padding: 0.8rem 1rem;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.quiet-detail {
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
}

.quiet-detail span {
    display: inline-flex;
    margin-bottom: 0.7rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
}

.quiet-detail p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border-radius: 1.6rem;
    transition: transform 300ms ease, border-color 300ms ease;
}

.product-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.product-card.is-hidden {
    display: none;
}

.product-media {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--surface-color);
}

.product-media img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.product-thumb {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--glass-border);
    border-radius: 0.9rem;
    background: var(--surface-color);
    padding: 0;
    opacity: 0.55;
    transition: opacity 300ms ease, border-color 300ms ease;
}

.product-thumb:hover {
    opacity: 1;
    border-color: var(--accent-color);
}

.product-thumb.is-active {
    border-color: var(--accent-color);
    opacity: 1;
}

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

.product-card:hover .product-media img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(10, 25, 41, 0.9);
    padding: 0.35rem 0.8rem;
    color: var(--accent-color);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem 1.4rem 1.5rem;
}

.product-brand {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.product-name {
    margin-top: 0.5rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
}

.product-name a {
    transition: color 300ms ease;
}

.product-name a:hover {
    color: var(--accent-color);
}

.price-tag {
    margin-top: 0.7rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
}

.cat-chip {
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: transparent;
    padding: 0.6rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 300ms ease;
}

.cat-chip:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

.cat-chip.is-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--button-text-color);
}

.cart-row {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding: 1.15rem 0;
}

.cart-row:last-child {
    border-bottom: 0;
}

.cart-thumb {
    height: 84px;
    width: 84px;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--surface-color);
}

.cart-thumb img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.qty-box {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.qty-box.is-busy {
    opacity: 0.5;
    pointer-events: none;
}

.qty-box button {
    height: 2.35rem;
    width: 2.35rem;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 0.75rem;
}

.qty-box button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.qty-box input {
    width: 2.6rem;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.cart-remove {
    border: 0;
    background: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-decoration: underline;
    transition: color 300ms ease;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.field-input {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 0.9rem;
    background: var(--field-bg);
    padding: 0.85rem 1.1rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.field-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.field-input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.form-status.success {
    color: #9BD8AE;
}

.form-status.error {
    color: #F1A392;
}

.toast-note {
    position: fixed;
    bottom: 1.75rem;
    left: 50%;
    z-index: 90;
    max-width: calc(100vw - 2rem);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--surface-color);
    padding: 0.85rem 1.5rem;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 1rem);
    transition: opacity 250ms ease, transform 250ms ease;
}

.toast-note.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast-note.is-error {
    border-color: rgba(255, 255, 255, 0.2);
    background: #7A2E24;
    color: #FFFFFF;
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-hero {
        height: 460px;
        min-height: 0;
        width: min(100%, 440px);
        margin-right: auto;
        margin-left: auto;
    }

    .floating-note {
        position: static;
        margin-top: 1rem;
    }

    .cart-row {
        grid-template-columns: 68px 1fr;
    }

    .cart-thumb {
        height: 68px;
        width: 68px;
    }

    .cart-row > p:last-child {
        grid-column: 2 / 3;
        text-align: left;
    }
}

.admin-access-trigger {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(10, 25, 41, 0.92);
    padding: 0.7rem 1.15rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    transition: border-color 300ms ease, color 300ms ease;
}

.admin-access-trigger:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 10, 18, 0.78);
    padding: 1.25rem;
    backdrop-filter: blur(6px);
}

.admin-modal.is-open {
    display: flex;
}

.admin-modal-card {
    display: flex;
    max-height: min(88vh, 720px);
    width: min(100%, 44rem);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding: 1.1rem 1.4rem;
}

.admin-modal-body {
    overflow-y: auto;
    padding: 1.4rem;
}

.admin-close {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    color: var(--text-color);
    transition: border-color 300ms ease;
}

.admin-close:hover {
    border-color: var(--accent-color);
}

.admin-question {
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.1rem;
}

.admin-question + .admin-question {
    margin-top: 0.9rem;
}

.admin-question-text {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.admin-question-meta {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.admin-flag {
    display: inline-block;
    margin-left: 0.5rem;
    border-radius: 999px;
    background: var(--sage-soft);
    padding: 0.15rem 0.55rem;
    color: var(--accent-color);
    letter-spacing: 0.1em;
}

.admin-answer-field {
    margin-top: 0.9rem;
}

.admin-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

@media (max-width: 640px) {
    .admin-access-trigger {
        right: 0.7rem;
        bottom: 0.7rem;
        min-height: 2.1rem;
        gap: 0.35rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.6rem;
        letter-spacing: 0.03em;
    }

    .admin-access-trigger i {
        font-size: 0.7rem;
    }

    .admin-modal {
        padding: 0.6rem;
    }

    .admin-modal-card {
        border-radius: 1.2rem;
    }

    .admin-modal-head {
        padding: 0.85rem 1rem;
    }

    .admin-modal-body {
        padding: 0.9rem;
    }
}

/* En el celular: tarjetas mas compactas, textos mas chicos y con aire */
@media (max-width: 767px) {
    .product-body {
        padding: 0.7rem 0.7rem 0.85rem;
    }

    .product-brand {
        font-size: 0.5rem;
        letter-spacing: 0.06em;
        line-height: 1.4;
    }

    .product-name {
        margin-top: 0.3rem;
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .price-tag {
        margin-top: 0.35rem;
        font-size: 0.85rem;
    }

    .product-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.18rem 0.45rem;
        font-size: 0.46rem;
        letter-spacing: 0.06em;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.4rem;
        padding-top: 0.75rem;
    }

    .product-actions .btn {
        width: 100%;
        min-height: 2.2rem;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        font-size: 0.63rem;
    }

    #catalogGrid {
        gap: 0.6rem;
    }

    .catalog-status,
    #catalogStatus {
        font-size: 0.75rem;
    }
}

/* En el celular: todo un poco mas chico para que no se vea gigante ni amontonado */
@media (max-width: 767px) {
    html {
        font-size: 90%;
        scroll-padding-top: 108px;
    }

    .section-pad {
        padding-top: 2.6rem;
        padding-bottom: 2.6rem;
    }

    .section-kicker {
        font-size: 0.58rem;
        letter-spacing: 0.16em;
    }

    .glass-panel {
        border-radius: 1.25rem;
    }

    main h1 {
        font-size: 1.7rem !important;
        line-height: 1.18 !important;
    }

    main h2 {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
    }

    main h3 {
        font-size: 1rem !important;
    }

    main .btn {
        min-height: 2.4rem;
        padding-right: 1rem;
        padding-left: 1rem;
        font-size: 0.76rem;
    }

    .field-input {
        padding: 0.68rem 0.9rem;
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .toast-note {
        bottom: 1.1rem;
        padding: 0.65rem 1.1rem;
        font-size: 0.75rem;
    }
}