/* Componentes de lectura para imágenes de producto y logotipos. */
.df-product-image,
.df-brand-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
    background: var(--card-light, #f8f9fa);
    border: 1px solid var(--border-light, rgba(0, 0, 0, .08));
    border-radius: 12px;
}

.df-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.df-product-image-photo,
.df-brand-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.df-product-image-photo {
    padding: 8px;
}

.df-brand-logo {
    width: 100%;
    max-width: 220px;
    height: 112px;
    padding: 8px;
}

.df-brand-logo-nav {
    width: 104px;
    height: 42px;
    margin-right: .5rem;
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .96);
}

.df-image-preview .df-brand-logo-input {
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.df-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
    height: 100%;
    padding: .5rem;
    color: var(--text-light, #6c757d);
    text-align: center;
    font-size: .78rem;
}

.df-media-placeholder > i {
    color: var(--color-primary, #088A88);
    font-size: 1.35rem;
}

.df-brand-logo-nav .df-media-placeholder {
    flex-direction: row;
    font-size: .65rem;
}

.df-product-image.is-unavailable .df-product-image-photo,
.df-brand-logo.is-unavailable .df-brand-logo-image {
    display: none;
}

.df-product-image.is-unavailable::after,
.df-brand-logo.is-unavailable::after {
    position: absolute;
    content: "Imagen no disponible";
    padding: .5rem;
    color: var(--text-light, #6c757d);
    font-size: .78rem;
    text-align: center;
}

.df-product-image.is-unavailable::before,
.df-brand-logo.is-unavailable::before {
    position: absolute;
    content: "\f03e";
    top: calc(50% - 1.25rem);
    left: calc(50% - .7rem);
    color: var(--color-primary, #088A88);
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
    font-size: 1.35rem;
    font-weight: 900;
}

body.dark-mode .df-product-image,
body.dark-mode .df-brand-logo {
    background: var(--card-dark, #1e293b);
    border-color: var(--border-dark, #334155);
}

body.dark-mode .df-media-placeholder,
body.dark-mode .df-product-image.is-unavailable::after,
body.dark-mode .df-brand-logo.is-unavailable::after {
    color: var(--text-dark, #f1f5f9);
}

@media (max-width: 576px) {
    .df-brand-logo {
        max-width: 180px;
        height: 96px;
    }

    .df-brand-logo-nav {
        width: 88px;
        height: 38px;
    }
}
