/* Resets for Detail Page Context */
.product-detail-page {
    background: #fff;
    color: #333;
}

/* Product Detail Page Hero Header */
.product-hero-header {
    background: #fbfbfc;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid #f0f0f0;
}

.hero-product-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111;
    margin: 0;
    letter-spacing: -1px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Layout */
.product-main-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* Gallery */
.main-image-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 1.5rem 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f2f2f2;
    aspect-ratio: 16/11;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.main-image-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

.main-image-card #mainProductImageLightbox {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.main-image-card.is-placeholder {
    padding: 2rem;
}

.main-image-card.is-placeholder #mainProductImageLightbox {
    align-items: center;
}

.main-image-card img.is-placeholder {
    max-width: 72%;
    max-height: 72%;
    object-fit: contain;
    object-position: center center !important;
}

.detail-code-badge {
    right: 14px;
    bottom: 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 3;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    backdrop-filter: blur(6px);
}

.product-lightbox-sources {
    display: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e6e6e6;
    background: rgba(255, 255, 255, 0.95);
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

.gallery-nav:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 77, 148, 0.12);
}

/* Info Section */
.product-info-section .product-header {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.product-sku {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* Actions & Buttons */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    background: #25D366;
    color: white;
    font-weight: 800;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.btn-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 800;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-quote:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 77, 148, 0.2);
}

/* Trust Tags */
/* Video Button */
.btn-video {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    background: #ff0000;
    color: white;
    font-weight: 800;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.btn-video:hover {
    background: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

.product-trust-tags {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.tag-item {
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tag-item i {
    color: var(--primary);
    font-size: 1rem;
}

/* Tabs System */
.product-tabs-container {
    margin-top: 2rem;
    margin-bottom: 4rem;
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 1.2rem;
    border: none;
    background: none;
    font-weight: 800;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    border-right: 1px solid #eee;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.tabs-content {
    background: white;
    padding: 2.5rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111;
}

.modal-header button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #444;
    cursor: pointer;
}

.quote-form {
    padding: 1.25rem;
    display: grid;
    gap: 0.9rem;
}

.quote-form .form-group {
    display: block;
}

.quote-form input,
.quote-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font: inherit;
}

.quote-form textarea {
    resize: vertical;
    min-height: 110px;
}

.btn-primary-form {
    border: none;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* Specs & Description in Tabs */
.product-description p {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

.product-specs-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #111;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.specs-list li strong {
    color: #666;
    font-weight: 600;
}

.specs-list li span {
    font-weight: 700;
    color: #111;
}

.specs-html-content {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

.specs-html-content p {
    margin-bottom: 1rem;
}

.specs-html-content b,
.specs-html-content strong {
    color: #111;
}

/* Tags Cloud */
.product-tags {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.product-tags h4 {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #444;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags-cloud a {
    padding: 0.5rem 1rem;
    background: #f0f2f5;
    color: #666;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s;
    text-decoration: none;
}

.tags-cloud a:hover {
    background: var(--primary);
    color: white;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Similar Products Section */
.similar-products {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #eee;
}

.similar-products .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Detail */
@media (max-width: 992px) {
    .product-main-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-product-title {
        font-size: 1.8rem;
    }

    .similar-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .similar-products .product-grid {
        grid-template-columns: 1fr;
    }
}
