﻿/* Estilos generales */
.subscription-container {
    font-family: 'Poppins', sans-serif;
    padding: 2rem 0;
    background-color: #f8f9fa;
    min-height: 100vh;
    position: relative;
}

/* Encabezado */
.subscription-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.title-gradient {
    font-weight: 600;
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.badge-year {
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8em;
    vertical-align: middle;
}

.subtitle {
    color: #6c757d;
    font-weight: 300;
}

/* Tarjetas principales */
.catalog-card, .summary-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Panel de selección FIJO */
.summary-fixed {
    position: fixed;
    right: 0px;
    top: 215px; /* Ajustado para alinear con el catálogo */
    width: 32%;
    max-width: 100%;
    z-index: 1030;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.summary-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    flex-shrink: 0;
}

    .card-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 500;
    }

    .card-header i {
        margin-right: 0.5rem;
    }

/* Contenido del resumen */
.summary-content {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

.summary-items {
    min-height: 100%;
}

.summary-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

/* Buscador */
.search-box {
    position: relative;
    width: 250px;
}

    .search-box i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
    }

    .search-box input {
        padding-left: 35px;
        border-radius: 20px;
        border: 1px solid #ddd;
        height: 38px;
    }

/* Items del catálogo (desktop) */
.catalog-items {
    padding: 1rem;
}

.desktop-view .catalog-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.3s ease;
}

    .desktop-view .catalog-item:hover {
        background-color: #f9f9f9;
    }

.item-image {
    width: 80px;
    height: 100px;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

.item-details {
    flex-grow: 1;
}

    .item-details h4 {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

.item-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0;
}

.price-tag {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.item-actions {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.btn-quantity {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    transition: all 0.2s ease;
}

    .btn-quantity:hover {
        background-color: #f1f1f1;
    }

.item-actions input {
    width: 50px;
    text-align: center;
    margin: 0 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Items del catálogo (móvil) */
.mobile-view .mobile-catalog-item {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
}

.mobile-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

    .mobile-item-header img {
        width: 60px;
        height: 80px;
        object-fit: cover;
        border-radius: 4px;
        margin-right: 1rem;
    }

    .mobile-item-header h5 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

.mobile-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.mobile-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .mobile-actions .btn-quantity {
        margin: 0 0.5rem;
    }

/* Resumen de compra */
.summary-items table {
    margin-bottom: 1.5rem;
    width: 100%;
}

.summary-items th {
    font-weight: 500;
    color: #495057;
    border-top: none;
    position: sticky;
    top: 0;
    background: white;
}

.summary-items td {
    vertical-align: middle;
}

.quantity-cell {
    font-weight: 500;
    color: #4CAF50;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.total-label {
    font-weight: 500;
    font-size: 1.1rem;
}

.total-amount {
    font-weight: 600;
    font-size: 1.25rem;
    color: #2c3e50;
}

.btn-next {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: white;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .btn-next:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }

    .btn-next:disabled {
        background: #cccccc;
        transform: none;
        box-shadow: none;
    }

    .btn-next i {
        margin-left: 0.5rem;
    }

/* Estado inactivo */
.inactive-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.inactive-card {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.inactive-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1.5rem;
}

    .inactive-icon i {
        width: 80px;
        height: 80px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.inactive-message {
    color: #6c757d;
    margin: 1.5rem 0;
    line-height: 1.6;
}

.btn-home {
    background: #2c3e50;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

    .btn-home:hover {
        background: #1a252f;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* Responsive */

@media (max-width: 991.98px) {
    .subscription-header {
        margin-bottom: 1.5rem;
    }

    .search-box {
        width: 100%;
        margin-top: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-fixed {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        max-width: none;
        margin-top: 2rem;
        height: auto;
        z-index: 1;
    }

    .summary-content {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .title-gradient {
        font-size: 1.75rem;
    }

    .inactive-card {
        padding: 1.5rem;
    }
}
