/*
Theme Name: Potech
Theme URI: https://hotantien.com
Author: Hồ Tân Tiến
Author URI: https://hotantien.com
Description: A custom WordPress theme utilizing Bootstrap 5 for Potech.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: potech
*/

/* Custom CSS goes below */

:root {
    --bs-primary: #eec715;
    --bs-primary-rgb: 238, 199, 21;
    --bs-link-color: #eec715;
    --bs-link-hover-color: #cca90f;
    --bs-font-sans-serif: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
}

.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.btn-primary {
    --bs-btn-color: #000;
    --bs-btn-bg: #eec715;
    --bs-btn-border-color: #eec715;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #d7b311;
    --bs-btn-hover-border-color: #cca90f;
    --bs-btn-focus-shadow-rgb: 202, 172, 27;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #cca90f;
    --bs-btn-active-border-color: #c09e0e;
}

.btn-outline-primary {
    --bs-btn-color: #eec715;
    --bs-btn-border-color: #eec715;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #eec715;
    --bs-btn-hover-border-color: #eec715;
    --bs-btn-focus-shadow-rgb: 238, 199, 21;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #eec715;
    --bs-btn-active-border-color: #eec715;
}

/* Custom Styles for Homepage Layout */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fs-7 {
    font-size: 0.85rem;
}

.hover-primary {
    transition: color 0.2s ease;
}

.hover-primary:hover {
    color: var(--bs-primary) !important;
}

/* Custom button shapes */
.rounded-potech {
    border-radius: 4px;
    /* Slight rounding for dark buttons */
}

/* Navbar overrides */
.navbar-nav .nav-link {
    color: #fff !important;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .current-menu-item>a {
    color: var(--bs-primary) !important;
}

#masthead {
    border-bottom: 2px solid #555;
}

/* Features Bar */
.custom-border-secondary {
    border-color: #555 !important;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

/* Video Section */
.video-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #1a1a1a !important;
    /* ensure solid dark base for shadow */
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8) !important;
}

.video-card .rounded-circle {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.video-card:hover .rounded-circle {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(238, 199, 21, 0.6) !important;
}

/* News Cards */
.news-card {
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

/* Floating Elements Utility */
.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

/* =======================================
   Dropdown Menu Hover
   ======================================= */
.navbar-nav .menu-item-has-children {
    position: relative;
}

/* Arrow indicator for items with children */
.navbar-nav .menu-item-has-children>a::after {
    content: "\F282";
    /* bi-chevron-down */
    font-family: "bootstrap-icons" !important;
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.8em;
    font-weight: bold;
    vertical-align: middle;
}

/* Arrow indicator for nested sub-menus (pointing right) */
.navbar-nav .sub-menu .menu-item-has-children>a::after {
    content: "\F285";
    /* bi-chevron-right */
    float: right;
    margin-top: 0.2rem;
}

/* Base styles for sub-menu */
.navbar-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    /* Hide by default */
    min-width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #212529;
    /* Match bg-dark navbar */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    list-style: none;
}

/* Support for multi-level nested menus */
.navbar-nav .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

.navbar-nav .sub-menu .nav-item {
    margin: 0;
    width: 100%;
}

.navbar-nav .sub-menu .nav-link {
    display: block;
    width: 100%;
    padding: 0.5rem 1.2rem;
    clear: both;
    font-weight: 500;
    color: #fff !important;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-transform: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.navbar-nav .sub-menu .nav-link:hover {
    color: var(--bs-primary) !important;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 1.5rem;
}

/* Only display on hover */
.navbar-nav .menu-item-has-children:hover>.sub-menu {
    display: block;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .navbar-nav .sub-menu {
        position: relative;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background-color: transparent;
    }

    .navbar-nav .sub-menu .sub-menu {
        left: 0;
    }
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================
   WooCommerce Specific Overrides
   ======================================= */

.custom-corner-wrapper {
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-corner-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.custom-corner-wrapper::before,
.custom-corner-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 25px;
    height: 25px;
    border-bottom: 2px solid var(--bs-primary);
}

.custom-corner-wrapper::before {
    left: 0;
    border-left: 2px solid var(--bs-primary);
}

.custom-corner-wrapper::after {
    right: 0;
    border-right: 2px solid var(--bs-primary);
}

/* WooCommerce Pagination */
.woocommerce-pagination .page-numbers {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 3rem;
    gap: 0.5rem;
}

.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #999;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 2px;
    transition: background 0.3s;
}

.woocommerce-pagination .page-numbers span.current {
    background: var(--bs-primary);
    color: #000;
}

/* Product Image Full-Width & Zoom Effect */
.product-image-wrapper {
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect ratio (Square) */
    position: relative;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

/* Top corner brackets */
.product-image-wrapper::before,
.product-image-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 25px;
    height: 25px;
    border-top: 2px solid var(--bs-primary);
    z-index: 5;
    pointer-events: none;
}

.product-image-wrapper::before {
    left: 0;
    border-left: 2px solid var(--bs-primary);
}

.product-image-wrapper::after {
    right: 0;
    border-right: 2px solid var(--bs-primary);
}

.product-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    z-index: 1;
}

/* Hover effects */
.product-card-hover:hover .product-image-bg {
    transform: scale(1.1);
}

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

.breadcrumbs-container p {
    margin-bottom: 0 !important;
}

.custom-short-description ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.custom-short-description ul li {
    position: relative;
    padding: 12px 20px 12px 45px;
    margin-bottom: 12px;
    border: 1px solid rgb(255 149 0 / 8%);
    border-radius: 10px;
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.custom-short-description ul li:hover {
    border-color: #f78d1e;
    box-shadow: 0 4px 12px rgba(247, 141, 30, 0.15);
    transform: translateY(-2px);
}

.custom-short-description ul li::before {
    content: "\F26B";
    /* Bootstrap Icon bi-check-circle */
    font-family: "bootstrap-icons" !important;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-primary);
    font-size: 1.25rem;
    font-weight: normal;
    transition: color 0.3s ease;
}

.custom-short-description ul li:hover::before {
    color: #f78d1e;
}

.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    /* Optional for a slight polish in content */
}

/* Contact Form Styling */
.contact-form-wrapper {
    background: #fdfdfd;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.contact-form-wrapper .form-control,
.potech-form-container .form-control {
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.contact-form-wrapper .form-control:focus,
.potech-form-container .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(238, 199, 21, 0.15);
    outline: none;
}

.contact-form-wrapper label,
.potech-form-container label {
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    display: block;
    font-size: 1rem;
}

.btn-submit {
    background-color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
    color: #000;
    font-weight: 800;
    padding: 16px 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(238, 199, 21, 0.3);
}

.btn-submit:hover {
    background-color: #000;
    border-color: #000;
    color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.contact-map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}