/*
Theme Name: Solartech
Theme URI: https://example.com/solartech
Author: Solartech
Author URI: https://example.com
Description: Solartech - a renewable & solar energy WordPress theme converted from the Solartec HTML template. Features a full-width homepage with hero carousel, services, projects, team, testimonials and a free-quote section built on Bootstrap 5.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solartech
Tags: business, energy, one-column, two-columns, right-sidebar, custom-menu, featured-images, full-width-template, translation-ready
*/

/*
 * The visual styles for this theme live in:
 *   assets/css/bootstrap.min.css   (customised Bootstrap 5)
 *   assets/css/style.css           (template styles)
 * These are enqueued from functions.php. Add theme overrides below.
 */

/*** WordPress core alignment & caption helpers ***/
.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 0.5rem auto 1.5rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text,
.wp-caption .wp-caption-text {
    font-size: 0.875rem;
    font-style: italic;
    color: #6c757d;
    margin-top: 0.5rem;
}

.sticky,
.bypostauthor {
    display: block;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/*** Post / content typography ***/
.entry-content {
    margin-bottom: 1.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.post-navigation,
.posts-navigation {
    margin: 2rem 0;
}

/*** Comments ***/
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
}

.comment-body {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--light, #F6F7F8);
    border-radius: 0.35rem;
}

/*** WordPress admin bar spacing fix for sticky navbar ***/
.admin-bar .navbar.sticky-top {
    top: -100px;
}

/* =====================================================================
   Single product page (Sản phẩm)
   ===================================================================== */

/*** Gallery ***/
.product-gallery__main {
    border: 1px solid #e6e8ea;
    background: #fff;
}

.product-gallery__thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #e6e8ea;
    border-radius: 0.35rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
    border-color: var(--primary, #32C36C);
    box-shadow: 0 0 0 1px var(--primary, #32C36C);
}

/* =====================================================================
   Sidebar widgets (bài viết mới, danh mục, lưu trữ, tìm kiếm…)

   Scoped to .widget-area so the footer widget columns keep their own look.
   Covers both classic widgets and the block editor's markup.
   ===================================================================== */

.widget-area .widget {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e6e8ea;
    border-radius: 0.5rem;
}

.widget-area .widget:last-child {
    margin-bottom: 0 !important;
}

/*** Widget title ***/
.widget-area .widget-title,
.widget-area .widget h2,
.widget-area .widget h3 {
    position: relative;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    font-family: 'Roboto', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark, #1A2A36);
    border-bottom: 1px solid #e6e8ea;
}

.widget-area .widget-title::after,
.widget-area .widget h2::after,
.widget-area .widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: var(--primary, #32C36C);
}

/*** Lists: bài viết mới, danh mục, lưu trữ, bình luận ***/
.widget-area .widget ul,
.widget-area .widget ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-area .widget li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px dashed #e6e8ea;
    font-size: 0.95rem;
    /* The "(12)" count after a category link inherits this muted colour. */
    color: #9B9B9B;
}

.widget-area .widget li:first-child {
    padding-top: 0;
}

.widget-area .widget li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.widget-area .widget a {
    color: var(--dark, #1A2A36);
    text-decoration: none;
    transition: color 0.25s ease;
}

.widget-area .widget a:hover {
    color: var(--primary, #32C36C);
}

/* Nested category children get their own indented block. */
.widget-area .widget li > ul {
    flex: 0 0 100%;
    margin-top: 0.65rem;
    padding-left: 0.9rem;
    border-left: 2px solid #e6e8ea;
}

.widget-area .widget li > ul li:first-child {
    padding-top: 0.65rem;
}

/*** Latest posts / latest comments extras ***/
.widget-area .wp-block-latest-posts__post-title {
    font-weight: 500;
    line-height: 1.45;
}

.widget-area .wp-block-latest-posts__post-date,
.widget-area .wp-block-latest-comments__comment-meta {
    flex: 0 0 100%;
    margin-top: 0.2rem;
    font-size: 0.825rem;
    color: #9B9B9B;
}

.widget-area .wp-block-latest-posts__post-excerpt {
    flex: 0 0 100%;
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #9B9B9B;
}

.widget-area .wp-block-latest-comments__comment {
    /* Core reserves space for an avatar even when it is turned off. */
    min-height: 0;
    margin: 0;
}

.widget-area .wp-block-latest-comments__comment-author {
    font-weight: 500;
    color: var(--dark, #1A2A36);
}

/*** Dropdown variants (Lưu trữ / Danh mục hiển thị dạng select) ***/
.widget-area .widget select {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e6e8ea;
    border-radius: 0.35rem;
    background: #fff;
    color: var(--dark, #1A2A36);
}

/*** Search block ***/
.widget-area .wp-block-search__inside-wrapper {
    gap: 0.5rem;
}

.widget-area .wp-block-search__input {
    padding: 0.65rem 0.9rem;
    border: 1px solid #e6e8ea;
    border-radius: 0.35rem;
}

.widget-area .wp-block-search__input:focus {
    outline: 0;
    border-color: var(--primary, #32C36C);
}

.widget-area .wp-block-search__button {
    padding: 0.65rem 1.25rem;
    border: 0;
    border-radius: 0.35rem;
    background: var(--primary, #32C36C);
    color: #fff;
    font-weight: 500;
    transition: background 0.25s ease;
}

.widget-area .wp-block-search__button:hover {
    background: #28a75a;
}

/*** Tag cloud ***/
.widget-area .tagcloud a,
.widget-area .wp-block-tag-cloud a {
    display: inline-block;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.3rem 0.8rem;
    border: 1px solid #e6e8ea;
    border-radius: 2rem;
    font-size: 0.85rem !important;
    color: #9B9B9B;
}

.widget-area .tagcloud a:hover,
.widget-area .wp-block-tag-cloud a:hover {
    border-color: var(--primary, #32C36C);
    color: var(--primary, #32C36C);
}

/*** Decorative kicker above a section title (was an <h6>) ***/
.section-kicker {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

/*** Breadcrumb-only banner (no <h1>): keep the strip slim ***/
.page-header--breadcrumb-only {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 3rem !important;
}

.page-header--breadcrumb-only > .container {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

/*** Category line under the product title ***/
.product-cats {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
}

.product-cats a {
    color: var(--primary, #32C36C);
    text-decoration: none;
}

.product-cats a:hover {
    text-decoration: underline;
}

/*** Stock badge ***/
.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.product-stock.is-in {
    color: #1c7a45;
    background: rgba(50, 195, 108, 0.14);
}

.product-stock.is-out {
    color: #b02a2a;
    background: rgba(220, 53, 69, 0.12);
}

.product-stock.is-contact {
    color: #9a6400;
    background: rgba(255, 168, 0, 0.16);
}

/*** Price box ***/
.product-price-box {
    background: var(--light, #F6F7F8);
    border: 1px solid #e6e8ea;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.product-price__label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-price__value {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.product-price--retail .product-price__value {
    font-size: 1.75rem;
    color: var(--primary, #32C36C);
}

.product-price--installer .product-price__value {
    font-size: 1.35rem;
    color: var(--dark, #1A2A36);
}

.product-price__note {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d7dade;
    font-size: 0.85rem;
    color: #6c757d;
}

@media (min-width: 576px) {
    .product-price--installer {
        padding-left: 1.25rem;
        border-left: 1px dashed #d7dade;
    }
}

.product-quick-info {
    margin-bottom: 1.5rem;
}

.product-quick-info p:last-child {
    margin-bottom: 0;
}

/*** Tình trạng + datasheet, ngay trước các nút hành động ***/
.product-meta-list {
    margin-bottom: 1.5rem;
    border-top: 1px solid #e6e8ea;
}

.product-meta-list__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e6e8ea;
}

.product-meta-list__label {
    flex: 0 0 auto;
    min-width: 130px;
    color: #6c757d;
}

/*** Datasheet download ***/
.product-datasheet {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid #e6e8ea;
    border-left: 3px solid var(--primary, #32C36C);
    border-radius: 0.35rem;
    background: #fff;
    color: var(--dark, #1A2A36);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.product-datasheet:hover {
    background: var(--light, #F6F7F8);
    color: var(--primary, #32C36C);
}

.product-datasheet > .fa-file-alt {
    font-size: 1.15rem;
    color: var(--primary, #32C36C);
}

/*** Action buttons ***/
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    border: 0;
}

.btn-action i {
    font-size: 1rem;
}

.btn-zalo,
.btn-zalo:focus {
    background: #0068FF;
    color: #fff;
}

.btn-zalo:hover {
    background: #0055d4;
    color: #fff;
}

.btn-call,
.btn-call:focus {
    background: var(--dark, #1A2A36);
    color: #fff;
}

.btn-call:hover {
    background: #0f1b24;
    color: #fff;
}

.btn-call__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.btn-call__text small {
    font-size: 0.7rem;
    opacity: 0.75;
}

.btn-call__text strong {
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .product-actions {
        gap: 0.5rem;
    }

    .btn-action {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/*** Tabs ***/
.product-tabs .nav-tabs {
    border-bottom: 2px solid #e6e8ea;
    gap: 0.25rem;
}

.product-tabs .nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.85rem 1.5rem;
    color: #6c757d;
    font-weight: 500;
    background: none;
}

.product-tabs .nav-tabs .nav-link:hover {
    color: var(--primary, #32C36C);
}

.product-tabs .nav-tabs .nav-link.active {
    color: var(--primary, #32C36C);
    border-bottom-color: var(--primary, #32C36C);
    background: none;
}

.product-tabs .tab-content {
    padding: 2rem 0 0;
}

.product-description img {
    max-width: 100%;
    height: auto;
}

/*** Data tables: bảng so sánh + bảng chèn trong mô tả sản phẩm / bài viết ***/
/* Border color matches the body text colour so the grid reads as one piece. */
:root {
    --table-border: #9B9B9B;
}

.product-compare,
.product-description table,
.product-quick-info table,
.entry-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    border: 1px solid var(--table-border);
}

.product-compare th,
.product-compare td,
.product-description table th,
.product-description table td,
.product-quick-info table th,
.product-quick-info table td,
.entry-content table th,
.entry-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--table-border);
    vertical-align: middle;
}

.product-description table th,
.product-quick-info table th,
.entry-content table th {
    font-weight: 500;
    color: var(--dark, #1A2A36);
    background: var(--light, #F6F7F8);
    text-align: left;
}

/* Wide tables scroll sideways instead of breaking the layout on phones. */
@media (max-width: 767.98px) {
    .product-description table,
    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/*** Quick comparison table (sản phẩm cùng danh mục) ***/
.product-compare {
    margin-bottom: 0;
}

.product-compare thead th {
    background: var(--dark, #1A2A36);
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.9rem 1rem;
}

.product-compare tbody th,
.product-compare tbody td {
    padding: 0.9rem 1rem;
}

/* Only the product name stays left-aligned; the rest reads better centred. */
.product-compare thead th:not(:first-child),
.product-compare tbody td {
    text-align: center;
}

.product-compare tbody th {
    font-weight: 500;
    min-width: 220px;
}

.product-compare tbody th a {
    color: var(--dark, #1A2A36);
    text-decoration: none;
}

.product-compare tbody th a:hover {
    color: var(--primary, #32C36C);
}

.product-compare tbody tr.is-current {
    background: rgba(50, 195, 108, 0.08);
}

.product-compare__badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
    background: var(--primary, #32C36C);
    vertical-align: middle;
}

.product-compare__price {
    font-weight: 700;
    color: var(--primary, #32C36C);
    white-space: nowrap;
}

/*** Price on product cards (archive + "sản phẩm tương tự") ***/
.product-card__price {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary, #32C36C);
}

.product-card__price--ask {
    font-size: 0.95rem;
    color: #6c757d;
}
