/**
 * Herbert (Thailand) Company Limited
 * Corporate Style Sheet - Phase 1 & Phase 2
 */

:root {
    --hbt-primary: #023564;
    --hbt-primary-dark: #012140;
    --hbt-primary-light: #0a4d8c;
    --hbt-accent: #00A3E0;
    --hbt-accent-orange: #F37021;
    --hbt-accent-orange-dark: #D4580E;
    --hbt-bg: #FFFFFF;
    --hbt-bg-secondary: #F7F9FC;
    --hbt-text-dark: #1E293B;
    --hbt-text-muted: #64748B;
    --hbt-border: #E2E8F0;
    --hbt-card-shadow: 0 4px 20px rgba(2, 53, 100, 0.06);
    --hbt-card-shadow-hover: 0 10px 30px rgba(2, 53, 100, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Sarabun", "Prompt", Helvetica, Arial, sans-serif;
    color: var(--hbt-text-dark);
    background-color: var(--hbt-bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Herbert Color Utilities */
.text-herbert {
    color: var(--hbt-primary) !important;
}

.text-herbert-accent {
    color: var(--hbt-accent-orange) !important;
}

.bg-herbert {
    background-color: var(--hbt-primary) !important;
    color: #FFFFFF;
}

.bg-herbert-accent {
    background-color: var(--hbt-accent-orange) !important;
    color: #FFFFFF;
}

.bg-herbert-light {
    background-color: #EBF3FA !important;
}

/* Buttons */
.btn-herbert {
    background-color: var(--hbt-primary);
    border-color: var(--hbt-primary);
    color: #FFFFFF;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-herbert:hover, .btn-herbert:focus, .btn-herbert:active {
    background-color: var(--hbt-primary-dark);
    border-color: var(--hbt-primary-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 53, 100, 0.25);
}

.btn-herbert-accent {
    background-color: var(--hbt-accent-orange);
    border-color: var(--hbt-accent-orange);
    color: #FFFFFF;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-herbert-accent:hover, .btn-herbert-accent:focus, .btn-herbert-accent:active {
    background-color: var(--hbt-accent-orange-dark);
    border-color: var(--hbt-accent-orange-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 112, 33, 0.3);
}

.btn-outline-herbert {
    color: var(--hbt-primary);
    border-color: var(--hbt-primary);
    background-color: transparent;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-outline-herbert:hover, .btn-outline-herbert:focus, .btn-outline-herbert:active {
    background-color: var(--hbt-primary);
    color: #FFFFFF;
    border-color: var(--hbt-primary);
}

/* Cards */
.card-corporate {
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: var(--hbt-card-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-corporate:hover {
    box-shadow: var(--hbt-card-shadow-hover);
}

.border-herbert {
    border-color: var(--hbt-primary) !important;
}

/* Public Navigation Bar */
.public-navbar {
    background-color: var(--hbt-primary, #023564);
    box-shadow: 0 2px 14px rgba(2, 53, 100, 0.15);
}

.navbar-brand-logo {
    height: 44px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.navbar-brand-logo:hover {
    opacity: 0.92;
}

@media (max-width: 575.98px) {
    .navbar-brand-logo {
        height: 36px;
    }
}

.public-nav-link {
    color: rgba(255, 255, 255, 0.88);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.public-nav-link:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.12);
}

.public-nav-link.active {
    color: #FFFFFF;
    background-color: var(--hbt-accent-orange);
}

/* Product & Category Cards */
.category-card {
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(2, 53, 100, 0.12);
    border-color: var(--hbt-primary-light);
}

.category-card-img-wrap {
    height: 160px;
    background: linear-gradient(135deg, #023564 0%, #0a4d8c 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-img-wrap img {
    transform: scale(1.05);
}

.category-card-icon-placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 3.5rem;
}

.product-card {
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(2, 53, 100, 0.1);
}

.product-card-img-wrap {
    height: 200px;
    background: #F8FAFC;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--hbt-border);
}

.product-card-img-wrap img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.04);
}

.model-badge {
    background-color: var(--hbt-primary);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge-tag {
    background-color: #E2E8F0;
    color: #475569;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Breadcrumb */
.corporate-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    background: #FFFFFF;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--hbt-border);
}

.corporate-breadcrumb a {
    color: var(--hbt-primary);
    text-decoration: none;
}

.corporate-breadcrumb a:hover {
    text-decoration: underline;
}

/* Product Detail Premium Two-Column Layout (Desktop: 58% Left, 42% Right) */
.product-two-col-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.product-gallery-col {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    margin-bottom: 24px;
}

.product-info-col {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .product-two-col-row {
        margin-right: -16px;
        margin-left: -16px;
    }
    .product-gallery-col {
        flex: 0 0 58%;
        max-width: 58%;
        padding-right: 16px;
        padding-left: 16px;
        margin-bottom: 0;
    }
    .product-info-col {
        flex: 0 0 42%;
        max-width: 42%;
        padding-right: 16px;
        padding-left: 16px;
        margin-bottom: 0;
    }
}

/* Product Gallery Components */
.product-gallery-card {
    background: #FFFFFF;
    border: 1px solid var(--hbt-border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(2, 53, 100, 0.04);
}

.gallery-main-view {
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    background: #FFFFFF;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    user-select: none;
}

@media (max-width: 991px) {
    .gallery-main-view {
        height: 380px;
    }
}

@media (max-width: 576px) {
    .gallery-main-view {
        height: 300px;
    }
}

.gallery-main-view img {
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.gallery-main-view:hover img {
    transform: scale(1.02);
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--hbt-border);
    color: var(--hbt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    z-index: 5;
}

.gallery-nav-btn:hover {
    background: var(--hbt-primary);
    color: #FFFFFF;
    border-color: var(--hbt-primary);
    box-shadow: 0 6px 16px rgba(2, 53, 100, 0.2);
}

.gallery-nav-btn.prev {
    left: 12px;
}

.gallery-nav-btn.next {
    right: 12px;
}

/* Gallery Badges */
.gallery-counter-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(2, 53, 100, 0.85);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 4;
}

.gallery-zoom-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(2, 53, 100, 0.85);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
    z-index: 4;
}

.gallery-main-view:hover .gallery-zoom-badge {
    background: var(--hbt-primary);
}

/* Thumbnail Strip (Support 10+ images with smooth scroll) */
.gallery-thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gallery-thumbnail-list::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnail-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.gallery-thumb-item {
    flex: 0 0 74px;
    width: 74px;
    height: 74px;
    border: 2px solid var(--hbt-border);
    border-radius: 10px;
    background: #FFFFFF;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.2s ease;
}

.gallery-thumb-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumb-item.active {
    border-color: var(--hbt-primary);
    box-shadow: 0 0 0 2px rgba(2, 53, 100, 0.2);
    background: #F8FAFC;
}

.gallery-thumb-item:hover:not(.active) {
    border-color: var(--hbt-accent-orange);
}

/* Document Action Buttons */
.btn-doc-catalog {
    background-color: #023564;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-doc-catalog:hover {
    background-color: #012140;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 53, 100, 0.25);
}

.btn-doc-pricelist {
    background-color: #F47A20;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-doc-pricelist:hover {
    background-color: #D8650F;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 122, 32, 0.3);
}

.doc-icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Lightbox Controls */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #023564;
}

.lightbox-nav-btn.prev {
    left: 20px;
}

.lightbox-nav-btn.next {
    right: 20px;
}

/* Description & Content Typography */
.product-description-content {
    color: #334155;
}

.product-description-content p {
    margin-bottom: 1rem;
}

.product-description-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.product-description-content li {
    margin-bottom: 0.35rem;
}

/* Specifications Table */
.spec-table th {
    background-color: #F8FAFC;
    color: #334155;
    font-weight: 600;
    width: 35%;
    border-color: var(--hbt-border);
}

.spec-table td {
    color: #1E293B;
    border-color: var(--hbt-border);
}

/* Video Responsive Container */
.video-responsive-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

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

/* ========================================================
   Product Detail Redesign V3 (Medical Catalog Specification)
   ======================================================== */

.product-v3-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.product-v3-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -16px;
    margin-left: -16px;
}

.product-v3-gallery-col {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
    margin-bottom: 24px;
}

.product-v3-info-col {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .product-v3-gallery-col {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0;
    }
    .product-v3-info-col {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0;
    }
}

/* V3 Gallery Card */
.product-v3-gallery-card {
    background: #FFFFFF;
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(2, 53, 100, 0.04);
}

.product-v3-main-view {
    position: relative;
    width: 100%;
    height: 440px;
    background: #FFFFFF;
    border: 1px solid var(--hbt-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    user-select: none;
}

@media (max-width: 768px) {
    .product-v3-main-view {
        height: 320px;
    }
}

.product-v3-main-view img {
    max-width: 94%;
    max-height: 94%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.product-v3-main-view:hover img {
    transform: scale(1.02);
}

/* Thumbnail Strip - 4 to 5 visible in row */
.product-v3-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.product-v3-thumbnails::-webkit-scrollbar {
    height: 5px;
}

.product-v3-thumbnails::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.product-v3-thumb {
    flex: 0 0 calc(20% - 8px);
    min-width: 68px;
    max-width: 88px;
    height: 72px;
    border: 2px solid var(--hbt-border);
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.2s ease;
}

.product-v3-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-v3-thumb.active {
    border-color: #023564;
    box-shadow: 0 0 0 2px rgba(2, 53, 100, 0.2);
    background: #F8FAFC;
}

.product-v3-thumb:hover:not(.active) {
    border-color: #F47A20;
}

/* V3 Product Info Card */
.product-v3-info-card {
    background: #FFFFFF;
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 10px rgba(2, 53, 100, 0.04);
}

@media (max-width: 768px) {
    .product-v3-info-card {
        padding: 20px 18px;
    }
}

.product-v3-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #023564;
    line-height: 1.3;
    margin-bottom: 6px;
}

.product-v3-model {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
}

.product-v3-desc-block {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    border-bottom: 1px solid #EDF2F7;
    padding-bottom: 18px;
}

/* Features Block */
.product-v3-features-block {
    margin-bottom: 20px;
    border-bottom: 1px solid #EDF2F7;
    padding-bottom: 18px;
}

.product-v3-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #023564;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-v3-features-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    color: #334155;
    font-size: 0.93rem;
    line-height: 1.7;
}

.product-v3-features-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
}

.product-v3-features-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #F47A20;
    font-size: 1.25rem;
    line-height: 1.2;
}

/* Specs Block */
.product-v3-specs-block {
    margin-bottom: 24px;
    border-bottom: 1px solid #EDF2F7;
    padding-bottom: 18px;
}

.product-v3-spec-table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    overflow: hidden;
}

.product-v3-spec-table th {
    background-color: #F8FAFC;
    color: #475569;
    font-weight: 600;
    width: 40%;
    padding: 10px 14px;
    border-bottom: 1px solid #E2E8F0;
    border-right: 1px solid #E2E8F0;
    vertical-align: top;
}

.product-v3-spec-table td {
    padding: 10px 14px;
    color: #1E293B;
    border-bottom: 1px solid #E2E8F0;
    vertical-align: top;
}

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

/* Action Buttons (Downloads) */
.product-v3-downloads {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 576px) {
    .product-v3-downloads {
        flex-direction: row;
    }
    .product-v3-downloads .btn {
        flex: 1;
    }
}

.btn-v3-catalog {
    background-color: #023564;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 53, 100, 0.15);
}

.btn-v3-catalog:hover {
    background-color: #012140;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 53, 100, 0.25);
}

.btn-v3-pricelist {
    background-color: #F47A20;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(244, 122, 32, 0.2);
}

.btn-v3-pricelist:hover {
    background-color: #D8650F;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 122, 32, 0.3);
}

/* Product Video Section (BELOW 2-Column Section) */
.product-v3-video-section {
    margin-top: 40px;
    padding-top: 36px;
    border-top: 1px solid #E2E8F0;
}

.product-v3-video-container {
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
}

.product-v3-video-card {
    background: #FFFFFF;
    border: 1px solid var(--hbt-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(2, 53, 100, 0.04);
}

.product-v3-video-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #023564;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
