/*
Theme Name: PT FitMall Theme
Theme URI: https://elementor.com/
Description: Giao diện con của Hello Elementor, được tối ưu hóa với Header, Footer tùy chỉnh và các mẫu (template) giao diện siêu mượt.
Author: TEMBASE
Author URI: https://tembase.vn/
Template: hello-elementor
Version: 1.4.2
*/


:root {
    --ptfc-primary: #000000;
    --ptfc-primary-hover: #333333;
    --ptfc-primary-light: #f1f1f1;
}
/* Global Typography */
body, html, input, button, select, textarea, .elementor-widget-text-editor, .elementor-heading-title, p, a, h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Single News Title Fix */
.single-post main .entry-title, 
.single-post main h1,
.single-post .elementor-widget-theme-post-title .elementor-heading-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

/* Single News Content Headings */
.single-post .elementor-widget-theme-post-content h2,
.single-post .entry-content h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.single-post .elementor-widget-theme-post-content h3,
.single-post .entry-content h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

.single-post .elementor-widget-theme-post-content h4,
.single-post .entry-content h4 {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* Custom Header Styling */
.ptfc-site-header {
    background: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}
.ptfc-site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.ptfc-header-container {
    max-width: 1240px;
    margin: 0 auto;
}
.ptfc-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
    transition: padding 0.3s ease;
}
.ptfc-site-header.is-sticky .ptfc-header-main {
    padding: 10px 0;
}
.ptfc-header-logo img {
    max-height: 65px;
    height: auto;
    display: block;
    transition: max-height 0.3s ease;
}

.ptfc-header-logo .site-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ptfc-primary);
}
.ptfc-header-sub-wrapper {
    max-height: 150px;
    opacity: 1;
    overflow: visible; /* Changed from hidden to show dropdowns */
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background-color: #000000;
    position: relative;
    z-index: 100; /* Ensure header sub bar layers over content */
}
/* .ptfc-site-header.is-sticky .ptfc-header-sub-wrapper { max-height: 0; opacity: 0; border: none; overflow: hidden; } - Removed for full sticky menu */
.ptfc-header-search {
    flex: 1;
    max-width: 600px;
}
/* Style adjustments for search input in header */
.ptfc-header-search .ptfc-search-bar {
    margin-bottom: 0;
}
.ptfc-header-search .ptfc-search-input {
    border-radius: 50px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding-left: 45px;
}
.ptfc-mobile-search-row {
    display: block;
}
.ptfc-mobile-category-toggle {
    display: none;
}
.ptfc-mobile-category-canvas {
    display: none;
}
.ptfc-header-user-cart {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ptfc-header-user {
    display: flex;
    align-items: center;
    padding-left: 20px;
    border-left: 1.5px solid #e2e8f0;
}
.ptfc-header-cart-link, .ptfc-header-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}
.ptfc-header-cart-link:hover, .ptfc-header-user-link:hover {
    color: var(--ptfc-primary);
}
.ptfc-cart-icon-wrap {
    position: relative;
}
.ptfc-cart-label {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}
.ptfc-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--ptfc-primary);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Sub Header Row 2 */
.ptfc-header-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.ptfc-header-sub-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}
.ptfc-main-nav {
    margin-left: auto;
    margin-right: 25px; /* Giảm sát nút để không bị quá gần */
}
.ptfc-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}
.ptfc-menu-links li {
    position: relative;
    padding: 10px 0;
}
.ptfc-menu-links li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ptfc-menu-links li a:hover {
    color: #cbd5e1;
}

/* Arrow indicator for parent menu items */
.ptfc-menu-links .menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
}
.ptfc-menu-links .menu-item-has-children:hover > a::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* Submenu dropdown logic */
.ptfc-menu-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}
.ptfc-menu-links li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ptfc-menu-links .sub-menu li {
    padding: 0;
}
.ptfc-menu-links .sub-menu li a {
    padding: 8px 16px;
    font-weight: 500;
    color: #475569;
    font-size: 13px;
    transition: all 0.2s;
    display: block;
}
.ptfc-menu-links .sub-menu li a::after {
    display: none !important; /* No arrows on child items */
}
.ptfc-menu-links .sub-menu li a:hover {
    background: #f8fafc;
    color: var(--ptfc-primary);
}
.ptfc-header-cta-btn {
    background: #ffffff;
    color: #000000;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    transition: background 0.2s;
}
.ptfc-header-cta-btn:hover {
    background: #f1f5f9;
    color: #000000;
}

/* Header navigation: regular dropdown submenus on desktop */
@media (min-width: 769px) {
    .ptfc-main-nav {
        position: relative;
        min-width: 0;
    }

    .ptfc-menu-links {
        gap: 22px;
        white-space: nowrap;
    }

    .ptfc-menu-links > li.menu-item-has-children {
        position: relative;
    }

    .ptfc-menu-links > li.menu-item-has-children > .sub-menu {
        left: 0;
        right: auto;
        width: max-content;
        min-width: 220px;
        max-width: min(360px, calc(100vw - 40px));
        max-height: min(380px, calc(100vh - 100px));
        overflow-x: hidden;
        overflow-y: auto;
        display: block;
        padding: 8px 0;
        border-radius: 8px;
        transform: translateY(10px);
        white-space: normal;
    }

    .ptfc-menu-links > li.menu-item-has-children:hover > .sub-menu {
        transform: translateY(0);
    }

    .ptfc-menu-links > li.menu-item-has-children > .sub-menu > li {
        min-width: 0;
    }

    .ptfc-menu-links > li.menu-item-has-children > .sub-menu > li > a {
        display: flex;
        align-items: center;
        min-height: 0;
        padding: 10px 16px;
        border-radius: 0;
        line-height: 1.35;
        white-space: normal;
        overflow-wrap: anywhere;
        gap: 10px;
    }
    .ptfc-menu-links > li.menu-item-has-children > .sub-menu > li > a::before {
        display: none;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > a::after {
        display: block !important;
        width: 7px;
        height: 7px;
        margin: 0 0 0 auto;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(-45deg);
        opacity: 0.65;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children:hover > a::after {
        transform: rotate(-45deg) translate(-2px, 2px);
        opacity: 1;
    }

    /* Không cắt panel cấp 3 ở mép phải của submenu cấp 2. */
    .ptfc-menu-links > li.menu-item-has-children > .sub-menu:has(.menu-item-has-children) {
        max-height: min(380px, calc(100vh - 100px));
        overflow-y: auto;
        overflow-x: hidden;
    }
    .ptfc-menu-links > li.menu-item-has-children:hover > .sub-menu:has(.menu-item-has-children) {
        transform: none;
    }

    /* Submenu cấp 3 hiển thị ngang bên phải submenu cấp 2. */
    .ptfc-menu-links .sub-menu .menu-item-has-children {
        position: relative;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > .sub-menu {
        top: -8px;
        left: 100%;
        min-width: 260px;
        max-height: none;
        height: auto;
        overflow: visible;
        padding: 8px 0;
        border-radius: 10px;
        box-shadow: 12px 12px 32px rgba(15, 23, 42, 0.12);
        transform: translateX(10px);
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > .sub-menu > li > a {
        padding: 10px 16px;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children:hover > .sub-menu {
        transform: translateX(0);
    }
    .ptfc-floating-submenu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #fff;
        border: 1px solid #f1f5f9;
        border-radius: 10px;
        box-shadow: 12px 12px 32px rgba(15, 23, 42, 0.12);
        padding: 8px 0;
        min-width: 260px;
        transform: none !important;
        overflow-x: hidden;
    }
    .ptfc-floating-submenu li {
        list-style: none;
    }
    .ptfc-floating-submenu li a {
        display: block;
        padding: 10px 16px;
        color: #475569;
        text-decoration: none;
        font-size: 14px;
        white-space: normal;
    }
    .ptfc-floating-submenu li a:hover {
        background: #f8fafc;
        color: var(--ptfc-primary);
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children.submenu-panel-open > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .ptfc-menu-links > li.menu-item-has-children > .sub-menu::-webkit-scrollbar {
        width: 3px;
    }
    .ptfc-menu-links > li.menu-item-has-children > .sub-menu::-webkit-scrollbar-track {
        background: transparent;
    }
    .ptfc-menu-links > li.menu-item-has-children > .sub-menu::-webkit-scrollbar-thumb {
        background: #000;
        border-radius: 999px;
    }
}

/* Category menu styling in subheader */
.ptfc-categories-menu-wrap .ptfc-category-menu {
    margin-bottom: 0;
}
.ptfc-categories-menu-wrap .ptfc-cat-btn {
    background: transparent;
    border: none;
    font-weight: 700;
    color: #ffffff;
    padding: 8px 0;
}
.ptfc-categories-menu-wrap .ptfc-cat-btn::before {
    display: none; /* remove background border */
}

/* Custom Footer Styling */
.ptfc-site-footer {
    background: #fff;
    border-top: 1px solid #f5f5f5;
    padding: 60px 0 30px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #475569;
}
.ptfc-footer-container {
    max-width: 1240px;
    margin: 0 auto;
}
.ptfc-footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.ptfc-footer-logo img {
    max-height: 65px;
    margin-bottom: 20px;
}
.ptfc-footer-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #64748b;
}
.ptfc-footer-contact a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.ptfc-footer-contact a:hover {
    color: var(--ptfc-primary);
}
.ptfc-footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.ptfc-footer-socials a {
    color: #64748b;
    transition: color 0.2s;
}
.ptfc-footer-socials a:hover {
    color: var(--ptfc-primary);
}
.ptfc-footer-col-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
}
.ptfc-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ptfc-footer-menu li {
    margin-bottom: 12px;
}
.ptfc-footer-menu li a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.ptfc-footer-menu li a:hover {
    color: var(--ptfc-primary);
}
.ptfc-footer-bottom {
    padding-top: 25px;
    text-align: center;
}
.ptfc-footer-copyright {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* News Archive Page */
.ptfc-archive-container {
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 15px;
}
.ptfc-archive-container .page-header {
    margin-bottom: 40px;
}
.ptfc-archive-container .page-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}
.ptfc-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.ptfc-pagination .nav-links {
    display: flex;
    gap: 8px;
}
.ptfc-pagination .page-numbers {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
}
.ptfc-pagination .page-numbers.current, .ptfc-pagination .page-numbers:hover {
    background: var(--ptfc-primary);
    border-color: var(--ptfc-primary);
    color: #fff;
}

/* Single Post Page */
.ptfc-single-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 15px;
}
.ptfc-single-post .entry-header {
    margin-bottom: 30px;
}
.ptfc-single-post .entry-meta {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
}
.ptfc-single-post .cat-links {
    color: var(--ptfc-primary);
    font-weight: 600;
}
.ptfc-single-post .entry-title {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}
.ptfc-single-post .post-thumbnail {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 40px;
}
.ptfc-single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}
.ptfc-single-post .entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
}
.ptfc-single-post .entry-content p {
    margin-bottom: 25px;
}
.ptfc-single-post .entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    color: #64748b;
}
.ptfc-single-post .tags-links a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}
.ptfc-single-post .tags-links a:hover {
    color: var(--ptfc-primary);
}

/* Related Posts Section */
.ptfc-related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed #cbd5e1;
}
.ptfc-related-posts .related-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 30px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .ptfc-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .ptfc-footer-info-col {
        grid-column: span 2;
    }
}
@media (max-width: 768px) {
    .ptfc-header-main {
        flex-direction: column;
        align-items: stretch;
    }
    .ptfc-header-search {
        order: 3;
        width: 100%;
    }
    .ptfc-header-user-cart {
        justify-content: flex-end;
    }
    .ptfc-header-sub {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .ptfc-header-sub-left {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .ptfc-menu-links {
        justify-content: center;
    }
    .ptfc-header-sub-right {
        text-align: center;
    }
    .ptfc-header-cta-btn {
        width: 100%;
        text-align: center;
        background: #000000 !important;
        color: #ffffff !important;
    }
    .ptfc-header-cta-btn:hover,
    .ptfc-header-cta-btn:focus {
        background: #222222 !important;
        color: #ffffff !important;
    }
    .ptfc-footer-main {
        grid-template-columns: 1fr;
    }
    .ptfc-footer-info-col {
        grid-column: span 1;
    }
    .ptfc-footer-desc,
    .ptfc-footer-menu li a {
        font-size: 15px;
    }
    .ptfc-single-post .entry-title {
        font-size: 28px;
    }
}

/* Off-canvas Cart */
.ptfc-cart-canvas-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 99998; opacity: 0; visibility: hidden; transition: all 0.3s; }
.ptfc-cart-canvas-overlay.open { opacity: 1; visibility: visible; }
.ptfc-cart-canvas { position: fixed; top: 0; right: -400px; width: 400px; max-width: 100vw; bottom: 0; background: #fff; z-index: 99999; box-shadow: -5px 0 20px rgba(0,0,0,0.1); transition: right 0.3s ease; display: flex; flex-direction: column; }
.ptfc-cart-canvas.open { right: 0; }
.ptfc-cart-canvas-header { padding: 20px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.ptfc-cart-canvas-header h3 { margin: 0; font-size: 18px; font-weight: bold; color: #0f172a; }
.ptfc-cart-canvas-close { background: #f8fafc; border: none; cursor: pointer; padding: 5px; border-radius: 5px; color: #64748b; display: flex; align-items: center; justify-content: center; }
.ptfc-cart-canvas-close:hover { background: #e2e8f0; color: #0f172a; }
.ptfc-cart-canvas-content { padding: 20px; overflow-y: auto; flex: 1; }
/* Custom Mini Cart */
.ptfc-custom-mini-cart { display: flex; flex-direction: column; height: 100%; }
.ptfc-mini-cart-items { flex: 1; overflow-y: auto; padding-right: 5px; }
.ptfc-mini-cart-item { display: flex; align-items: flex-start; gap: 15px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; position: relative; }
.ptfc-mc-img { width: 70px; flex-shrink: 0; }
.ptfc-mc-img img { width: 100%; height: 70px; object-fit: cover; border-radius: 8px; }
.ptfc-mc-info { flex: 1; padding-right: 20px; }
.ptfc-mc-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ptfc-mc-title a { color: #0f172a; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptfc-mc-title a:hover { color: var(--ptfc-primary); }
.ptfc-mc-info dl.variation { font-size: 11px; color: #64748b; margin: 2px 0 8px; padding: 0; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.ptfc-mc-info dl.variation dt { font-weight: 600; margin: 0; padding: 0; }
.ptfc-mc-info dl.variation dd { margin: 0; padding: 0; display: flex; align-items: center; }
.ptfc-mc-info dl.variation dd p { margin: 0; padding: 0; display: inline; }
.ptfc-mc-info dl.variation dd:not(:last-child):after { content: " | "; margin-left: 6px; color: #cbd5e1; font-weight: normal; }
.ptfc-mc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.ptfc-mc-qty { color: #64748b; }
.ptfc-mc-price { color: var(--ptfc-primary); font-weight: bold; }
.ptfc-mc-remove { position: absolute; right: 0; top: 0; }
.ptfc-mc-remove a { color: #cbd5e1; font-size: 24px; text-decoration: none; line-height: 1; transition: color 0.3s; }
.ptfc-mc-remove a:hover { background: #fee2e2; color: #ef4444; }
.ptfc-mc-qty-group { display: inline-flex; align-items: stretch; background: #fff; border: 1px solid #cbd5e1 !important; border-radius: 6px !important; overflow: hidden; width: 95px !important; height: 25px !important; box-shadow: none !important; margin-top: 5px; }
.ptfc-qty-btn { background: #f8fafc !important; border: none !important; width: 25px !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; color: #475569 !important; font-size: 15px !important; font-weight: 600 !important; transition: all 0.2s ease; padding: 0 !important; margin: 0 !important; line-height: 1 !important; font-family: monospace !important; }
.ptfc-qty-btn:hover { background: #e2e8f0 !important; color: var(--ptfc-primary-hover) !important; }
.ptfc-qty-input { flex: 1 !important; min-width: 0 !important; height: auto !important; border: none !important; border-left: 1px solid #cbd5e1 !important; border-right: 1px solid #cbd5e1 !important; text-align: center !important; font-size: 14px !important; font-weight: 700 !important; color: #0f172a !important; background: transparent !important; padding: 0 !important; margin: 0 !important; line-height: 23px !important; border-radius: 0 !important; box-shadow: none !important; -moz-appearance: textfield; pointer-events: none; }
.ptfc-qty-input::-webkit-outer-spin-button, .ptfc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }

.ptfc-mini-cart-footer { padding-top: 20px; border-top: 1px solid #f1f5f9; margin-top: auto; }
.ptfc-mc-total { display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 20px; color: #0f172a; }
.ptfc-mc-total span { font-weight: 700; color: var(--ptfc-primary); font-size: 18px; }
.ptfc-btn { display: block; width: 100%; padding: 12px; text-align: center; border-radius: 25px; text-decoration: none; font-weight: bold; transition: opacity 0.3s; color: #fff; }
.ptfc-btn:hover { opacity: 0.9; color: #fff; }
.ptfc-btn-export-quote { background-color: #3b82f6; } /* Blue */
.ptfc-btn-export-quote-excel { background-color: #10b981; } /* Green */
.ptfc-btn-checkout { background-color: var(--ptfc-primary); } /* Orange */
.ptfc-cart-canvas.updating { opacity: 0.7; pointer-events: none; }
.ptfc-btn-checkout { background: var(--ptfc-primary); color: #fff; }
.ptfc-btn-checkout:hover { background: #e66000; }
.ptfc-empty-cart { text-align: center; color: #64748b; padding: 40px 0; }

@media (max-width: 768px) {
    /* Keep the sticky header/canvas above the dimming overlay after scrolling. */
    .ptfc-site-header,
    .ptfc-site-header.is-sticky {
        z-index: 1000002 !important;
    }
    .ptfc-header-container, .ptfc-footer-container {
        padding: 0 15px;
    }
    .ptfc-site-header {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }
    .ptfc-header-main {
        display: grid !important;
        grid-template-columns: 96px minmax(0, 1fr) 60px;
        grid-template-rows: auto auto;
        justify-content: stretch !important;
        align-items: center !important;
        gap: 0 !important;
    }
    .ptfc-mobile-menu-toggle {
        display: flex !important;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        cursor: pointer;
        color: #0f172a;
        width: 96px;
        min-width: 96px;
        white-space: nowrap;
    }
    .ptfc-mobile-menu-label {
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
    }
    .ptfc-header-logo {
        grid-column: 2;
        grid-row: 1;
        flex: 1;
        display: flex;
        justify-content: center;
    }
    .ptfc-header-logo img {
        margin: 0 auto;
        max-height: 50px;
    }
    .ptfc-header-user-cart {
        display: flex !important;
        grid-column: 3;
        grid-row: 1;
        width: 60px;
        justify-content: flex-end;
        align-items: center;
    }
    .ptfc-header-user {
        display: none !important;
    }
    .ptfc-header-search {
        display: block !important;
        grid-column: 1 / -1;
        grid-row: 2;
        flex: none !important;
        width: 100% !important;
        max-width: none !important;
        padding-top: 10px;
        visibility: visible !important;
        min-width: 0;
        align-self: stretch;
    }
    .ptfc-header-main > .ptfc-header-search {
        display: block !important;
        grid-column: 1 / -1;
    }
    .ptfc-mobile-search-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .ptfc-mobile-category-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #f8fafc;
        color: #0f172a;
        cursor: pointer;
    }
    .ptfc-mobile-category-toggle:active {
        background: #e2e8f0;
    }
    .ptfc-mobile-search-field {
        flex: 1;
        min-width: 0;
    }
    .ptfc-mobile-search-field .ptfc-search-bar {
        width: 100%;
        margin-bottom: 0;
    }
    .ptfc-mobile-search-field .ptfc-search-icon {
        width: 14px;
        height: 14px;
        left: 13px;
    }
    .ptfc-mobile-search-field .ptfc-search-input {
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 15px 8px 36px;
        font-size: 13px !important;
    }
    .ptfc-header-search .ptfc-search-bar {
        width: 100%;
    }
    .ptfc-header-search .ptfc-search-input {
        min-height: 44px;
        font-size: 14px;
    }
    .ptfc-mobile-category-canvas {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: min(340px, 88vw);
        height: 100dvh;
        background: #fff;
        z-index: 1000003;
        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.16);
        transform: translateX(-105%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .ptfc-mobile-category-canvas.is-open {
        transform: translateX(0);
    }
    .ptfc-mobile-category-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 22px 20px;
        border-bottom: 1px solid #e2e8f0;
        color: #0f172a;
        font-size: 18px;
    }
    .ptfc-mobile-category-close {
        border: 0;
        background: transparent;
        color: #0f172a;
        font-size: 32px;
        line-height: 1;
        cursor: pointer;
    }
    .ptfc-mobile-category-content {
        padding: 8px 0 24px;
    }
    .ptfc-mobile-category-content .ptfc-category-menu,
    .ptfc-mobile-category-content .ptfc-mega-menu-wrapper {
        position: static;
        width: 100%;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .ptfc-mobile-category-content .ptfc-cat-toggle {
        display: none;
    }
    .ptfc-mobile-category-content .ptfc-cat-list {
        padding: 0;
    }
    .ptfc-mobile-category-content .ptfc-cat-list li a {
        padding: 15px 20px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 15px;
    }
    .ptfc-mobile-category-content .ptfc-cat-dropdown-panel {
        position: static;
        width: auto;
        min-height: 0;
        max-height: 0;
        padding: 8px 20px 8px 48px;
        border: 0;
        box-shadow: none;
        opacity: 0 !important;
        visibility: hidden;
        transform: none;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.35s ease;
    }
    .ptfc-mobile-category-content .ptfc-cat-list > li.category-submenu-open > .ptfc-cat-dropdown-panel {
        max-height: 1200px;
        opacity: 1 !important;
        visibility: visible;
    }
    .ptfc-mobile-category-content .ptfc-cat-dropdown-panel ul {
        column-count: 1;
    }
    .ptfc-mobile-category-content .ptfc-panel-section-title {
        display: none;
    }
    .ptfc-mobile-category-content .ptfc-cat-dropdown-panel ul li a {
        padding: 5px 0;
        border-bottom: 0;
        font-size: 13px;
        line-height: 1.35;
    }
    body.ptfc-category-canvas-open {
        overflow: hidden;
    }
    
    /* Offcanvas Menu */
    .ptfc-header-sub-wrapper {
        position: fixed;
        top: 0;
        left: -370px;
        width: min(350px, calc(100vw - 20px));
        height: 100vh;
        max-height: 100vh !important;
        background: #fff;
        z-index: 1000001 !important;
        transition: left 0.3s ease;
        opacity: 1 !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .ptfc-header-sub-wrapper.is-open {
        left: 0;
    }
    .ptfc-mobile-menu-close {
        display: block !important;
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
        z-index: 10;
        color: #0f172a;
    }
    .ptfc-header-sub {
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 20px 20px 20px;
        gap: 20px;
    }
    .ptfc-header-sub-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .ptfc-main-nav {
        width: 100%;
    }
    .ptfc-menu-links {
        flex-direction: column;
        gap: 0 !important;
        width: 100%;
    }
    .ptfc-menu-links li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        padding: 0 !important;
    }
    .ptfc-menu-links li:last-child {
        border-bottom: none;
    }
    .ptfc-menu-links li a {
        display: flex;
        justify-content: space-between;
        padding: 16px 0 !important;
        font-size: 16px;
        color: #0f172a !important;
    }
    .ptfc-menu-links .menu-item-has-children > a::after {
        display: block !important;
        flex: 0 0 7px;
        width: 7px;
        height: 7px;
        margin: 0 4px 0 12px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        opacity: 0.8;
    }
    .ptfc-menu-links .menu-item-has-children > a.is-active::after {
        transform: rotate(-135deg);
        margin-top: 4px;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > a::after {
        display: block !important;
        flex: 0 0 7px !important;
        width: 7px !important;
        height: 7px !important;
        margin: 0 4px 0 12px !important;
        border-right: 2px solid currentColor !important;
        border-bottom: 2px solid currentColor !important;
        transform: rotate(45deg) !important;
        opacity: 0.8 !important;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > a.is-active::after {
        transform: rotate(-135deg) !important;
        margin-top: 4px !important;
    }
    .ptfc-menu-links .sub-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0 !important;
        padding: 0 0 0 15px !important;
        margin: 0 !important;
        background: transparent !important;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    }
    .ptfc-menu-links .menu-item-has-children.sub-menu-open > .sub-menu {
        max-height: 1200px;
        opacity: 1 !important;
        padding: 0 0 10px 15px !important;
    }
    .ptfc-menu-links .sub-menu .sub-menu {
        background: #f8fafc !important;
        padding-left: 15px !important;
        border-left: 1px solid #e2e8f0 !important;
    }
    .ptfc-menu-links .sub-menu .menu-item-has-children > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
    }
    .ptfc-menu-links .menu-item-has-children > a.is-active::after {
        transform: rotate(-135deg);
        margin-top: 3px;
    }
    .ptfc-categories-menu-wrap {
        display: none !important;
    }
    .ptfc-header-sub-right {
        width: 100%;
    }
    .ptfc-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1000000 !important;
        display: none;
    }
    .ptfc-mobile-overlay.is-active {
        display: block;
    }

    /* Keep fixed footer/contact controls behind the open header canvas. */
    body.ptfc-mobile-menu-open .ptfc-mobile-bottom-bar,
    body.ptfc-mobile-menu-open .ptfc-mobile-contact,
    body.ptfc-mobile-menu-open .ptfc-floating-contact,
    body.ptfc-mobile-menu-open .ptfc-contact-floating,
    body.ptfc-mobile-menu-open .e-contact-buttons,
    body.ptfc-mobile-menu-open .e-floating-buttons {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ==============================================================
   Custom Single Product Page v2 (Clean rewrite)
   ============================================================== */
.ptfc-sp-wrap {
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

/* Loop Add to Cart Button */
.ptfc-loop-add-to-cart .add_to_cart_button {
    display: block !important;
    width: 100% !important;
    background-color: var(--ptfc-primary) !important;
    color: #fff !important;
    text-align: center !important;
    border-radius: 99px !important;
    padding: 10px 15px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}
.ptfc-loop-add-to-cart .add_to_cart_button:hover {
    background-color: #e66600 !important;
    color: #fff !important;
}
.ptfc-sp-wrap *, .ptfc-sp-wrap *::before, .ptfc-sp-wrap *::after {
    box-sizing: border-box;
}

/* ---- SECTION 1: TOP LAYOUT ---- */
.ptfc-sp-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    margin-bottom: 60px;
    align-items: start;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 25px;
}
.ptfc-sp-top > div {
    min-width: 0;
}

/* ---- GALLERY ---- */
.ptfc-sp-gallery { position: relative; }

.ptfc-sp-slides {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    background: #fff;
    margin-bottom: 12px;
    /* Bỏ aspect-ratio cố định, để ảnh tự nhiên */
}
.ptfc-sp-slide {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: center;
}
.ptfc-sp-slide.active {
    display: flex;
}
.ptfc-sp-slide img {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
}

.ptfc-sp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}
.ptfc-sp-arrow svg {
    width: 28px;
    height: 28px;
    transition: all 0.25s ease;
}
.ptfc-sp-arrow:hover {
    background: var(--ptfc-primary);
    border-color: var(--ptfc-primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0, 0.35);
    transform: translateY(-50%) scale(1.1);
}
.ptfc-sp-prev { left: 12px; }
.ptfc-sp-next { right: 12px; }

.ptfc-sp-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ptfc-sp-thumbs::-webkit-scrollbar { display: none; }
.ptfc-sp-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}
.ptfc-sp-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transition: opacity 0.2s; }
.ptfc-sp-thumb:hover img { opacity: 0.9; }
.ptfc-sp-thumb.active { border-color: var(--ptfc-primary); }
.ptfc-sp-thumb.active img { opacity: 1; }

/* ---- INFO ---- */
.ptfc-sp-brand {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ptfc-primary);
    margin-bottom: 10px;
}
.ptfc-sp-meta-cat {
    font-size: 13px;
    font-weight: 600;
    color: var(--ptfc-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ptfc-sp-meta-cat a {
    color: inherit;
    text-decoration: none;
}
.ptfc-sp-meta-cat a:hover {
    text-decoration: underline;
}
.ptfc-sp-title {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 10px;
}

.ptfc-sp-price-box {
    border-left: 3px solid var(--ptfc-primary);
    padding-left: 14px;
    margin-bottom: 10px;
}
.ptfc-sp-price { font-size: 18px; color: #64748b; margin-bottom: 4px; }
.ptfc-sp-price.wholesale {
    font-size: 18px;
    font-weight: 800;
    color: var(--ptfc-primary);
    margin-bottom: 0;
}
.ptfc-sp-price.main {
    font-size: 18px;
    font-weight: 800;
    color: var(--ptfc-primary);
    margin-bottom: 0;
}
.ptfc-sp-price .woocommerce-Price-amount { font-weight: inherit; }

.ptfc-sp-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.ptfc-sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
}
.ptfc-sp-badge.instock { background: #dcfce7; color: #16a34a; }
.ptfc-sp-badge.outofstock { background: #fee2e2; color: #dc2626; }

.ptfc-sp-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 28px;
    border-top: 1px solid #c6c6c6;
    padding-top: 18px;
}

/* ---- CART FORM ---- */
.ptfc-sp-form { margin: 0; }
.ptfc-sp-qty-row {
    margin-bottom: 16px;
}
.ptfc-sp-qty-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ptfc-sp-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 50px;
    overflow: hidden;
    height: 50px;
    background: #f8fafc;
}
.ptfc-qty-btn {
    width: 48px;
    height: 100%;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}
.ptfc-qty-btn:hover { background: #e2e8f0; color: #0f172a; }
#ptfc-qty-input {
    width: 52px;
    height: 100%;
    border: none;
    border-left: 1.5px solid #cbd5e1;
    border-right: 1.5px solid #cbd5e1;
    background: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    padding: 0;
    -moz-appearance: textfield;
}
#ptfc-qty-input::-webkit-outer-spin-button,
#ptfc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Button row wrapper */
.ptfc-sp-btn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.ptfc-sp-order-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px !important;
    background: var(--ptfc-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
}
.ptfc-sp-order-btn:hover {
    background: #e66800 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0, 0.35);
}

/* Variable Form Styling for Custom Single Product */
.ptfc-sp-variable-form select.tb-swatched {
    display: none !important;
}
.ptfc-sp-variable-form .single_add_to_cart_button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px !important;
    background: var(--ptfc-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
    width: 100%;
}
.ptfc-sp-variable-form .single_add_to_cart_button:hover {
    background: #e66800 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0, 0.35);
}
.ptfc-sp-variable-form table.variations {
    width: 100%;
    margin-bottom: 10px;
    border-collapse: collapse;
}
.ptfc-sp-variable-form table.variations th,
.ptfc-sp-variable-form table.variations td {
    border: none;
    padding: 5px 0;
    vertical-align: middle;
    background: transparent !important;
}
.ptfc-sp-variable-form table.variations tr {
    background: transparent !important;
}
.ptfc-sp-variable-form table.variations th {
    width: 10%;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}
.ptfc-sp-variable-form table.variations td {
    width: 90%;
}
.ptfc-sp-variable-form table.variations select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-family: inherit;
}
.ptfc-sp-variable-form .reset_variations {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #ef4444;
}
.ptfc-sp-variable-form .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.ptfc-sp-variable-form .quantity {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 50px;
    overflow: hidden;
    height: 54px;
    background: #fff;
}
.ptfc-sp-variable-form .quantity input.qty {
    width: 60px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    padding: 0;
    background: transparent;
}

/* Ẩn nút View Cart mặc định của WooCommerce khi AJAX chạy xong */
.ptfc-sp-btn-row .added_to_cart.wc-forward {
    display: none !important;
}

.ptfc-sp-outofstock-msg {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 16px 20px;
    color: #9a3412;
    font-size: 15px;
    margin-top: 10px;
}

/* ---- SECTION 2: DETAILS ---- */
.ptfc-sp-details {
    background: #f9f9f9;
    border-radius: 16px;
    /* border: 1px solid #e8ecf0; */
    padding: 30px;
    margin-bottom: 0;
}
.ptfc-sp-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dedede;
}
.ptfc-sp-content {
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
}
.ptfc-sp-content p { margin-bottom: 18px; }
.ptfc-sp-content img { border-radius: 10px; max-width: 100%; height: auto; margin: 16px 0; }
.ptfc-sp-content iframe,
.ptfc-sp-content video {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 10px;
    margin: 16px 0;
}
.ptfc-sp-content video { height: auto; }
.ptfc-sp-content h2, .ptfc-sp-content h3 { font-weight: 700; color: #0f172a; margin: 24px 0 12px; }
.ptfc-sp-content ul, .ptfc-sp-content ol { padding-left: 24px; margin-bottom: 18px; }
.ptfc-sp-content li { margin-bottom: 6px; }

@media (max-width: 768px) {
    .ptfc-sp-content iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: min(56.25vw, 420px) !important;
        min-height: 180px;
    }

    .ptfc-sp-content video {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 420px;
        object-fit: contain;
    }
}

/* ---- SECTION 3: RELATED ---- */
.ptfc-sp-related { margin-bottom: 60px; }
.ptfc-sp-related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.ptfc-sp-related-grid ul.products { display: contents; }
.ptfc-sp-related-grid .ptfc-product-title {
    font-size: 14px;
}
@media (min-width: 1025px) {
    .ptfc-sp-related-grid .ptfc-product-item:nth-child(6) {
        display: none;
    }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .ptfc-sp-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .ptfc-sp-top { grid-template-columns: 1fr; gap: 20px; padding: 16px; border-radius: 16px; margin-bottom: 30px; }
    .ptfc-sp-title { font-size: 20px; margin-bottom: 16px; }
    .ptfc-sp-price-box { margin-bottom: 16px; }
    .ptfc-sp-price { font-size: 18px; }
    .ptfc-sp-price.wholesale, .ptfc-sp-price.main { font-size: 18px; }
    .ptfc-sp-badges { gap: 8px; margin-bottom: 20px; }
    .ptfc-sp-badge { font-size: 12px; padding: 6px 12px; }
    .ptfc-sp-details { padding: 20px; border-radius: 12px; }
    .ptfc-sp-section-title { font-size: 22px; margin-bottom: 16px; padding-bottom: 12px; }
    .ptfc-sp-related .ptfc-sp-section-title { font-size: 22px; margin-bottom: 16px; padding-bottom: 12px; }
    .ptfc-sp-related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ptfc-sp-btn-row { align-items: stretch; gap: 12px; }
    .ptfc-sp-qty-box { justify-content: flex-start; margin-bottom: 0; }
    .ptfc-sp-order-btn { font-size: 15px; height: 48px; }
    .ptfc-sp-buynow-btn { font-size: 15px; height: 48px; }
    .ptfc-sp-cat-sidebar { position: static; margin-top: 30px; }
}

/* Related Products - thêm viền nhẹ cho card */
.ptfc-sp-related-grid .ptfc-product-item {
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ptfc-sp-related-grid .ptfc-product-item:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transform: translateY(-5px);
}

/* Style for out of stock "Đọc tiếp" button and other Woo loop buttons */
.ptfc-loop-add-to-cart .button {
    border-radius: 20px !important;
    font-size: 14px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* Breadcrumb Bar - Single Product */
.ptfc-sp-breadcrumb-bar {
    background: #f8fafc !important;
    border-bottom: 1px solid #e8ecf0 !important;
    border-top: 1px solid #e8ecf0 !important;
    padding: 12px 0 !important;
    display: block !important;
}
@media (max-width: 768px) {
    .ptfc-sp-breadcrumb-bar {
        padding: 12px 15px !important;
    }
}
.ptfc-sp-breadcrumb-inner {
    max-width: 1240px;
    margin: 0 auto;
}
.ptfc-sp-breadcrumb-inner .woocommerce-breadcrumb {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}
.ptfc-sp-breadcrumb-inner .woocommerce-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.ptfc-sp-breadcrumb-inner .woocommerce-breadcrumb a:hover {
    color: var(--ptfc-primary);
}
.ptfc-sp-breadcrumb-inner .woocommerce-breadcrumb .breadcrumb-separator,
.ptfc-sp-breadcrumb-inner .woocommerce-breadcrumb > span {
    color: #94a3b8;
    margin: 0 4px;
}

/* Buy Now Button */
.ptfc-sp-buynow-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 54px;
    background: #fff;
    color: var(--ptfc-primary);
    border: 2px solid var(--ptfc-primary);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
}
.ptfc-sp-buynow-btn:hover {
    background: var(--ptfc-primary);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0, 0.25);
    transform: translateY(-2px);
}

/* Category Sidebar */
.ptfc-sp-details-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    margin-bottom: 60px;
}
.ptfc-sp-details-row > div {
    min-width: 0;
}
.ptfc-sp-cat-sidebar {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf0;
    overflow: hidden;
    position: sticky;
    top: 100px;
    padding: 16px 0 16px;
}
.ptfc-sp-cat-sidebar-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    padding: 0 24px 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 8px;
    background: none;
}
.ptfc-sp-cat-sidebar-title svg { display: none; }

.ptfc-sp-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ptfc-sp-cat-item {
    border-bottom: none;
}

.ptfc-sp-cat-sidebar .ptfc-sp-cat-link,
.ptfc-sp-cat-sidebar .ptfc-sp-cat-list li a.ptfc-sp-cat-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    background: none !important;
    transition: color 0.2s !important;
}
.ptfc-sp-cat-sidebar .ptfc-sp-cat-link:hover,
.ptfc-sp-cat-sidebar .ptfc-sp-cat-list li a.ptfc-sp-cat-link:hover {
    color: var(--ptfc-primary) !important;
    background: none !important;
}
.ptfc-sp-cat-sidebar .ptfc-sp-cat-link.active,
.ptfc-sp-cat-sidebar .ptfc-sp-cat-list li a.ptfc-sp-cat-link.active {
    color: #000000 !important;
    font-weight: 700 !important;
    background: none !important;
}
.ptfc-sp-cat-toggle-icon {
    flex-shrink: 0;
    transition: transform 0.25s;
    color: #94a3b8 !important;
    stroke: #94a3b8 !important;
    width: 16px;
    height: 16px;
}
.ptfc-sp-cat-item.open > .ptfc-sp-cat-link .ptfc-sp-cat-toggle-icon {
    transform: rotate(90deg);
    color: var(--ptfc-primary) !important;
    stroke: var(--ptfc-primary) !important;
}
.ptfc-sp-subcat-list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 0;
    background: none;
    border-top: none;
}
.ptfc-sp-subcat-link {
    display: block !important;
    padding: 7px 24px 7px 40px !important;
    font-size: 14px !important;
    color: #64748b !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    position: relative !important;
    background: none !important;
}
.ptfc-sp-subcat-link::before {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}
.ptfc-sp-subcat-link:hover {
    color: var(--ptfc-primary) !important;
    background: none !important;
}
.ptfc-sp-subcat-link:hover::before { background: var(--ptfc-primary); }
.ptfc-sp-subcat-link.active {
    color: var(--ptfc-primary) !important;
    font-weight: 600 !important;
    background: none !important;
}
.ptfc-sp-subcat-link.active::before { background: var(--ptfc-primary); }

@media (max-width: 900px) {
    .ptfc-sp-details-row { grid-template-columns: 1fr; }
    .ptfc-sp-cat-sidebar { position: static; }
}

/* ---- Product Content Tables ---- */
.ptfc-sp-content table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    font-size: 15px;
}
.ptfc-sp-content table thead th {
    background: var(--ptfc-primary);
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border: none;
}
.ptfc-sp-content table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.ptfc-sp-content table tbody tr:last-child {
    border-bottom: none;
}
.ptfc-sp-content table tbody tr:nth-child(even) {
    background: #ffffff;
}
.ptfc-sp-content table tbody>tr:nth-child(odd)>td, 
.ptfc-sp-content table tbody>tr:nth-child(odd)>th {
    background-color: hsl(0deg 0% 95.83%);
}
.ptfc-sp-content table tbody tr:hover {
    background: #fff7ed;
}
.ptfc-sp-content table td,
.ptfc-sp-content table th {
    padding: 12px 16px;
    border: none;
    vertical-align: top;
    color: #334155;
    line-height: 1.6;
}
.ptfc-sp-content table td:first-child {
    font-weight: 600;
    color: #1e293b;
    width: 35%;
}

/* Product Content Headings - giảm size */
.ptfc-sp-content h1 { font-size: 22px; }
.ptfc-sp-content h2 { font-size: 20px; }
.ptfc-sp-content h3 { font-size: 18px; }
.ptfc-sp-content h4 { font-size: 16px; }
.ptfc-sp-content h1,
.ptfc-sp-content h2,
.ptfc-sp-content h3,
.ptfc-sp-content h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 20px 0 10px;
    line-height: 1.4;
}

/* Fix password toggle eye icons in CTV Account page */
.ptfc-toggle-password svg.ptfc-d-none {
    display: none;
}

.ptfc-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 275px !important;
    overflow-y: auto;
    padding-right: 10px;
}

/* === Read More Button - fix màu cam đúng === */
.ptfc-read-more-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: var(--ptfc-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    padding: 6px 0 !important;
    margin-top: 4px !important;
    border-radius: 0 !important;
}
.ptfc-read-more-btn svg { transition: transform 0.3s; }
.ptfc-read-more-btn.active svg { transform: rotate(180deg); }

/* === Related Products Slider === */
.ptfc-sp-related {
    overflow: visible !important;
    position: relative;
}
.ptfc-sp-related-slider-wrap {
    position: relative;
    padding: 0 0;
}
.ptfc-sp-related-track {
    overflow: hidden !important;
    padding: 10px 4px !important;
    margin: -10px -4px !important;
}
.ptfc-sp-related-grid {
    display: flex !important;
    gap: 20px;
    transition: transform 0.35s ease;
    will-change: transform;
    width: max-content;
}
.ptfc-sp-related-grid .ptfc-product-item {
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
}
.ptfc-sp-related-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    color: #1e293b;
}
.ptfc-sp-related-slider-btn:hover {
    background: var(--ptfc-primary);
    color: #fff;
    border-color: var(--ptfc-primary);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.ptfc-sp-related-slider-btn.prev {
    left: -18px;
}
.ptfc-sp-related-slider-btn.next {
    right: -18px;
}

@media (max-width: 768px) {
    .ptfc-sp-related-slider-btn { display: none; }
}

/* === Lightbox Nav Arrows === */
.ptfc-lightbox-prev, .ptfc-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s, transform 0.2s;
}
.ptfc-lightbox-prev:hover, .ptfc-lightbox-next:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-50%) scale(1.08);
}
.ptfc-lightbox-prev { left: 20px; }
.ptfc-lightbox-next { right: 20px; }



/* Thumbnail Navigation Shared */
.ptfc-thumb-gallery-wrap { position: relative; margin-top: 12px; width: 100%; }
.ptfc-thumb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; background: #fff; border: 1px solid #cbd5e1; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #334155; z-index: 3; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.12); }
.ptfc-thumb-nav:hover { background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
.ptfc-thumb-nav:focus-visible { outline: 2px solid var(--ptfc-primary); outline-offset: 2px; }
.ptfc-thumb-nav svg { width: 16px; height: 16px; }
.ptfc-thumb-prev { left: 4px; }
.ptfc-thumb-next { right: 4px; }
.ptfc-thumb-gallery-wrap .ptfc-sp-thumbs { width: 100%; margin-top: 0 !important; padding: 0 42px; }
.ptfc-sp-thumbs { cursor: pointer; scroll-behavior: smooth; touch-action: pan-x; }
/* Force Category Toggle Color */
.ptfc-categories-menu-wrap .ptfc-cat-toggle {
    color: #ffffff !important;
}
.ptfc-categories-menu-wrap .ptfc-cat-toggle-icon {
    color: #ffffff !important;
}
.ptfc-categories-menu-wrap .ptfc-cat-toggle span {
    color: #ffffff !important;
}
.ptfc-categories-menu-wrap .ptfc-cat-toggle svg {
    color: #ffffff !important;
}

/* Force Combo Slider Arrow Size */
.ptfc-swiper-prev, .ptfc-swiper-next {
    --swiper-navigation-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    margin-top: -20px !important;
    position: absolute !important;
    z-index: 10 !important;
    opacity: 1 !important;
}
.ptfc-swiper-prev { left: 10px !important; }
.ptfc-swiper-next { right: 10px !important; }
@media (max-width: 768px) {
    .ptfc-swiper-prev { left: 5px !important; }
    .ptfc-swiper-next { right: 5px !important; }
}
.ptfc-swiper-prev:after, .ptfc-swiper-next:after {
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* Push product card button to bottom (Grid & Carousel only) */
.ptfc-products-wrapper.style-grid .ptfc-product-item,
.swiper-slide.ptfc-product-item {
    display: flex !important;
    flex-direction: column !important;
}
.ptfc-products-wrapper.style-grid .ptfc-product-info,
.swiper-slide.ptfc-product-item .ptfc-product-info {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}
.ptfc-products-wrapper.style-grid .ptfc-loop-add-to-cart,
.swiper-slide.ptfc-product-item .ptfc-loop-add-to-cart {
    margin-top: auto !important;
    width: 100%;
}
.ptfc-loop-add-to-cart .button { width: 100%; }


/* Reset default link colors in single product */
.ptfc-sp-content-area a:not(.button), .ptfc-sp-desc a:not(.button), 
.woocommerce-product-details__short-description a,
.woocommerce-Tabs-panel a {
    color: #000000;
}
.ptfc-single-product a:hover, 
.woocommerce-product-details__short-description a:hover,
.woocommerce-Tabs-panel a:hover {
    color: #333333;
    text-decoration: underline;
}

/* User requested button hover/focus reset */
[type=button]:focus, [type=button]:hover, 
[type=submit]:focus, [type=submit]:hover, 
button:focus, button:hover { 
    background-color: #000000 !important; 
    color: #fff !important; 
    text-decoration: none !important; 
}

/* Custom link colors in single product and posts */
.ptfc-sp-content-area a:not(.button), 
.ptfc-sp-desc a:not(.button),
.woocommerce-product-details__short-description a:not(.button),
.woocommerce-Tabs-panel a:not(.button),
.single-post .entry-content a:not(.button),
.ptfc-single-post .entry-content a:not(.button) {
    color: #ed831f !important;
    text-decoration: none;
}
.ptfc-sp-content-area a:not(.button):hover, 
.ptfc-sp-desc a:not(.button):hover,
.woocommerce-product-details__short-description a:not(.button):hover,
.woocommerce-Tabs-panel a:not(.button):hover,
.single-post .entry-content a:not(.button):hover,
.ptfc-single-post .entry-content a:not(.button):hover {
    color: #d77114 !important;
    text-decoration: underline !important;
}
/* Override Hello Elementor default link color globally (replaces #c36) */
body a {
    color: #ed831f;
}
body a:hover, body a:focus, body a:active {
    color: #d77114;
}

/* Quick View Thumbnails Flex & Scroll */
.ptfc-qv-thumbnails {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px !important;
    overflow-x: auto !important;
    padding-bottom: 5px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.ptfc-qv-thumbnails::-webkit-scrollbar {
    display: none !important;
}
