/**
 * ============================================
 * ID: CSS-GALLERY-001 | Estilos de la galeria de disenos
 * Descripcion: Grid de tarjetas de disenos predefinidos
 * Archivo: diseños-recomendados/styles.css (COPIADO EXACTO DE design-gallery.css)
 * ============================================
 */

/* ============================================
   ID: HOME-STYLE-001 | Seccion Hero
   ============================================ */
.hero {
    padding: var(--space-6) 0;
    background-color: var(--color-background);
}

/* ============================================
   ID: HOME-STYLE-002 | Contenedor del hero
   ============================================ */
.hero__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   ID: CAROUSEL-STYLE-001 | Carrusel principal
   ============================================ */
.carousel {
    position: relative;
    width: 100%;
    margin-bottom: var(--space-8);
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    box-shadow: var(--shadow-md);
}

/* ============================================
   ID: CAROUSEL-STYLE-002 | Contenedor de slides
   ============================================ */
.carousel__slides {
    position: relative;
    width: 100%;
    height: 410px;
}

/* ============================================
   ID: CAROUSEL-STYLE-003 | Slide individual
   ============================================ */
.carousel__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel__slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    z-index: 0;
}

/* ============================================
   ID: CAROUSEL-STYLE-004 | Slide activo
   ============================================ */
.carousel__slide--active,
.carousel__slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Container de slides - swipe/drag */
.carousel__slides {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}

.carousel__slides:active {
    cursor: grabbing;
}

/* Imagen del slide */
.carousel__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Caption del slide */
.carousel__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-6);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    z-index: 1;
}

.carousel__caption h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
}

.carousel__caption p {
    font-size: var(--font-size-base);
    opacity: 0.9;
}

/* ============================================
   ID: CAROUSEL-STYLE-005 | Contenido del slide
   ============================================ */
.carousel__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: var(--space-6);
    max-width: 800px;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   ID: CAROUSEL-STYLE-006 | Titulo del slide
   ============================================ */
.carousel__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ID: CAROUSEL-STYLE-007 | Texto del slide
   ============================================ */
.carousel__text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ID: CAROUSEL-STYLE-008 | Indicadores (dots)
   ============================================ */
.carousel__indicators {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 2;
}

/* ============================================
   ID: CAROUSEL-STYLE-009 | Dot individual
   ============================================ */
.carousel__dot,
.carousel__indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel__dot:hover,
.carousel__indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* ============================================
   ID: CAROUSEL-STYLE-010 | Dot activo
   ============================================ */
.carousel__dot--active,
.carousel__indicator.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Carousel Loading State
   ============================================ */
.carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-lg);
    color: var(--color-neutral-500);
}

.carousel-loading p {
    margin: 0;
}

/* ============================================
   ID: GALLERY-STYLE-001 | Contenedor de la galeria
   ============================================ */
.design-gallery {
    padding: var(--space-8) 0 var(--space-12);
    background-color: var(--color-background);
}

/* ============================================
   ID: GALLERY-STYLE-002 | Contenedor interno
   ============================================ */
.design-gallery__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   ID: GALLERY-STYLE-002B | Titulo de la seccion
   ============================================ */
.design-gallery__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
}

/* ============================================
   ID: GALLERY-STYLE-003 | Grid de disenos
   ============================================ */
.design-gallery__grid {
    --columns: 4; /* Valor por defecto, se puede sobrescribir con JS */
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: var(--space-4);
}

/* Grid en tablet */
@media (max-width: 1024px) {
    .design-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Grid en móvil */
@media (max-width: 768px) {
    .design-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
}

@media (max-width: 400px) {
    .design-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
}

/* ============================================
   ID: GALLERY-STYLE-004 | Tarjeta de diseno
   ============================================ */
.design-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.design-card:hover {
    transform: translateY(-2px);
}

.design-card:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 4px;
    border-radius: var(--border-radius-md);
}

/* ============================================
   ID: GALLERY-STYLE-005 | Preview de la tarjeta
   ============================================ */
.design-card__preview {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--color-neutral-200);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.design-card:hover .design-card__preview {
    box-shadow: var(--shadow-md);
}

/* ============================================
   ID: GALLERY-STYLE-005C | Skeleton loading
   ============================================ */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.design-card--skeleton {
    pointer-events: none;
    animation: none;
    gap: var(--space-2);
}

.design-card--skeleton .design-card__preview {
    background: linear-gradient(90deg, var(--color-neutral-200) 25%, var(--color-neutral-100) 37%, var(--color-neutral-200) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-block,
.skeleton-line {
    display: block;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(90deg, var(--color-neutral-200) 25%, var(--color-neutral-100) 37%, var(--color-neutral-200) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-line {
    height: 12px;
}

.skeleton-line--title {
    width: 60%;
    height: 14px;
}

.skeleton-line--price {
    width: 25%;
    height: 14px;
}

.skeleton-line--desc {
    width: 80%;
    height: 10px;
}

/* ============================================
   ID: GALLERY-STYLE-005B | Overlay de personalización
   ============================================ */
.design-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.design-card__action {
    color: white;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mostrar overlay en hover (desktop) */
.design-card:hover .design-card__overlay {
    opacity: 1;
}

/* Mostrar overlay en active/touch (mobile) */
.design-card:active .design-card__overlay {
    opacity: 1;
}

/* ============================================
   ID: GALLERY-STYLE-006 | Info de la tarjeta (nombre y precio)
   ============================================ */
.design-card__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.design-card__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-card__price {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary-500);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   ID: GALLERY-STYLE-006B | Descripción del diseño
   ============================================ */
.design-card__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-top: -4px;
}

/* ============================================
   ID: GALLERY-STYLE-006C | Badges de categoría
   ============================================ */
.design-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.design-card__badge--new {
    background-color: #10B981;
    color: white;
}

.design-card__badge--sale {
    background: linear-gradient(135deg, #ff0844 0%, #ff006e 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(255, 8, 68, 0.6);
}

.design-card__badge--popular {
    background: linear-gradient(135deg, #00ef28 0%, #1be318 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 239, 40, 0.6);
}

.design-card__badge--exclusive {
    background: linear-gradient(135deg, #c026d3 0%, #e100ff 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(225, 0, 255, 0.6);
}

.design-card__badge--new {
    background: linear-gradient(135deg, #ffea00 0%, #ffa600 100%);
    color: #1F2937;
    box-shadow: 0 3px 12px rgba(255, 234, 0, 0.6);
    font-weight: 600;
}

/* ============================================
   ID: GALLERY-STYLE-007 | Responsive - Mobile
   ============================================ */
@media (max-width: 639px) {
    .design-gallery {
        padding: var(--space-6) 0 var(--space-8);
    }
    
    .design-gallery__container {
        padding: 0 var(--space-4);
    }
    
    .design-gallery__title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-4);
    }
    
    .design-card__preview {
        border-radius: var(--border-radius-sm);
    }
    
    .design-card__title {
        font-size: 13px;
    }
    
    .design-card__price {
        font-size: 13px;
    }
    
    .design-card__desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .design-gallery__container {
        padding: 0 var(--space-3);
    }
    
    .design-gallery__title {
        font-size: var(--font-size-base);
    }
    
    .design-card__info {
        gap: var(--space-2);
    }
    
    .design-card__title {
        font-size: 12px;
    }
    
    .design-card__price {
        font-size: 12px;
    }
    
    .design-card__badge {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* ============================================
   ID: GALLERY-STYLE-008 | Responsive - Tablet
   ============================================ */
@media (min-width: 640px) {
    .design-gallery__grid {
        gap: var(--space-6);
    }
}

/* ============================================
   ID: GALLERY-STYLE-009 | Responsive - Desktop
   ============================================ */
@media (min-width: 1024px) {
    .design-gallery {
        padding: var(--space-12) 0 var(--space-16);
    }
    
    .design-gallery__grid {
        gap: var(--space-8);
    }
    
    .design-card__title {
        font-size: var(--font-size-base);
    }
}

/* ============================================
   Page Designs Loading State
   ============================================ */
.page-designs__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-lg);
    color: var(--color-neutral-500);
}

.page-designs__loading p {
    margin: 0;
}

/* ============================================
   ID: HOME-STYLE-003 | Responsive - Mobile
   ============================================ */
@media (max-width: 767px) {
    .hero {
        padding: var(--space-4) 0;
    }
    
    .hero__container {
        padding: 0 var(--space-3);
    }
    
    .carousel {
        margin-bottom: var(--space-6);
        border-radius: var(--border-radius-md);
    }
    
    .carousel__slides {
        height: 162px;
    }
    
    /* Imagen 1140x400 completa visible en mobile */
    .carousel__image {
        object-fit: contain;
        object-position: center center;
    }
    
    .carousel__caption {
        padding: var(--space-3);
    }
    
    .carousel__caption h3 {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-1);
    }
    
    .carousel__caption p {
        font-size: var(--font-size-xs);
    }
    
    .carousel__content {
        padding: var(--space-4);
    }
    
    .carousel__title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-3);
    }
    
    .carousel__text {
        font-size: var(--font-size-sm);
    }
    
    .carousel__indicators {
        bottom: var(--space-3);
    }
    
    .carousel__dot {
        width: 8px;
        height: 8px;
    }
    
    .carousel__dot--active {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .hero__container {
        padding: 0 var(--space-2);
    }
    
    .carousel__slides {
        height: 146px;
    }
    
    /* Imagen 1140x400 completa visible en pantallas pequeñas */
    .carousel__image {
        object-fit: contain;
        object-position: center center;
    }
    
    .carousel__content {
        padding: var(--space-3);
    }
    
    .carousel__title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-2);
    }
    
    .carousel__text {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   ID: HOME-STYLE-004 | Responsive - Tablet
   ============================================ */
@media (min-width: 768px) {
    .hero {
        padding: var(--space-8) 0;
    }
    
    .carousel__slides {
        height: 258px;
    }
    
    /* Imágenes 16:9 cubren completamente el espacio en tablet */
    .carousel__image {
        object-fit: cover;
        object-position: center center;
    }
    
    .carousel__title {
        font-size: var(--font-size-4xl);
    }
}

/* ============================================
   ID: HOME-STYLE-005 | Responsive - Desktop
   ============================================ */
@media (min-width: 1024px) {
    .hero {
        padding: var(--space-10) 0;
    }
    
    .carousel__slides {
        height: 400px;
    }
    
    .carousel__title {
        font-size: 3.5rem;
    }
    
    .carousel__text {
        font-size: var(--font-size-xl);
    }
}
