﻿/* =========================================================
   BANNERS
========================================================= */

.banners-header {
    margin-bottom: 28px;
}

.banners-description {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   ALERTAS
========================================================= */

.admin-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 16px;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    font-size: 12px;
}

.admin-alert-success {
    background: var(--admin-success-bg);
    color: var(--admin-success);
}

.admin-alert-error {
    background: #f8e9e9;
    color: var(--admin-danger);
}


/* =========================================================
   CONFIGURACIÓN GLOBAL
========================================================= */

.banner-settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 42px;
    padding: 22px 24px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    box-shadow: var(--admin-shadow);
}

.banner-settings-copy {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.banner-settings-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--admin-panel-soft);
    color: var(--admin-ink);
}

    .banner-settings-icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.banner-settings-label {
    display: block;
    margin-bottom: 4px;
    color: var(--admin-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.banner-settings-copy strong {
    display: block;
    color: var(--admin-ink);
    font-size: 13px;
    font-weight: 700;
}

.banner-settings-copy p {
    margin: 5px 0 0;
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   SWITCH
========================================================= */

.banner-toggle-form {
    flex: 0 0 auto;
}

.banner-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
}

.banner-toggle-track {
    position: relative;
    width: 46px;
    height: 26px;
    display: block;
    border-radius: 99px;
    background: #d9d2cc;
    transition: background .2s ease;
}

.banner-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(35, 28, 25, .16);
    transition: transform .2s ease;
}

.banner-toggle.is-on .banner-toggle-track {
    background: var(--admin-accent);
}

.banner-toggle.is-on .banner-toggle-thumb {
    transform: translateX(20px);
}

.banner-toggle-text {
    min-width: 45px;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
}


/* =========================================================
   CABECERA DEL LISTADO
========================================================= */

.banners-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 18px;
}

    .banners-list-header .admin-eyebrow {
        margin-bottom: 6px;
    }

    .banners-list-header h2 {
        margin: 0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 25px;
        font-weight: 400;
    }

.banners-order-note {
    color: var(--admin-muted);
    font-size: 10px;
}


/* =========================================================
   GRID
========================================================= */

.banners-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}


/* =========================================================
   CARD
========================================================= */

.banner-card {
    overflow: hidden;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    box-shadow: var(--admin-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .banner-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 45px rgba(50, 40, 35, .09);
    }

    .banner-card.is-inactive {
        opacity: .68;
    }


/* =========================================================
   IMAGEN
========================================================= */

.banner-card-image {
    position: relative;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #eee9e4;
}

    .banner-card-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.banner-order {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 253, 251, .92);
    color: var(--admin-ink);
    font-size: 9px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.banner-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.status-active {
    background: rgba(237, 244, 239, .94);
    color: var(--admin-success);
}

.status-inactive {
    background: rgba(248, 233, 233, .94);
    color: var(--admin-danger);
}


/* =========================================================
   CUERPO
========================================================= */

.banner-card-body {
    padding: 20px;
}

.banner-card-title-row h3 {
    margin: 0;
    color: var(--admin-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 400;
}

.banner-link,
.banner-no-link {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.banner-link {
    color: #796b63;
}

.banner-card-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-line);
}

    .banner-card-meta div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .banner-card-meta span {
        color: var(--admin-muted);
        font-size: 8px;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .banner-card-meta strong {
        color: var(--admin-ink);
        font-size: 11px;
        font-weight: 600;
    }


/* =========================================================
   ACCIONES
========================================================= */

.banner-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

    .banner-card-actions form {
        margin: 0;
    }

    .banner-card-actions .admin-button {
        min-height: 38px;
        padding: 0 14px;
        font-size: 9px;
    }

.banner-action-button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--admin-line);
    border-radius: 9px;
    background: var(--admin-panel);
    color: var(--admin-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: .2s ease;
}

    .banner-action-button:hover {
        background: var(--admin-panel-soft);
        color: var(--admin-ink);
    }

.banner-delete-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-left: auto;
    padding: 0;
    border: 1px solid #ead7d5;
    border-radius: 9px;
    background: #fffafa;
    color: var(--admin-danger);
    cursor: pointer;
    transition: .2s ease;
}

    .banner-delete-button:hover {
        background: #f8e9e9;
    }

    .banner-delete-button svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }


/* =========================================================
   VACÍO
========================================================= */

.banners-empty {
    padding: 75px 25px;
    border: 1px dashed #d9cec6;
    border-radius: var(--admin-radius);
    background: rgba(255, 253, 251, .55);
    text-align: center;
}

.banners-empty-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--admin-panel-soft);
    color: var(--admin-muted);
}

    .banners-empty-icon svg {
        width: 25px;
        height: 25px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.banners-empty h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
}

.banners-empty p {
    max-width: 470px;
    margin: 0 auto 22px;
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .banners-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .banner-settings-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .banner-toggle-form {
        width: 100%;
    }

    .banner-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .banners-list-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .banner-card-actions {
        flex-wrap: wrap;
    }

        .banner-card-actions .admin-button,
        .banner-action-button {
            flex: 1;
        }

    .banner-delete-button {
        margin-left: 0;
    }
}

/* =========================================================
   FORMULARIO DE BANNERS
========================================================= */

.banner-form-page {
    max-width: 1100px;
    margin: 0 auto;
}

.banner-form-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

    .banner-form-header h1 {
        margin: 7px 0 0;
        color: var(--admin-ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 32px;
        font-weight: 400;
        line-height: 1.15;
    }

    .banner-form-header p {
        margin: 10px 0 0;
        color: var(--admin-muted);
        font-size: 12px;
        line-height: 1.6;
    }


/* =========================================================
   TARJETAS
========================================================= */

.banner-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.banner-form-card {
    padding: 28px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    box-shadow: var(--admin-shadow);
}

.banner-form-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 26px;
}

    .banner-form-card-heading > span {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        display: grid;
        place-items: center;
        border: 1px solid var(--admin-line);
        border-radius: 50%;
        color: var(--admin-muted);
        font-size: 9px;
        font-weight: 700;
    }

    .banner-form-card-heading h2 {
        margin: 0;
        color: var(--admin-ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 21px;
        font-weight: 400;
    }

    .banner-form-card-heading p {
        margin: 5px 0 0;
        color: var(--admin-muted);
        font-size: 11px;
    }


/* =========================================================
   CAMPOS
========================================================= */

.banner-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.banner-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.banner-field-full {
    grid-column: 1 / -1;
}

.banner-field label {
    color: var(--admin-ink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.banner-field input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 13px;
    border: 1px solid var(--admin-line);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--admin-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .banner-field input:focus {
        border-color: #b9ada5;
        box-shadow: 0 0 0 3px rgba(70, 57, 50, .05);
    }

.banner-field small {
    color: var(--admin-muted);
    font-size: 9px;
    line-height: 1.5;
}

.banner-validation {
    color: #a34d4d;
    font-size: 9px;
}


/* =========================================================
   SUBIDA DE IMÁGENES
========================================================= */

.banner-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.banner-upload-box {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--admin-line);
    border-radius: 13px;
    background: #fcfaf8;
}

.banner-upload-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}

    .banner-upload-heading strong {
        display: block;
        color: var(--admin-ink);
        font-size: 11px;
        font-weight: 700;
    }

    .banner-upload-heading span {
        display: inline-block;
        margin-top: 4px;
        color: var(--admin-success);
        font-size: 8px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

        .banner-upload-heading span.optional {
            color: var(--admin-muted);
        }


/* =========================================================
   INPUT FILE
========================================================= */

.banner-file-label {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 25px;
    border: 1px dashed #cfc4bc;
    border-radius: 10px;
    background: #fff;
    color: var(--admin-ink);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

    .banner-file-label:hover {
        border-color: #9e9188;
        background: #fdfbf9;
    }

    .banner-file-label input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

.banner-file-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--admin-panel-soft);
    color: var(--admin-ink);
}

    .banner-file-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.banner-file-label > strong {
    font-size: 11px;
    font-weight: 700;
}

.banner-file-label > small {
    margin-top: 6px;
    color: var(--admin-muted);
    font-size: 9px;
}


/* =========================================================
   PREVISUALIZACIÓN
========================================================= */

.banner-upload-preview {
    position: relative;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 9px;
    background: #eee9e4;
}

    .banner-upload-preview img {
        display: block;
        width: 100%;
        max-height: 230px;
        object-fit: contain;
        background: #eee9e4;
    }


/* =========================================================
   CHECKBOX / ESTADO
========================================================= */

.banner-checkbox {
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
}

    .banner-checkbox input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.banner-checkbox-box {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border: 1px solid #cfc5be;
    border-radius: 7px;
    background: #fff;
    color: #fff;
    transition: background .2s ease, border-color .2s ease;
}

    .banner-checkbox-box svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0;
    }

.banner-checkbox input:checked + .banner-checkbox-box {
    border-color: var(--admin-accent);
    background: var(--admin-accent);
}

    .banner-checkbox input:checked + .banner-checkbox-box svg {
        opacity: 1;
    }

.banner-checkbox > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-checkbox strong {
    color: var(--admin-ink);
    font-size: 11px;
}

.banner-checkbox small {
    color: var(--admin-muted);
    font-size: 9px;
}


/* =========================================================
   BOTONES
========================================================= */

.banner-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 5px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 800px) {

    .banner-form-header {
        align-items: flex-start;
        flex-direction: column;
    }

        .banner-form-header .admin-button {
            width: 100%;
        }

    .banner-form-card {
        padding: 22px;
    }

    .banner-upload-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .banner-form-header h1 {
        font-size: 28px;
    }

    .banner-form-grid {
        grid-template-columns: 1fr;
    }

    .banner-field-full {
        grid-column: auto;
    }

    .banner-form-actions {
        flex-direction: column-reverse;
    }

        .banner-form-actions .admin-button {
            width: 100%;
        }
}
/* =========================================================
   BANNER PRINCIPAL
   ========================================================= */

/* BANNER PRINCIPAL: ANCHO COMPLETO DE PANTALLA */

.home-banner {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    margin-bottom: 58px;
    padding: 0;
    overflow: hidden;
    background: #f7f5f2;
}

.home-banner-track {
    display: flex;
    width: 100%;
    transition: transform .65s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.home-banner-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
}

    .home-banner-slide picture,
    .home-banner-link {
        display: block;
        width: 100%;
    }

    .home-banner-slide img {
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
    }

@media (max-width: 767px) {
    .home-banner {
        margin-bottom: 34px;
    }

    .home-banner-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}
