/* --- Galería Vertical de Pasteles --- */
.cake-gallery-section {
    padding: 4rem 1rem;
    background-color: #fcf9f2;
    /* Color crema suave del index */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gallery-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.gallery-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery-card-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-gallery-select {
    width: 100%;
    padding: 0.8rem;
    background: var(--secondary);
    /* Usualmente rosado/magenta */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
}

.btn-gallery-select:hover {
    background: #d64d79;
    /* Un tono más oscuro de secondary para hover */
}


/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    background: var(--primary);
    /* Morado Lilian */
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    /* Para que sea scrolleable en pantallas pequeñas if needed */
}

.modal-product-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 12px;
}

.modal-product-info #modal-cake-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.modal-form .form-group {
    margin-bottom: 1.2rem;
}

.modal-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #444;
    font-size: 0.95rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #fcf9f2;
    border-top: 1px solid #eee;
}