/* B2B Product Page Styles */

.b2b-product-page {
    padding: 40px 0;
}

.b2b-product-detail {
    max-width: 1400px;
    margin: 0 auto;
}

.b2b-product-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.b2b-product-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge-cert {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-stock {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.badge-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.badge-stock.out-of-stock {
    background: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

.badge-stock.limited {
    background: #fff8e1;
    color: #f57f17;
    border-color: #fff9c4;
}

.badge-stock.pre-order {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #bbdefb;
}

.b2b-product-title {
    font-size: 36px;
    margin: 15px 0 10px;
    color: #1a1a1a;
    line-height: 1.3;
}

.b2b-product-sku {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0;
}

.b2b-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.b2b-product-gallery {
    position: sticky;
    top: 20px;
}

.gallery-main-image {
    position: relative;
    width: 100%;
    height: 500px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: #0073aa;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2b-product-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.b2b-pricing-section,
.b2b-variants-section,
.b2b-business-terms {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.b2b-pricing-section h3,
.b2b-variants-section h3,
.b2b-business-terms h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 20px;
    color: #1a1a1a;
}

.price-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-label {
    font-weight: 600;
    color: #666;
    min-width: 50px;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
}

.price-unit {
    font-size: 14px;
    color: #999;
}

.stock-info {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 0;
    font-size: 14px;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.variant-card {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.variant-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.variant-card h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1a1a1a;
}

.variant-details p {
    margin: 8px 0;
    font-size: 14px;
}

.variant-details strong {
    color: #666;
}

.variant-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0073aa !important;
}

.variant-stock {
    color: #2e7d32 !important;
}

.btn-select-variant {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-select-variant:hover {
    background: #005a87;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.term-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.term-item i {
    font-size: 24px;
    color: #0073aa;
    margin-top: 2px;
}

.term-item div {
    display: flex;
    flex-direction: column;
}

.term-item strong {
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.term-item span {
    font-size: 13px;
    color: #666;
}

.b2b-inquiry-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-inquiry {
    flex: 1;
    min-width: 200px;
}

.b2b-product-details {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.details-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #0073aa;
}

.tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.specs-table th,
.specs-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.specs-table th {
    background: #f5f5f5;
    font-weight: 600;
    width: 250px;
    color: #1a1a1a;
}

.specs-table td {
    color: #666;
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

.product-description-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    line-height: 1.8;
}

.product-description-content p {
    margin-bottom: 15px;
}

.certifications-section,
.appearance-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.certifications-section h4,
.appearance-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.certifications-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cert-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.appearance-content {
    line-height: 1.8;
    color: #666;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

#inquiry-form p {
    margin: 0 0 20px;
}

#inquiry-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

#inquiry-form input[type="text"],
#inquiry-form input[type="email"],
#inquiry-form input[type="number"],
#inquiry-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#inquiry-form input:focus,
#inquiry-form textarea:focus {
    outline: none;
    border-color: #0073aa;
}

#inquiry-form input[type="checkbox"] {
    margin-right: 8px;
}

@media (max-width: 1024px) {
    .b2b-product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .b2b-product-gallery {
        position: static;
    }
    
    .gallery-main-image {
        height: 400px;
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-product-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .b2b-product-page {
        padding: 20px 0;
    }
    
    .gallery-main-image {
        height: 300px;
    }
    
    .variants-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-inquiry-section {
        flex-direction: column;
    }
    
    .btn-inquiry {
        width: 100%;
    }
    
    .details-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-btn {
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        margin-bottom: 5px;
        text-align: left;
    }
    
    .tab-btn.active {
        background: #0073aa;
        color: white;
        border-color: #0073aa;
    }
    
    .specs-table th,
    .specs-table td {
        display: block;
        width: 100%;
    }
    
    .specs-table th {
        background: transparent;
        padding-bottom: 5px;
    }
    
    .specs-table td {
        padding-top: 5px;
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .b2b-product-title {
        font-size: 24px;
    }
    
    .price-value {
        font-size: 24px;
    }
    
    .modal-content {
        padding: 25px;
    }
}
