/*
Theme Name: Belt Factory Child
Theme URI: https://hftest.bravecow.dev/
Description: Astra child theme for braided elastic belt B2B inquiry site
Author: HaoFong
Author URI: https://hftest.bravecow.dev/
Template: astra
Version: 1.1.0
Text Domain: belt-factory-child
*/

/* ===== Product Single Page ===== */

.belt-product-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.belt-breadcrumb {
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.belt-breadcrumb a {
    color: #2b6cb0;
    text-decoration: none;
}

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

.belt-breadcrumb span {
    color: #2c2c2c;
    font-weight: 500;
}

.belt-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.belt-product-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Gallery - main image */
.belt-gallery-main {
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 4 / 3;
}

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

.belt-gallery-main.belt-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.belt-gallery-main.belt-no-image span {
    color: #999;
    font-size: 14px;
}

/* Gallery - thumbnails */
.belt-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.belt-thumb {
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.2s;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.belt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.belt-thumb.belt-thumb-active {
    border-color: #2b6cb0;
}

.belt-thumb:hover {
    border-color: #85B7EB;
}

.belt-product-logo {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #eee;
    align-self: flex-start;
}

.belt-product-logo img {
    max-height: 60px;
    width: auto;
}

.belt-product-info {
    display: flex;
    flex-direction: column;
}

.belt-product-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 24px;
    color: #1a1a1a;
}

.belt-product-specs {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.belt-product-specs th {
    text-align: left;
    padding: 12px 16px;
    background: #f7f7f7;
    font-weight: 500;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    width: 40%;
}

.belt-product-specs td {
    padding: 12px 16px;
    font-size: 14px;
    color: #1a1a1a;
    border-bottom: 1px solid #e0e0e0;
}

.belt-inquire-button {
    display: inline-block;
    padding: 14px 40px;
    background: #2b6cb0;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    text-align: center;
    transition: background 0.2s;
    align-self: flex-start;
}

.belt-inquire-button:hover {
    background: #1e4e8c;
    color: #fff;
}

.belt-product-description {
    margin-bottom: 48px;
    line-height: 1.8;
}

.belt-product-description h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2b6cb0;
    display: inline-block;
}

.belt-related-products {
    border-top: 1px solid #eee;
    padding-top: 32px;
}

.belt-related-products h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* ===== Product Archive Layout ===== */

.belt-archive-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}

/* Category Sidebar */
.belt-category-sidebar {
    position: sticky;
    top: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 16px;
}

.belt-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #1a1a1a;
}

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

.belt-category-nav > li {
    margin-bottom: 4px;
}

.belt-category-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.belt-category-nav a:hover {
    background: #eef4fb;
    color: #2b6cb0;
}

.belt-category-nav .belt-cat-active {
    background: #2b6cb0;
    color: #fff;
}

.belt-category-nav .belt-cat-active:hover {
    background: #1e4e8c;
    color: #fff;
}

.belt-cat-count {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 400;
}

.belt-cat-parent > a {
    font-weight: 500;
}

.belt-cat-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
}

.belt-cat-children > li {
    margin-bottom: 2px;
}

.belt-cat-children a {
    font-size: 13px;
    padding: 6px 12px;
}

.belt-archive-main {
    min-width: 0;
}

.belt-archive-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.belt-archive-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.belt-archive-header p {
    color: #666;
    margin: 8px 0 0;
    font-size: 14px;
}

.belt-no-products {
    color: #666;
    font-size: 14px;
    padding: 40px 0;
    text-align: center;
}

/* ===== Product Grid (Archive) ===== */

.belt-product-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.belt-product-card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.belt-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #ccc;
}

.belt-product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.belt-product-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}

.belt-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.belt-product-card:hover .belt-product-card-image img {
    transform: scale(1.05);
}

.belt-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f5f5f5;
}

.belt-card-no-image span {
    color: #aaa;
    font-size: 13px;
}

.belt-product-card-body {
    padding: 16px;
}

.belt-product-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.4;
}

.belt-product-card-model {
    font-size: 13px;
    color: #888;
    margin: 0 0 8px;
    font-family: monospace;
}

.belt-product-card-specs {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 12px;
}

.belt-product-card-specs span {
    white-space: nowrap;
}

.belt-spec-sep {
    color: #ccc;
}

.belt-product-card-btn {
    display: inline-block;
    padding: 6px 18px;
    background: #2b6cb0;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.belt-product-card:hover .belt-product-card-btn {
    background: #1e4e8c;
}

/* ===== Responsive ===== */

@media (max-width: 921px) {
    .belt-archive-layout {
        grid-template-columns: 1fr;
    }

    .belt-category-sidebar {
        position: static;
    }

    .belt-category-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .belt-category-nav > li {
        margin-bottom: 0;
    }

    .belt-cat-children {
        padding-left: 0;
        display: none;
    }
}

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

    .belt-product-title {
        font-size: 22px;
    }

    .belt-product-grid-cards {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .belt-gallery-thumbs {
        gap: 8px;
    }

    .belt-thumb {
        width: 60px;
        height: 60px;
    }
}

/* ===== Language Switcher ===== */
