/**
 * WooCommerce Catalog Mode - Single Product Styles
 * 
 * Clean, professional pharmaceutical/chemical company design
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary-color: #0066B3;
    --primary-dark: #004C8C;
    --primary-light: #E6F0F9;
    --secondary-color: #00A86B;
    --accent-color: #FF6B35;
    --text-dark: #1A2B3C;
    --text-medium: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --bg-light: #F7FAFC;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   Base Styles
   ============================================ */
.catalog-product-page {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb-wrapper {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.breadcrumb-wrapper .woocommerce-breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.breadcrumb-wrapper .woocommerce-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-wrapper .woocommerce-breadcrumb a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Main Layout
   ============================================ */
.product-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 0;
}

/* ============================================
   Sidebar
   ============================================ */
.product-sidebar {
    position: relative;
}

.sidebar-inner {
    position: sticky;
    top: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    margin-bottom: 4px;
}

.category-item > a {
    display: block;
    padding: 10px 12px;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.category-item > a:hover,
.category-item.active > a {
    background: var(--primary-light);
    color: var(--primary-color);
}

.subcategory-list {
    list-style: none;
    margin: 4px 0 8px;
    padding-left: 16px;
}

.subcategory-item > a {
    display: block;
    padding: 6px 12px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.subcategory-item > a:hover,
.subcategory-item.active > a {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Sidebar Contact */
.sidebar-contact {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.sidebar-contact h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.sidebar-contact p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 12px;
}

.sidebar-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.sidebar-phone:hover {
    color: var(--primary-dark);
}

/* ============================================
   Main Content
   ============================================ */
.product-main {
    min-width: 0;
}

/* Product Header Section */
.product-header-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.product-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.3;
}

.product-sku {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 0 24px;
}

/* Specs Table */
.product-specs-table {
    margin-bottom: 32px;
}

.table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

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

.specs-table th,
.specs-table td {
    padding: 12px 0;
    text-align: left;
    font-size: 14px;
}

.specs-table th {
    width: 40%;
    font-weight: 500;
    color: var(--text-light);
}

.specs-table td {
    font-weight: 500;
    color: var(--text-dark);
}

/* Inquiry Actions */
.inquiry-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.product-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
}

.thumbnail-gallery {
    display: flex;
    gap: 12px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--bg-light);
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

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

/* ============================================
   Sections
   ============================================ */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 24px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Product Description */
.product-description-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.description-content {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.8;
}

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

/* Features Section */
.features-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* Why Choose Section */
.why-choose-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 48px;
    margin-bottom: 32px;
    color: white;
}

.why-choose-section .section-title {
    color: white;
}

.why-choose-section .section-title::after {
    background: var(--secondary-color);
}

.why-choose-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.section-intro {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    line-height: 1.7;
}

.benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
}

.benefit-check {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-check svg {
    color: var(--secondary-color);
}

.why-choose-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--primary-light);
}

.faq-icon {
    color: var(--text-light);
    transition: var(--transition);
    flex-shrink: 0;
}

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

.faq-item.active .faq-question {
    background: var(--primary-light);
    color: var(--primary-color);
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 20px 24px;
    margin: 0;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* Contact Section */
.contact-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
}

.contact-intro {
    font-size: 15px;
    color: var(--text-medium);
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.contact-item a,
.contact-item p {
    font-size: 14px;
    color: var(--text-medium);
    text-decoration: none;
    margin: 0;
    line-height: 1.5;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.required {
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    margin-top: 8px;
}

/* Related Products */
.related-products-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    border: 1px solid var(--border-color);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.related-product-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.related-product-image {
    aspect-ratio: 1;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-thumb {
    color: var(--text-light);
}

.related-product-info {
    padding: 16px;
}

.related-product-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
    line-height: 1.4;
}

.related-sku {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1200px) {
    .product-layout {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
    
    .product-sidebar {
        display: none;
    }
    
    .product-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .why-choose-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .product-layout {
        padding: 24px 0;
    }
    
    .product-header-section {
        padding: 24px;
    }
    
    .product-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .product-gallery {
        order: -1;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .why-choose-section {
        padding: 32px 24px;
    }
    
    .why-choose-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .faq-section,
    .contact-section,
    .features-section,
    .product-description-section,
    .related-products-section {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .inquiry-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .why-choose-stats {
        grid-template-columns: 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-gallery {
        justify-content: center;
    }
    
    .thumbnail {
        width: 64px;
        height: 64px;
    }
}

/* ============================================
   Mobile Category Navigation (Shows on Mobile)
   ============================================ */
@media (max-width: 1024px) {
    .mobile-category-nav {
        display: block;
        background: var(--bg-white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        padding: 16px;
        margin-bottom: 24px;
        border: 1px solid var(--border-color);
    }
    
    .mobile-category-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--bg-light);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        font-size: 15px;
        font-weight: 600;
        color: var(--text-dark);
        cursor: pointer;
    }
    
    .mobile-category-list {
        display: none;
        padding-top: 16px;
    }
    
    .mobile-category-list.active {
        display: block;
    }
}

/* Print Styles */
@media print {
    .product-sidebar,
    .inquiry-actions,
    .contact-section,
    .faq-section,
    .related-products-section,
    .breadcrumb-wrapper {
        display: none !important;
    }
    
    .product-layout {
        display: block;
    }
    
    .product-header-section,
    .product-description-section,
    .features-section,
    .why-choose-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
