/* Resets & Variables */
:root {
    /* Blue Palette */
    --primary-blue: #3B82F6;
    /* Bright Blue for Buttons/Accents */
    --hover-blue: #2563EB;
    /* Darker Blue for Hover */
    --bg-main: #0B1120;
    /* Deep Dark Blue (Main Bg) */
    --bg-card: #1E293B;
    /* Lighter Dark Blue (Cards/Sections) */
    --bg-header: #0F172A;
    /* Header Bg */
    --text-white: #F8FAFC;
    /* Main Headings */
    --text-gray: #94A3B8;
    /* Body Text/Subtitles */
    --border-color: #334155;
    /* Borders */

    --font-main: 'Roboto', sans-serif;
    --container-width: 1200px;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-gray);
    line-height: 1.5;
    overflow-x: hidden; /* 🛡️ Evita que elementos se desborden hacia los lados */
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header Styles */
.main-header {
    background-color: var(--bg-header);
    padding: 8px 0; /* Reduced padding */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-img {
    height: clamp(32px, 1.5vw + 28px, 45px); /* Dinámico */
    width: auto;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: clamp(13px, 1vw + 10px, 18px); /* Dinámico */
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: clamp(9px, 0.5vw + 8px, 12px); /* Dinámico */
    font-weight: 400;
    color: var(--text-gray);
    letter-spacing: 0.3px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    font-size: 24px;
}

.mobile-green {
    color: #25D366;
}

/* WhatsApp Keep Green? or make Blue? Keeping Green for recognition */
.mobile-orange {
    color: var(--primary-blue);
}

/* Map icon to Blue */

.contact-text {
    display: flex;
    flex-direction: column;
    font-size: clamp(11px, 0.5vw + 10px, 13px); /* Dinámico */
    line-height: 1.3;
}

.contact-text .phone {
    font-weight: 700;
    color: var(--text-white);
}

.contact-text .email {
    color: #E2E8F0;
    text-decoration: none;
}

.contact-text .address-subtitle {
    color: #E2E8F0;
}

.contact-text .address-title {
    font-weight: 700;
    color: var(--text-white);
}

.contact-divider {
    width: 1px;
    height: 30px;
    background-color: var(--border-color);
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-btn:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Hero Presentation Section (Dark Blue) */
/* Reusing general dark theme but tweaking specific vars */
.hero-presentation {
    background-color: var(--bg-main);
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    color: white;
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-presentation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(11, 17, 32, 0.95) 0%, rgba(11, 17, 32, 0.75) 50%, rgba(11, 17, 32, 0.1) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: var(--text-white);
}

.highlight-text {
    color: var(--primary-blue);
    /* Changed from Gold to Blue */
    display: block;
    font-size: 52px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 480px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

.btn-primary-hero {
    background-color: var(--primary-blue);
    color: white;
    /* White text on Blue button */
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    background-color: var(--hover-blue);
}

.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatars {
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
    margin-left: -10px;
}

.avatar:first-child {
    margin-left: 0;
}

.rating-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--text-gray);
}

.stars {
    color: var(--primary-blue);
    /* Blue Stars */
    font-size: 10px;
    margin-bottom: 2px;
}

/* Visualization (Right side) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.visual-circle {
    width: 400px;
    height: 400px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    /* Blue tint border */
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-circle::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
}

.center-logo {
    font-size: 60px;
    color: white;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    /* Blue glow */
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-blue);
    font-size: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
}

.icon-1 {
    top: 20%;
    left: 10%;
    color: #61dafb;
    animation: float-1 4s ease-in-out infinite;
}

.icon-2 {
    top: 15%;
    right: 15%;
    color: var(--text-white);
    animation: float-2 5s ease-in-out infinite;
}

.icon-3 {
    bottom: 20%;
    left: 15%;
    color: var(--primary-blue);
    animation: float-3 4.5s ease-in-out infinite;
}

.icon-4 {
    bottom: 25%;
    right: 10%;
    color: #94a3b8;
    animation: float-4 5.5s ease-in-out infinite;
}

/* Floating Animations */
@keyframes float-1 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-15px) translateX(5px);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-10px) translateX(-8px);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-12px) translateX(-5px);
    }
}

@keyframes float-4 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-8px) translateX(10px);
    }
}

/* Pulse animation for center logo */
.center-logo {
    font-family: sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.5rem;
    letter-spacing: -2px;
    color: transparent;
    -webkit-text-stroke: 2px white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 35px rgba(59, 130, 246, 0.8));
    }
}

/* Products Hero Section - ADAPTED TO DARK */
.products-hero {
    padding: var(--spacing-xl) 0;
    background-color: #0b1120;
    /* Subtle pattern overlay opacity reduced for dark mode */
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.sub-title {
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 700;
    text-transform: lowercase;
    display: block;
    margin-bottom: 5px;
}

.main-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-white);
    /* White title */
    margin-bottom: 10px;
}

.title-underline {
    width: 50px;
    height: 4px;
    background-color: var(--primary-blue);
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    justify-content: center; /* Center cards if grid is not full */
}

.product-card {
    background: var(--bg-card);
    /* Dark Card Bg */
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    /* Subtle border */
    border-bottom: 3px solid transparent;
    /* Prepare for hover */
    position: relative;
    height: 100%;
    max-width: 320px; /* Limit card width */
    width: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border-bottom-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    color: #0F172A;
}

.in-stock {
    background-color: #4ADE80;
    /* Green */
}

.on-order {
    background-color: #FACC15;
    /* Yellow/Amber */
}

.product-image-container {
    width: 100%;
    aspect-ratio: 4/3; /* Better ratio for product photos */
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease; /* Smooth zoom transition */
}

.product-card:hover .product-img {
    transform: scale(1.1); /* Zoom in on card hover */
}



.product-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 15px;
    min-height: 44px;
    /* Align titles */
}

.product-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: left;
    width: 100%;
}

.card-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.btn-details {
    display: block;
    width: 100%;
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    letter-spacing: 0.5px;
    border: 1px solid var(--primary-blue);
    text-align: center;
}

.btn-details:hover {
    background-color: var(--hover-blue);
    border-color: var(--hover-blue);
}

/* View All Button */
.view-all-container {
    text-align: center;
    margin-top: 50px;
}

.btn-view-all {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 15px 40px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-view-all:hover {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}


/* Responsiveness (Kept same logic, just updated colors handled by vars) */
@media (max-width: 900px) {
    .main-header {
        position: static; /* Deja de ser fijo en móvil */
    }

    .header-container {
        flex-direction: row; /* Mantener fila */
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap !important; /* Forza una sola línea */
    }

    .contact-info {
        flex-direction: row;
        gap: 12px;
    }

    /* Ocultar textos largos en móvil para que quepa en 1 sola fila elegante */
    .contact-text,
    .contact-divider, 
    .social-icons {
        display: none !important;
    }

    .contact-item {
        justify-content: flex-end;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 36px;
    }

    .highlight-text {
        font-size: 40px;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .visual-circle {
        width: clamp(240px, 60vw, 300px); /* Dinámico */
        height: clamp(240px, 60vw, 300px); /* Dinámico */
        margin-top: 40px;
    }
}

/* Footer Styles */
.main-footer {
    background-color: #020617;
    /* Darker than header */
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-brand {
    font-size: clamp(20px, 1.5vw + 14px, 24px); /* Dinámico */
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 15px;
    font-style: italic;
}

.brand-highlight {
    color: var(--primary-blue);
    font-style: normal;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    max-width: 300px;
}

.footer-heading {
    color: var(--text-white);
    font-size: clamp(14px, 1vw + 10px, 16px); /* Dinámico */
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

.footer-contact i {
    color: var(--primary-blue);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #64748B;
}

/* Mobile Footer */
@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-col {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .footer-contact li {
        justify-content: center;
    }
}

/* Catalog Page Styles */
.catalog-section {
    background-color: #f1f5f9;
}

/* Catalog Table Layout */
.cat-table-header {
    background-color: #0f172a;
    color: white;
    display: flex;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
}

.cat-category-row {
    background-color: #94a3b8;
    /* Lighter grey for categories */
    padding: 10px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    border-bottom: 1px solid #cbd5e1;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.cat-category-row:hover {
    background-color: #64748b;
}

.cat-category-row i {
    transition: transform 0.3s ease;
}

.rotate-180 {
    transform: rotate(180deg);
}

.hidden-row {
    display: none !important;
}

.cat-product-row {
    display: flex;
    background-color: white;
    /* White rows */
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 20px;
    align-items: center;
    transition: all 0.2s ease;
}

.cat-product-row:hover {
    background-color: #f0f7ff; /* Very light blue tint */
    box-shadow: inset 4px 0 0 var(--primary-blue); /* Subtle blue edge */
}

.cat-product-row:last-child {
    border-bottom: none;
}

/* Columns */
.col-info {
    flex: 2;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.col-media {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.col-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    padding-left: 20px;
}

/* Product Content */
.cp-icon {
    color: #94a3b8;
    font-size: 20px;
    margin-top: 2px;
}

.cp-text h4 {
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 4px;
    font-weight: 700;
}

.cp-text p {
    font-size: 13px;
    color: #64748b;
}

.cp-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.cp-thumb:hover {
    transform: scale(1.6); /* Reduced scale to avoid ugly overlap */
    z-index: 10;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: white;
    border-color: var(--primary-blue);
    border-radius: 4px;
}

.dl-link {
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.dl-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Responsive Catalog */
@media (max-width: 768px) {
    .cat-table-header {
        display: none;
    }

    .cat-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .col-info,
    .col-media,
    .col-action {
        width: 100%;
        padding-left: 0;
    }

    .col-media {
        justify-content: flex-start;
    }
}

/* Product Detail Page Styles */
.product-detail-section {
    padding: 40px 0;
    flex: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-blue);
}

.pd-grid-container {
    display: grid;
    grid-template-columns: 70px 70px 1fr 300px; /* Reduced column widths */
    /* Photo Thumbs | Video Thumbs | Center Content | Sticky Sidebar */
    gap: 15px; /* Reduced gap */
    align-items: start;
    position: relative;
    /* Context for sticky */
}

/* Col 1: Thumbs */
.pd-thumbs-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 120px; /* Aligned with sidebar */
    height: fit-content;
    align-items: center; /* Center thumbs */
}

/* Col 1b: Video Thumbs */
.pd-videos-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 120px; /* Aligned with sidebar */
    height: fit-content;
    align-items: center; /* Center thumbs */
}

.pd-thumb {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pd-thumb:hover img {
    transform: scale(1.2);
}

.pd-thumb.active {
    border-color: var(--primary-blue);
    border-width: 2px;
}

.pd-video-thumb {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.pd-video-thumb:hover {
    transform: translateY(-3px); /* Subtle lift for video thumbs */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.pd-video-thumb:hover {
    background: var(--primary-blue);
}

.pd-video-thumb.active {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: white;
}

/* Col 2: Center Content (Image + Desc) */
.pd-content-col {
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* Space between Image and Description */
}

.pd-main-img-wrapper {
    width: 100%;
    max-width: 600px; /* Increased to reduce empty space */
    background: transparent;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    margin: 0 auto; /* Centered */
    border: 1px solid var(--border-color);
    position: relative;
    aspect-ratio: 1/1;
    background: #f8fafc; 
}

.pd-main-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s;
    opacity: 0;
    pointer-events: none; /* Let the wrapper handle the mouse events */
    transform-origin: center;
    will-change: transform;
}

/* Zoom Logic Handled by JS */

.pd-main-img-wrapper img.loaded {
    opacity: 1;
}

/* Spinner Styles */
.media-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Effect */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Col 3: Sticky Sidebar */
.pd-sidebar-col {
    position: sticky;
    top: 120px;
    /* Increased from 40px to lower it */
    height: fit-content;
}

/* Info Styles (now inside center col) */
.pd-description {
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto; /* Centered */
}

.pd-desc-title {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-white);
    margin-bottom: 15px;
    font-weight: 700;
}

.pd-product-name-large {
    font-size: 24px;
    /* Larger title in description */
    color: var(--text-white);
    /* White title since it's on dark bg */
    margin-bottom: 20px;
    font-weight: 700;
}

.pd-desc-text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Rationale List */
.pd-rationale-title {
    font-size: 13px;
    color: var(--text-white);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.pd-rationale-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-gray);
}

.pd-rationale-list li {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* PDF Download Block */
.pd-pdf-block {
    background: #1e293b; /* Slate-800, matching description area but distinct */
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.pd-pdf-info {
    flex: 1;
}

.pd-pdf-info p {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.pd-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pd-pdf-btn:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.pd-pdf-btn i {
    font-size: 18px;
}

/* Hide if no PDF */
.pd-pdf-block.hidden {
    display: none;
}

/* Purchase Card (White look) */
.pd-purchase-card {
    background: white;
    border-radius: 8px;
    padding: 20px; /* Reduced padding */
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.pd-purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pd-badge {
    font-size: 12px;
    color: #64748b;
}

.pd-card-title {
    font-size: 20px;
    color: #0f172a;
    /* Dark text for title inside card */
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.3;
}

.pd-cta-container {
    padding-top: 10px;
}

.pd-cta-text {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pd-btn-buy {
    display: block;
    width: 100%;
    background-color: var(--primary-blue);
    color: white;
    text-align: center;
    padding: 12px 0;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.pd-btn-buy:hover {
    background-color: var(--hover-blue);
}


/* Responsive Detail Page */
@media (max-width: 900px) {
    .pd-grid-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .pd-thumbs-col {
        flex-direction: row;
        justify-content: center;
        position: static;
        order: 2;
        flex-wrap: wrap; /* Evita desbordamiento con muchas miniaturas */
        min-width: 0; /* Prevent grid expansion */
    }

    .pd-videos-col {
        flex-direction: row;
        justify-content: center;
        position: static;
        order: 2;
        flex-wrap: wrap;
        min-width: 0; /* Prevent grid expansion */
    }

    .pd-main-img-col {
        display: none;
        /* This was removed from the instruction, but it was part of the original structure.
           The new structure uses .pd-content-col which contains the main image.
           So, .pd-main-img-col is effectively replaced by .pd-content-col.
           I will remove the old .pd-main-img-col definition entirely as it's no longer used. */
    }

    .pd-content-col {
        order: 1;
    }

    .pd-main-img-wrapper {
        aspect-ratio: auto; /* Dinámico */
        max-height: 350px; /* Límite de altura para móvil */
        width: 100%;
        max-width: 100%; /* Changed from 450px to 100% to fill container correctly */
        margin: 0 auto;
        min-width: 0; /* Prevent grid expansion */
    }

    .pd-pdf-block {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }

    .pd-pdf-btn {
        justify-content: center;
    }

    .pd-description {
        min-width: 0; /* Prevent grid expansion */
    }

    .pd-sidebar-col {
        order: 3;
        position: static;
        /* Unstick on mobile */
    }

    .pd-info-col {
        /* This was removed from the instruction, but it was part of the original structure.
           The content of .pd-info-col is now split between .pd-content-col (description)
           and .pd-sidebar-col (purchase card). So, .pd-info-col is effectively replaced. */
        display: none;
    }
}

/* Botón de WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white !important;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-float:hover {
    transform: scale(1.15);
    background-color: #128C7E;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}