/* ========================================
   CATÁLOGO - ESTILO ÁLBUM DE FOTOS
   Diseño inspirado en álbumes profesionales
======================================== */

/* ========== TARJETAS DE CATEGORÍAS ========== */
.filters-section {
    padding: 0 0 2rem;
    overflow: visible;
}

.filters-section .container {
    overflow: visible;
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2.5rem 2rem;
    padding: 25px;
    overflow: visible;
}

.category-card-btn {
    position: relative;
    display: block;
    background: var(--color-bg-card);
    border: none;
    border-radius: 12px;
    overflow: visible;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.category-card-btn:hover {
    transform: translateY(-6px);
}

.category-card-btn.active .stack-layer:nth-child(3) {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent), 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Stack de imágenes animado simulando álbum */
.card-image-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Capas del stack */
.stack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-card);
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

/* Posiciones iniciales de las capas - MUY VISIBLE */
.stack-layer:nth-child(1) {
    z-index: 1;
    transform: translateX(-15px) translateY(-10px) rotate(-8deg);
}

.stack-layer:nth-child(2) {
    z-index: 2;
    transform: translateX(12px) translateY(-6px) rotate(6deg);
}

.stack-layer:nth-child(3) {
    z-index: 3;
    transform: translateX(0) translateY(0) rotate(0deg);
}

/* Efecto hover - Las capas se separan dramaticamente */
.category-card-btn:hover .stack-layer:nth-child(1) {
    transform: translateX(-25px) translateY(-18px) rotate(-12deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.category-card-btn:hover .stack-layer:nth-child(2) {
    transform: translateX(22px) translateY(-12px) rotate(10deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.category-card-btn:hover .stack-layer:nth-child(3) {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Imágenes dentro de las capas */
.stack-layer img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 1;
}

.category-card-btn:hover .stack-layer:nth-child(3) img {
    transform: scale(1.08);
}

/* Fallback para 1 imagen */
.card-image-stack[data-count="1"] .stack-layer:nth-child(1) {
    z-index: 3;
    transform: translateY(0) scale(1) rotate(0);
}

.category-card-btn:hover .card-image-stack[data-count="1"] .stack-layer:nth-child(1) {
    transform: translateY(-6px) scale(1.02);
}

/* Fallback para 2 imágenes */
.card-image-stack[data-count="2"] .stack-layer:nth-child(1) {
    z-index: 2;
    transform: translateY(-6px) translateX(-8px) rotate(-6deg);
}

.card-image-stack[data-count="2"] .stack-layer:nth-child(2) {
    z-index: 3;
    transform: translateY(0) rotate(0);
}

.category-card-btn:hover .card-image-stack[data-count="2"] .stack-layer:nth-child(1) {
    transform: translateY(-8px) translateX(-12px) rotate(-8deg);
}

.category-card-btn:hover .card-image-stack[data-count="2"] .stack-layer:nth-child(2) {
    transform: translateY(-4px) rotate(1deg) scale(1.02);
}

.card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-muted);
    position: absolute;
    top: 0;
    left: 0;
    background: var(--color-bg-secondary);
}

/* Texto superpuesto sobre la imagen (dentro de stack-layer) */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.8rem 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.3) 70%, transparent 100%);
    border-radius: 0 0 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    z-index: 5;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.card-count {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.category-card-btn.active .card-check {
    opacity: 1;
    transform: scale(1);
}

/* ========== BARRA DE CATEGORÍA SELECCIONADA ========== */
.selected-category-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo animado que recorre el borde */
.selected-category-bar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 100%;
    height: calc(100% + 4px);
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.4) 50%, 
        transparent 100%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Pulso sutil en el fondo */
.selected-category-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: pulse-bg 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.selected-category-bar:hover {
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(99, 102, 241, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

.selected-category-bar:hover::before {
    animation: shimmer-fast 1.5s infinite;
}

@keyframes shimmer-fast {
    0% { left: -100%; }
    100% { left: 100%; }
}

.selected-category-bar:active {
    transform: translateY(-1px) scale(0.99);
}

.selected-category-bar.expanded {
    border-color: var(--color-accent);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.15);
}

.selected-category-bar.expanded::before {
    animation: none;
    opacity: 0;
}

.selected-category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.selected-category-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Anillo animado alrededor del thumb */
.selected-category-thumb::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--color-accent), #a855f7, var(--color-accent)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 0.6; transform: scale(1); }
}

.selected-category-bar:hover .selected-category-thumb {
    border-color: var(--color-accent);
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.selected-category-bar:hover .selected-category-thumb::before {
    opacity: 1;
    animation: ring-spin 3s linear infinite;
}

@keyframes ring-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.selected-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.selected-category-bar:hover .selected-category-thumb img {
    transform: scale(1.1);
}

.selected-category-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.selected-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.selected-category-bar:hover .selected-label {
    color: var(--color-accent);
}

.selected-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    transition: all 0.3s ease;
    position: relative;
}

/* Subrayado animado en el nombre */
.selected-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), #a855f7);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.selected-category-bar:hover .selected-name {
    color: var(--color-accent);
}

.selected-category-bar:hover .selected-name::after {
    width: 100%;
}

/* Hint de cambio - más dinámico */
.change-category-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Efecto de onda al hacer hover */
.change-category-hint::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--color-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    z-index: -1;
}

.selected-category-bar:hover .change-category-hint::before {
    width: 300%;
    height: 300%;
}

.hint-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-accent);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.selected-category-bar:hover .hint-text {
    color: white;
    transform: translateX(-2px);
}

.change-category-hint .chevron-icon {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.selected-category-bar:hover .change-category-hint .chevron-icon {
    color: white;
    animation: bounce-arrow 0.8s ease infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.selected-category-bar.expanded .change-category-hint .chevron-icon {
    transform: rotate(180deg);
    animation: none;
}

.selected-category-bar.expanded:hover .change-category-hint .chevron-icon {
    animation: bounce-arrow-up 0.8s ease infinite;
}

@keyframes bounce-arrow-up {
    0%, 100% { transform: rotate(180deg) translateY(0); }
    50% { transform: rotate(180deg) translateY(3px); }
}

/* Grid colapsado de categorías */
.category-cards-grid.collapsed {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}

.category-cards-grid.collapsed.expanded {
    max-height: 800px;
    opacity: 1;
    margin-top: 1rem;
}

/* ========== FILTROS DE CARACTERÍSTICAS - ACORDEÓN ========== */
.filters-accordion {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.filters-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.filters-accordion-header:hover .accordion-title {
    color: var(--color-accent);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-icon {
    color: var(--color-text-muted);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.accordion-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.active-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.35rem;
    background: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9px;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters-link {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.clear-filters-link:hover {
    color: var(--color-accent);
}

/* Botón compartir por WhatsApp */
.share-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #25D366;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(37, 211, 102, 0.1);
    transition: all 0.2s ease;
}

.share-whatsapp-link:hover {
    background: rgba(37, 211, 102, 0.2);
    color: #1ebe5d;
}

.share-whatsapp-link svg {
    flex-shrink: 0;
}

.share-whatsapp-link span {
    white-space: nowrap;
}

.accordion-chevron {
    color: var(--color-text-muted);
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
    opacity: 0.5;
}

.filters-accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

.filters-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filters-accordion.open .filters-accordion-content {
    max-height: 1000px; /* Suficiente para muchos filtros */
    overflow-y: auto;
}

/* ========== SECCIÓN DE COLORES - MINIMALISTA ========== */
.filters-colors-section {
    padding: 0.75rem 0 0.5rem;
}

.filters-section-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    opacity: 0.6;
    margin-bottom: 0.6rem;
}

.filters-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.color-tag:hover {
    border-color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.color-tag.active {
    border-color: var(--color-accent);
    background: rgba(99, 102, 241, 0.08);
}

.color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.color-name {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.color-tag:hover .color-name {
    color: var(--color-text);
}

.color-tag.active .color-name {
    color: var(--color-text);
    font-weight: 500;
}

.color-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 50%;
    color: white;
    margin-left: 0.1rem;
}

/* ========== LOADING SPINNER ========== */
.album-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-left: 1rem;
}

.album-loading .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.album-grid {
    transition: opacity 0.2s ease;
}

/* ========== OTRAS CARACTERÍSTICAS ========== */
.filters-tags-section {
    padding: 0.5rem 0 0.25rem;
}

.filters-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.25rem 0;
}

.tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    transition: var(--transition);
    cursor: pointer;
}

.tag-btn:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.tag-btn.active {
    color: white;
    background: var(--color-accent);
    border-color: var(--color-accent);
    font-weight: 500;
}

.tag-remove {
    font-size: 0.9rem;
    line-height: 1;
    margin-left: 0.15rem;
    opacity: 0.7;
}

/* ========== ESTADO DE BIENVENIDA - ÁLBUM ========== */
.album-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 50vh;
}

.album-icon {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.4;
    animation: float-gentle 4s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.album-welcome-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.album-welcome-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 3rem;
}

/* Preview apilado de álbumes */
.album-preview-stack {
    position: relative;
    width: 200px;
    height: 150px;
    margin-top: 1rem;
}

.album-preview-item {
    position: absolute;
    width: 160px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(calc(var(--stack-index) * 5deg - 5deg)) translateY(calc(var(--stack-index) * -8px));
    transition: all 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.album-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-preview-stack:hover .album-preview-item {
    transform: translate(-50%, -50%) rotate(calc(var(--stack-index) * 12deg - 12deg)) translateY(calc(var(--stack-index) * -15px));
}

/* ========== ÁLBUM DE FOTOS - GALERÍA ========== */
.gallery-section {
    padding-top: 1rem;
}

.album-container {
    animation: album-enter 0.6s ease-out;
}

@keyframes album-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.album-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.album-count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Foto individual con marco */
.album-photo {
    position: relative;
    cursor: pointer;
    animation: photo-appear 0.5s ease-out both;
    animation-delay: calc(var(--photo-index) * 0.05s);
}

@keyframes photo-appear {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

.photo-frame {
    position: relative;
    background: linear-gradient(145deg, #1e1e2e, #151520);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-photo:hover .photo-frame {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.25),
        0 32px 64px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Rotación alterna para efecto disperso */
.album-photo:nth-child(odd) .photo-frame {
    transform: rotate(-0.5deg);
}

.album-photo:nth-child(even) .photo-frame {
    transform: rotate(0.5deg);
}

.album-photo:nth-child(odd):hover .photo-frame {
    transform: translateY(-8px) rotate(-2deg);
}

.album-photo:nth-child(even):hover .photo-frame {
    transform: translateY(-8px) rotate(2deg);
}

.photo-frame img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: all 0.4s ease;
}

.album-photo:hover .photo-frame img {
    filter: brightness(0.7);
}

/* Nombre sutil de la foto - esquina inferior izquierda */
.photo-name {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.3px;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.album-photo:hover .photo-name {
    opacity: 0.5;
}

/* Overlay con información */
.photo-overlay {
    position: absolute;
    inset: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-photo:hover .photo-overlay {
    opacity: 1;
}

.photo-info {
    align-self: flex-start;
}

.photo-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.photo-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.photo-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 3px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-zoom {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.photo-zoom:hover {
    background: var(--color-accent);
    transform: scale(1.1);
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--color-text-muted);
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 992px) {
    .category-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .card-image-stack {
        height: 80px;
    }
    
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
        padding: 20px 15px;
    }
    
    .category-card-btn {
        aspect-ratio: 4 / 3;
    }
    
    .card-image-stack {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    /* Stack visible en móvil - rotaciones sutiles */
    .stack-layer:nth-child(1) {
        transform: translateX(-8px) translateY(-6px) rotate(-5deg);
    }
    
    .stack-layer:nth-child(2) {
        transform: translateX(6px) translateY(-3px) rotate(4deg);
    }
    
    .stack-layer:nth-child(3) {
        transform: translateX(0) translateY(0) rotate(0);
    }
    
    /* Hover/tap en móvil */
    .category-card-btn:hover .stack-layer:nth-child(1),
    .category-card-btn:active .stack-layer:nth-child(1) {
        transform: translateX(-12px) translateY(-10px) rotate(-8deg);
    }
    
    .category-card-btn:hover .stack-layer:nth-child(2),
    .category-card-btn:active .stack-layer:nth-child(2) {
        transform: translateX(10px) translateY(-6px) rotate(6deg);
    }
    
    .category-card-btn:hover .stack-layer:nth-child(3),
    .category-card-btn:active .stack-layer:nth-child(3) {
        transform: translateY(-4px) scale(1.02);
    }
    
    .card-info {
        padding: 1.8rem 0.6rem 0.6rem;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    }
    
    .card-name {
        font-size: 0.85rem;
        text-shadow: 0 2px 6px rgba(0,0,0,0.9);
    }
    
    .card-count {
        font-size: 0.7rem;
    }
    
    .card-check {
        width: 22px;
        height: 22px;
        top: 8px;
        right: 8px;
    }
    
    .card-check svg {
        width: 12px;
        height: 12px;
    }
    
    /* Barra categoría seleccionada */
    .selected-category-bar {
        padding: 0.7rem 1rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    /* Reducir animaciones en móvil por rendimiento */
    .selected-category-bar::before {
        animation: shimmer 5s infinite;
    }
    
    .selected-category-bar::after {
        animation: none;
        opacity: 0.3;
    }
    
    .selected-category-thumb {
        width: 44px;
        height: 44px;
    }
    
    .selected-category-thumb::before {
        animation: none;
        opacity: 0.4;
    }
    
    .selected-label {
        font-size: 0.6rem;
    }
    
    .selected-name {
        font-size: 0.9rem;
    }
    
    .selected-name::after {
        display: none;
    }
    
    .change-category-hint {
        padding: 0.45rem 0.8rem;
    }
    
    .hint-text {
        font-size: 0.72rem;
    }
    
    .change-category-hint .chevron-icon {
        width: 15px;
        height: 15px;
    }
    
    /* Bienvenida - Oculta en móvil con mayor especificidad */
    .gallery-section .album-welcome,
    .album-welcome.fade-in,
    section .album-welcome {
        display: none !important;
    }
    
    .album-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .album-welcome-title {
        font-size: 1.35rem;
    }
    
    .album-welcome-text {
        font-size: 0.9rem;
    }
    
    .album-preview-stack {
        width: 160px;
        height: 120px;
    }
    
    .album-preview-item {
        width: 130px;
        height: 100px;
    }
    
    /* Galería */
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .photo-frame {
        padding: 5px;
    }
    
    .photo-frame img {
        aspect-ratio: 1/1;
    }
    
    /* Overlay siempre visible en móvil */
    .photo-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
        justify-content: flex-end;
        padding: 0.75rem;
    }
    
    .photo-title {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .photo-tags {
        display: none;
    }
    
    .photo-zoom {
        display: none;
    }
    
    /* Sin rotación en móvil */
    .album-photo:nth-child(odd) .photo-frame,
    .album-photo:nth-child(even) .photo-frame {
        transform: none;
    }
    
    .album-photo:hover .photo-frame {
        transform: none;
    }
    
    /* Acordeón */
    .filters-accordion {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    /* Filtros en tablet/móvil */
    .filters-colors-grid {
        gap: 0.4rem;
    }
    
    .color-tag {
        padding: 0.28rem 0.55rem 0.28rem 0.32rem;
    }
    
    .color-name {
        font-size: 0.72rem;
    }
    
    .filters-tags-grid {
        gap: 0.35rem;
    }
    
    .tag-btn {
        padding: 0.32rem 0.65rem;
        font-size: 0.75rem;
    }
}

/* ========== RESPONSIVE - MOBILE SMALL ========== */
@media (max-width: 480px) {
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem 1rem;
        padding: 15px 10px;
    }
    
    .category-card-btn {
        aspect-ratio: 4 / 3;
    }
    
    .card-image-stack {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    /* Stack más sutil en móvil pequeño */
    .stack-layer:nth-child(1) {
        transform: translateX(-6px) translateY(-5px) rotate(-4deg);
    }
    
    .stack-layer:nth-child(2) {
        transform: translateX(5px) translateY(-2px) rotate(3deg);
    }
    
    .card-info {
        padding: 1.3rem 0.5rem 0.5rem;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.75) 50%, transparent 100%);
    }
    
    .card-name {
        font-size: 0.75rem;
        text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    }
    
    .card-count {
        font-size: 0.62rem;
    }
    
    .album-grid {
        gap: 0.5rem;
    }
    
    .photo-frame {
        padding: 4px;
        border-radius: 3px;
    }
    
    .photo-title {
        font-size: 0.72rem;
    }
    
    /* Filtros en móvil pequeño */
    .filters-colors-grid {
        gap: 0.35rem;
    }
    
    .color-tag {
        padding: 0.25rem 0.5rem 0.25rem 0.3rem;
        gap: 0.3rem;
    }
    
    .color-swatch {
        width: 12px;
        height: 12px;
    }
    
    .color-name {
        font-size: 0.7rem;
    }
    
    .filters-tags-grid {
        gap: 0.3rem;
    }
    
    .tag-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.72rem;
    }
    
    .filters-section-label {
        font-size: 0.6rem;
        margin-bottom: 0.5rem;
    }
}

/* ========== ANIMACIONES ADICIONALES ========== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.category-card-btn.loading .card-image-stack {
    background: linear-gradient(90deg, 
        var(--color-bg-secondary) 0%, 
        var(--color-bg-card) 50%, 
        var(--color-bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
/* ========== VIDEO SUPPORT ========== */
.album-photo.is-video .photo-frame {
    position: relative;
}

.album-photo.is-video video,
.gallery-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.video-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3;
    pointer-events: none;
    transition: all 0.3s ease;
}

.video-play-badge svg {
    margin-left: 3px; /* Centrado visual del play */
}

.album-photo.is-video:hover .video-play-badge {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Lightbox video styles */
#lightbox-video {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
}

/* Responsive video badge */
@media (max-width: 480px) {
    .video-play-badge {
        width: 36px;
        height: 36px;
    }
    
    .video-play-badge svg {
        width: 18px;
        height: 18px;
    }
}