/* Paint Theme - Professional White & Gold Overrides */

:root {
    --theme-background: #f7f5ef;
    --theme-panel: #ffffff;
    --theme-ink: #1f2933;
    --theme-muted: #4b5563;
    --theme-soft-text: #6b7280;
    --theme-gold: #d4af37;
    --theme-gold-dark: #b58a0a;
    --theme-gold-light: #f2d88a;
    --theme-border: #e5dec6;
    --theme-shadow-soft: 0 10px 30px rgba(31, 41, 51, 0.08);
    --theme-shadow-strong: 0 20px 45px rgba(31, 41, 51, 0.15);
}

body {
    position: relative;
    color: var(--theme-ink);
    font-family: 'Poppins', Arial, sans-serif !important;
    background: transparent !important;
    overflow-x: hidden;
}

/* Brand */
.logo h2 {
    font-family: 'Playfair Display', serif !important;
    color: var(--theme-ink) !important;
    background: none !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo h2::after {
    content: none;
}

/* Logo header - Responsive sizes */
.logo-header {
    width: auto;
    height: clamp(48px, 8vw, 80px);
    max-width: 100%;
    object-fit: contain;
}

.logo-hero {
    width: min(100%, clamp(220px, 36vw, 420px));
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-mv-section {
    width: min(100%, clamp(200px, 28vw, 330px));
    height: auto;
    object-fit: contain;
}

.brand-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem auto 0;
    text-align: center;
}

.brand-banner .logo-footer {
    width: min(100%, clamp(140px, 22vw, 200px));
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.18));
}

.brand-banner .brand-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-ink);
}

.brand-banner .brand-slogan {
    font-size: 0.9rem;
    color: var(--theme-soft-text);
}

.brand-banner.brand-banner-modal {
    margin: 2rem auto 0;
}

.brand-banner.brand-banner-modal .logo-footer {
    width: min(100%, clamp(130px, 20vw, 180px));
}

/* Color blanco para el nombre en el modal de subcategorías */
.brand-banner.brand-banner-modal .brand-tagline {
    color: #fff !important;
}

@media (max-width: 768px) {
    .logo-header {
        height: clamp(48px, 12vw, 60px);
    }
    
    .logo-hero {
        width: min(100%, clamp(200px, 48vw, 320px));
    }
    
    .logo-mv-section {
        width: min(100%, clamp(180px, 40vw, 260px));
    }

    .brand-banner .logo-footer {
        width: min(100%, clamp(130px, 36vw, 180px));
    }

    .brand-banner .brand-tagline {
        font-size: 1rem;
    }

    .brand-banner .brand-slogan {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo-header {
        height: clamp(44px, 14vw, 52px);
    }
    
    .logo-hero {
        width: min(100%, clamp(180px, 60vw, 240px));
    }
    
    .logo-mv-section {
        width: min(100%, clamp(160px, 56vw, 220px));
    }

    .brand-banner {
        margin: 2rem auto 0;
    }

    .brand-banner .logo-footer {
        width: min(100%, clamp(120px, 50vw, 160px));
    }

    .brand-banner .brand-tagline {
        font-size: 0.95rem;
    }

    .brand-banner .brand-slogan {
        font-size: 0.8rem;
    }
}

.top-contact-label {
    color: var(--theme-ink) !important;
}

/* Hero */
.hero {
    position: relative;
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: var(--theme-shadow-soft);
}

.hero::after {
    content: none !important;
}

.hero-title {
    font-family: 'Playfair Display', serif !important;
    color: var(--theme-ink) !important;
    text-shadow: none !important;
    letter-spacing: 0.5px;
}

.hero-subtitle,
.hero-text {
    color: var(--theme-muted) !important;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    width: min(100%, 420px);
    max-width: 420px;
    height: auto;
    object-fit: contain;
}

/* Sections */
section {
    background: transparent;
}

.section-title {
    font-family: 'Playfair Display', serif !important;
    color: var(--theme-gold-dark) !important;
    border-bottom: 2px solid rgba(180, 138, 10, 0.25);
    display: inline-block;
    padding-bottom: 0.4rem;
    letter-spacing: 1px;
}

.section-subtitle {
    color: var(--theme-soft-text) !important;
}

/* Tarros destacados */
.tarros-section {
    background: transparent !important;
    padding: 15px 0 10px !important;
}

/* Cards */
.stat-card,
.mv-card,
.value-card,
.service-card,
.team-card,
.contact-item,
.catalog-category,
.product-card,
.cta-box {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--theme-shadow-soft) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover,
.mv-card:hover,
.value-card:hover,
.service-card:hover,
.team-card:hover,
.contact-item:hover,
.catalog-category:hover,
.product-card:hover,
.cta-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-strong) !important;
}

/* Icon chips */
.stat-card i,
.value-icon,
.service-icon,
.team-icon {
    background: var(--theme-gold) !important;
    color: var(--theme-panel) !important;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35) !important;
}

.contact-item i {
    background: var(--theme-gold) !important;
    color: var(--theme-panel) !important;
    box-shadow: none !important;
}

.mv-card {
    border-left: 4px solid var(--theme-gold) !important;
}

.value-card,
.service-card,
.team-card {
    border-top: 3px solid rgba(212, 175, 55, 0.35) !important;
}

/* Buttons */
.btn-primary,
.btn-map,
.btn-animated,
.catalogo-btn,
.catalogo-btn-mobile,
.btn-detalle {
    border: none !important;
    background: var(--theme-gold) !important;
    color: var(--theme-panel) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.35) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary:hover,
.btn-map:hover,
.btn-animated:hover,
.catalogo-btn:hover,
.catalogo-btn-mobile:hover,
.btn-detalle:hover {
    transform: translateY(-2px);
    background: var(--theme-gold-dark) !important;
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.4) !important;
}

.btn-primary::before,
.btn-map::before,
.btn-animated::before,
.catalogo-btn::before,
.btn-detalle::before,
.btn-primary::after,
.btn-map::after,
.btn-animated::after,
.catalogo-btn::after,
.btn-detalle::after {
    content: none !important;
}

/* Botón catálogo móvil - asegurar colores dorados */
.catalogo-btn-mobile {
    background: var(--theme-gold) !important;
    color: var(--theme-panel) !important;
}

.catalogo-btn-mobile i {
    color: var(--theme-panel) !important;
}

.catalogo-btn-mobile:hover {
    background: var(--theme-gold-dark) !important;
    color: var(--theme-panel) !important;
}

/* CTA */
.cta-box {
    position: relative;
    overflow: hidden;
}

.cta-box::before,
.cta-box::after {
    content: none !important;
}

/* Social buttons */
.social-links {
    gap: 0.75rem;
}

.social-btn {
    background: var(--theme-ink) !important;
    color: var(--theme-panel) !important;
    border: none !important;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.18) !important;
}

.social-btn.facebook-btn {
    background: #1b74e4 !important;
}

.social-btn.instagram-btn {
    background: #e1306c !important;
}

.social-btn.tiktok-btn {
    background: #101010 !important;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(31, 41, 51, 0.22) !important;
}

.social-btn.facebook-btn:hover {
    background: #1558b0 !important;
}

.social-btn.instagram-btn:hover {
    background: #be2558 !important;
}

.social-btn.tiktok-btn:hover {
    background: #000000 !important;
}

/* Contact */
.contact-item {
    align-items: flex-start;
}

.contact-item h4 {
    color: var(--theme-ink) !important;
}

.contact-item p,
.contact-item a {
    color: var(--theme-soft-text) !important;
}

.contact-item a:hover {
    color: var(--theme-gold-dark) !important;
}

/* WhatsApp floating button */
.whatsapp-float {
    background: #25d366 !important;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4) !important;
    overflow: visible !important;
}

.whatsapp-float::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.4) 0%, rgba(37, 211, 102, 0) 70%);
    opacity: 0.6;
    transform: scale(0.85);
    transform-origin: center;
    animation: whatsappPulse 3s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

.whatsapp-float:hover {
    background: #1eb855 !important;
    box-shadow: 0 14px 38px rgba(37, 211, 102, 0.45) !important;
}

.whatsapp-float:hover::after {
    animation-duration: 1.8s;
    opacity: 0.75;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.7) !important;
    border-top: 1px solid var(--theme-border) !important;
    box-shadow: none !important;
}

.footer-logo h3 {
    font-family: 'Playfair Display', serif !important;
    color: var(--theme-gold-dark) !important;
    background: none !important;
    -webkit-text-fill-color: inherit !important;
}

.footer-text p,
.footer-bottom {
    color: var(--theme-soft-text) !important;
}

/* Rainbow background overlay - Low-cost multi-color cycle */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg,
        hsla(10, 90%, 68%, 0.10) 0%,    /* Coral */
        hsla(30, 88%, 70%, 0.10) 12%,   /* Ámbar */
        hsla(60, 85%, 70%, 0.10) 24%,   /* Dorado suave */
        hsla(90, 82%, 68%, 0.10) 36%,   /* Verde lima */
        hsla(130, 78%, 70%, 0.10) 48%,  /* Esmeralda */
        hsla(170, 80%, 72%, 0.10) 60%,  /* Turquesa */
        hsla(210, 82%, 74%, 0.10) 72%,  /* Azul cielo */
        hsla(250, 84%, 76%, 0.10) 84%,  /* Índigo suave */
        hsla(290, 86%, 74%, 0.10) 92%,  /* Lavanda */
        hsla(320, 88%, 72%, 0.10) 100%  /* Magenta */
    );
    background-size: 260% 260%;
    filter: hue-rotate(0deg);
    animation: rainbowDrift 15s linear infinite;
    z-index: -1;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (max-width: 768px) {
    body::before {
        animation: rainbowDrift 15s linear infinite !important;
        background-size: 220% 220% !important;
    }
}

/* Catalog */
.catalogo-lista-categorias {
    list-style: none;
    padding: 0;
    margin: 3rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.catalogo-lista-categorias li {
    margin: 0;
}

.catalogo-categoria-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--theme-border);
    border-radius: 18px;
    text-decoration: none;
    color: var(--theme-ink);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

.catalogo-categoria-link i {
    font-size: 1.4rem;
    color: var(--theme-gold);
    transition: all 0.3s ease;
}

.catalogo-categoria-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(31, 41, 51, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--theme-gold-light);
}

.catalogo-categoria-link:hover i {
    color: var(--theme-gold-dark);
    transform: scale(1.1);
}

.catalogo-categoria-link.active {
    background: var(--theme-gold);
    color: var(--theme-panel);
    border-color: var(--theme-gold-dark);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.35);
}

.catalogo-categoria-link.active i {
    color: var(--theme-panel);
}

.catalog-category {
    padding: 2rem;
    margin-top: 2rem;
}

.category-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.8rem;
    color: var(--theme-ink);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.category-title i {
    color: var(--theme-gold-dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-placeholder {
    background: #f4f1e4;
    border: 2px dashed rgba(180, 138, 10, 0.35);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: var(--theme-soft-text);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-placeholder:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: var(--theme-shadow-soft);
}

.product-placeholder i {
    font-size: 3rem;
    color: rgba(31, 41, 51, 0.25);
    margin-bottom: 1rem;
}

.product-placeholder p {
    font-weight: 600;
    letter-spacing: 1px;
}

/* Product cards */
.product-card {
    border-bottom: 4px solid rgba(212, 175, 55, 0.6) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Eliminar cualquier overlay oscuro en tarjetas del modal */
.modal-product-card::before,
.modal-product-card::after,
.product-card::before,
.product-card::after {
    display: none !important;
}

.modal-product-card .product-details::before,
.modal-product-card .product-details::after {
    display: none !important;
}

.product-image {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--theme-panel);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f4f1e4;
    color: rgba(31, 41, 51, 0.35);
}

.product-details {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.1rem;
    color: var(--theme-ink);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-code {
    color: var(--theme-soft-text);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.btn-detalle {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px !important;
    padding: 0.75rem 1.75rem !important;
}

.btn-detalle i {
    font-size: 1rem;
}

/* Product modal */
.product-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.7);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.product-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--theme-panel);
    width: 98%;
    max-width: 100%;
    max-height: 98vh;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 26px 70px rgba(17, 24, 39, 0.35);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: var(--theme-gold);
    color: var(--theme-panel);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--theme-panel);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--theme-ink);
}

.modal-product-image {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    margin-bottom: 1.2rem;
    background: var(--theme-background);
    border-radius: 14px;
    padding: 0.75rem;
}

.modal-product-image.no-image-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(31, 41, 51, 0.35);
}

.modal-product-image.no-image-modal i {
    font-size: 3rem;
}

.modal-product-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.3rem;
    color: var(--theme-ink);
    margin-bottom: 0.5rem;
    text-align: center;
    text-transform: uppercase;
}

.modal-product-code {
    text-align: center;
    font-size: 1rem;
    color: var(--theme-soft-text);
    font-weight: 600;
    margin-bottom: 1.2rem;
    background: var(--theme-background);
    border-radius: 10px;
    padding: 0.75rem;
}

.product-section {
    margin-bottom: 0.9rem;
    padding: 0.9rem 1rem;
    background: var(--theme-panel);
    border-radius: 12px;
    border-left: 4px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 4px 14px rgba(31, 41, 51, 0.06);
}

.product-section:last-child {
    margin-bottom: 0;
}

.product-section h5 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1rem;
    color: var(--theme-ink);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.product-section h5 i {
    color: var(--theme-gold-dark);
}

.product-section p {
    margin: 0;
    color: var(--theme-soft-text);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-line;
    max-height: 5.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* Reduce espacio entre secciones y tarjetas de misión, visión y valores */
.about, .mission-vision, .values {
    margin-bottom: 1.2rem !important;
    padding-bottom: 0 !important;
}
.mv-grid {
    gap: 1.2rem !important;
}
.mv-card {
    margin-bottom: 0.5rem !important;
    padding: 1rem 1rem 0.7rem 1rem !important;
}
.values-grid {
    gap: 1.2rem !important;
}
.value-card {
    margin-bottom: 0.5rem !important;
    padding: 1rem 1rem 0.7rem 1rem !important;
}

/* Animations - Optimized */
@keyframes rainbowDrift {
    from {
        filter: hue-rotate(0deg);
    }
    to {
        filter: hue-rotate(360deg);
    }
}

@keyframes whatsappPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.25;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .hero {
        text-align: center;
    }

    .hero-logo {
        margin-top: 1.5rem;
    }

    .products-grid {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4.5rem 1.25rem 3rem !important;
        box-shadow: none;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .catalogo-lista-categorias {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 2rem 0;
    }

    .catalogo-categoria-link {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .catalogo-categoria-link i {
        font-size: 1.2rem;
    }

    .catalog-category {
        padding: 1.5rem;
    }

    .product-image {
        height: 220px;
        padding: 1rem;
    }

    .product-details {
        padding: 1.25rem;
    }

    .modal-content {
        width: 94%;
        max-width: 520px;
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .section-title {
        font-size: 1.3rem !important;
    }

    .catalogo-categoria-link {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
        gap: 0.8rem;
    }

    .catalogo-categoria-link i {
        font-size: 1.1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 200px;
    }

    .modal-content {
        width: 96%;
        border-radius: 16px;
    }
}