/* Product Detail Page Styles */

/* Brand Logo */
.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Product Detail Section */
.product-detail {
    padding: 3rem 0;
    background: white;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Product Images */
.product-images {
    position: sticky;
    top: 100px;
}

.product-main-image {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 1;
}

.product-image-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 6rem;
    transition: all 0.3s ease;
}

/* Custom logo for Zyxtron Proxy in product detail */
.product-image-display .zyxtron-logo {
    width: 100%;
    height: 100%;
    background-image: url('Zyxtron_Z_Logo.png');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    font-size: 0;
}

.product-image-display .zyxtron-logo::before {
    content: none !important;
}

.product-image-display:hover {
    transform: scale(1.05);
}

.product-badge-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.product-badge {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Product Info */
.product-info {
    padding: 1rem 0;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.original-price {
    font-size: 1.5rem;
    color: #999;
    text-decoration: line-through;
}

.discount-percent {
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #666;
    font-size: 1.1rem;
}

/* Product Features */
.product-features {
    margin-bottom: 2rem;
}

.product-features h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 1rem;
}

.product-features i {
    color: #28a745;
    font-size: 0.9rem;
}

/* Product Options */
.product-options {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.option-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.option-btn:hover,
.option-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 150px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.quantity-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

#product-quantity {
    width: 60px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

#product-quantity:focus {
    outline: none;
    border-color: #667eea;
}

/* Custom Price Section */
.custom-price-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.custom-price-section .option-group {
    margin-bottom: 1rem;
}

.custom-price-section .option-group:last-child {
    margin-bottom: 0;
}

.custom-price-input,
.phone-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.custom-price-input:focus,
.phone-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-price-input:invalid,
.phone-input:invalid {
    border-color: #dc3545;
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.add-to-cart-main {
    flex: 1;
    min-width: 200px;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.buy-now-btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 1rem;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Product Guarantees */
.product-guarantees {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #666;
    font-size: 0.95rem;
}

.guarantee-item i {
    color: #28a745;
    font-size: 1.1rem;
}

/* Product Tabs */
.product-tabs {
    padding: 3rem 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.tabs-navigation {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    padding-bottom: 0;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Hide scrollbar on desktop */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tabs-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Desktop: No scrolling */
    overflow: hidden;
    height: auto;
    max-height: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.content-section {
    /* Ensure content fits within bounds on desktop */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

/* Specifications Table */
.specifications-table {
    display: grid;
    gap: 1rem;
}

.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.spec-label {
    font-weight: 600;
    color: #333;
}

.spec-value {
    color: #666;
}

/* Installation Guide */
.installation-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

/* Reviews Section */
.reviews-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.rating-overview {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
}

.rating-score {
    text-align: center;
}

.score {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stars-large {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.stars-large i {
    color: #ffd700;
    font-size: 1.5rem;
}

.total-reviews {
    color: #666;
    font-size: 0.9rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-row {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.rating-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: #ffd700;
    transition: width 0.3s ease;
}

/* Review Item */
.review-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 0.9rem;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-rating i {
    color: #ffd700;
}

.review-text {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section */
.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question i {
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Related Products */
.related-products {
    padding: 3rem 0;
    background: white;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail {
        padding: 2rem 0;
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-images {
        position: static;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .add-to-cart-main,
    .buy-now-btn {
        min-width: auto;
        width: 100%;
    }
    
    .btn-outline {
        width: 100%;
        height: 50px;
    }
    
    .product-guarantees {
        grid-template-columns: 1fr;
    }
    
    .tabs-navigation {
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        min-width: max-content;
        padding: 0.75rem 1rem;
    }
    
    .rating-overview {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .rating-row {
        grid-template-columns: 80px 1fr 30px;
        font-size: 0.85rem;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .spec-label {
        font-size: 0.9rem;
    }
    
    .spec-value {
        font-size: 0.9rem;
        font-weight: 500;
    }
}

@media (max-width: 768px) {
    .tabs-navigation {
        /* Enable horizontal scrolling on tablet */
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        /* Add gradient to indicate scrollability */
        position: relative;
    }
    
    .tabs-navigation::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 100%;
        background: linear-gradient(to left, rgba(248, 249, 250, 1), rgba(248, 249, 250, 0));
        pointer-events: none;
    }
    
    .tabs-content {
        /* Tablet: Allow horizontal scrolling only */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .product-tabs {
        padding: 2rem 0;
    }
    
    .tabs-navigation {
        gap: 1rem;
        padding: 0 1rem;
        /* Enable horizontal scrolling on mobile */
        overflow-x: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        -webkit-overflow-scrolling: touch;
    }
    
    .tabs-navigation::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .tabs-content {
        padding: 1rem;
        /* Mobile: Allow horizontal scrolling only */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .tabs-content::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .content-section {
        /* Mobile: Allow horizontal scrolling for wide content */
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    .specifications-table,
    .installation-step,
    .faq-list {
        /* Ensure wide content can scroll horizontally */
        min-width: max-content;
        width: 100%;
    }
    
    .option-buttons {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
        text-align: center;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1.2em;
    margin-bottom: 0.5em;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}