/* Shop Page Styles */

.shop-page {
    padding: 0;
    background: var(--bg-light);
    margin-bottom: 0;
}

/* Đảm bảo header trên shop page có cùng kích thước với các trang khác */
body.woocommerce-shop .site-header,
body.woocommerce-shop #masthead,
body.woocommerce-shop .header-desktop,
body.woocommerce-archive .site-header,
body.woocommerce-archive #masthead,
body.woocommerce-archive .header-desktop {
    padding: 16px 0 0 0 !important;
}

body.woocommerce-shop .header-desktop-cell,
body.woocommerce-archive .header-desktop-cell {
    padding: 12px 16px !important;
}

/* Giới hạn logo container để không làm giãn header */
body.woocommerce-shop .header-desktop-table,
body.woocommerce-archive .header-desktop-table {
    table-layout: fixed !important;
}

body.woocommerce-shop .header-desktop-cell-logo,
body.woocommerce-archive .header-desktop-cell-logo {
    width: 25% !important;
    max-width: 25% !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
}

body.woocommerce-shop .site-logo-desktop,
body.woocommerce-archive .site-logo-desktop {
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
}

body.woocommerce-shop .site-logo-desktop .logo-link,
body.woocommerce-archive .site-logo-desktop .logo-link {
    max-width: 100% !important;
    display: block !important;
    overflow: hidden !important;
    flex-shrink: 1 !important;
}

body.woocommerce-shop .logo-image-desktop,
body.woocommerce-shop .logo-svg-desktop,
body.woocommerce-archive .logo-image-desktop,
body.woocommerce-archive .logo-svg-desktop {
    height: 60px !important;
    max-width: 220px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
    flex-shrink: 1 !important;
}

/* Fix footer spacing on shop page */
.shop-page ~ .site-footer,
.shop-page + .site-footer {
    margin-top: var(--spacing-lg);
}

body.woocommerce-shop .site-footer,
body.woocommerce-archive .site-footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

/* Breadcrumb */
.shop-breadcrumb-wrapper {
    background: #ffffff;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.shop-breadcrumb {
    font-size: var(--font-size-small);
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.shop-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-lighter);
    margin: 0 4px;
}

/* Shop Header - Enhanced */
.shop-header {
    background: 
        linear-gradient(135deg, #003366 0%, #0066cc 100%),
        radial-gradient(circle at 20% 50%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    background-size: cover, cover, cover;
    padding: var(--spacing-xl) 0;
    color: #ffffff;
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.shop-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px
        );
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.shop-header .container {
    position: relative;
    z-index: 2;
}

.shop-header-stats {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.shop-stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.shop-stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.shop-stat-label {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.shop-header-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.shop-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-header-text {
    flex: 1;
}

.shop-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shop-description {
    font-size: var(--font-size-large);
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.6;
}

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

/* Sidebar */
.shop-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: var(--spacing-lg);
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

/* Category Search */
.category-search {
    margin-bottom: var(--spacing-md);
}

.category-search-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    transition: border-color 0.2s ease;
}

.category-search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.category-search-field::placeholder {
    color: var(--text-lighter);
}

/* Category List Wrapper */
.category-list-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: var(--spacing-xs);
}

.category-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.category-list-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.category-list-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.category-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

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

.category-item {
    margin-bottom: var(--spacing-xs);
    position: relative;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: var(--font-size-base);
}

.category-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: var(--spacing-md);
}

.category-item.active > .category-link {
    background: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 600;
}

.category-name {
    flex: 1;
}

.category-list .count {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-left: var(--spacing-xs);
}

.category-item.active > .category-link .count {
    color: var(--secondary-color);
}

/* Toggle Subcategories */
.toggle-subcategories {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-light);
    transition: transform 0.2s ease;
    font-size: 12px;
}

.toggle-subcategories:hover {
    color: var(--primary-color);
}

.toggle-subcategories[aria-expanded="true"] {
    transform: translateY(-50%) rotate(180deg);
}

.toggle-icon {
    display: block;
}

/* Subcategory List */
.subcategory-list {
    list-style: none;
    margin: var(--spacing-xs) 0 0 var(--spacing-md);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-item.expanded .subcategory-list {
    max-height: 2000px;
    margin-top: var(--spacing-xs);
    padding-top: var(--spacing-xs);
    border-top: 1px solid var(--border-color);
}

.subcategory-list li {
    margin-bottom: var(--spacing-xs);
}

.subcategory-item.subcategory-hidden {
    display: none;
}

.subcategory-item.subcategory-visible {
    display: block;
}

.subcategory-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px var(--spacing-sm);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
    font-size: var(--font-size-small);
    transition: all 0.2s ease;
}

.subcategory-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: var(--spacing-md);
}

.subcategory-list li.active > a {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.subcategory-list .view-all-sub {
    margin-top: var(--spacing-xs);
    padding-top: var(--spacing-xs);
    border-top: 1px dashed var(--border-color);
}

.subcategory-list .view-all-sub {
    margin-top: var(--spacing-xs);
    padding-top: var(--spacing-xs);
    border-top: 1px dashed var(--border-color);
}

.subcategory-list .view-all-sub button {
    width: 100%;
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: var(--font-size-small);
    padding: 8px var(--spacing-sm);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.subcategory-list .view-all-sub button:hover {
    background: rgba(255, 193, 7, 0.1);
    text-decoration: underline;
}

/* Category List Empty */
.category-list-empty {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-light);
    font-size: var(--font-size-small);
}

/* Price Filter Widget */
.price-filter-widget {
    margin-top: var(--spacing-lg);
}

.price-filter-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    transition: border-color 0.2s ease;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.price-separator {
    color: var(--text-light);
    font-weight: 600;
}

.price-currency {
    color: var(--text-light);
    font-weight: 600;
    font-size: var(--font-size-small);
}

.btn-apply-filter,
.btn-reset-filter {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-apply-filter {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-apply-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-reset-filter {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-reset-filter:hover {
    background: #e0e0e0;
    border-color: var(--text-light);
}

/* Brand Filter Widget */
.brand-filter-widget {
    margin-top: var(--spacing-lg);
}

.brand-filter-content {
    max-height: 300px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
}

.brand-filter-content::-webkit-scrollbar {
    width: 6px;
}

.brand-filter-content::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.brand-filter-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.brand-filter-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.brand-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.brand-filter-item {
    margin-bottom: var(--spacing-xs);
}

.brand-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: 6px var(--spacing-xs);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.brand-checkbox:hover {
    background: var(--bg-light);
}

.brand-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.brand-name {
    flex: 1;
    font-size: var(--font-size-base);
    color: var(--text-color);
}

.brand-count {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.brand-filter-checkbox:checked + .brand-name {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stock Filter Widget */
.stock-filter-widget {
    margin-top: var(--spacing-lg);
}

.stock-filter-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.stock-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: 8px var(--spacing-xs);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.stock-checkbox:hover {
    background: var(--bg-light);
}

.stock-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.stock-label {
    font-size: var(--font-size-base);
    color: var(--text-color);
    flex: 1;
}

.stock-filter-checkbox:checked + .stock-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Rating Filter Widget */
.rating-filter-widget {
    margin-top: var(--spacing-lg);
}

.rating-filter-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.rating-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: 8px var(--spacing-xs);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.rating-checkbox:hover {
    background: var(--bg-light);
}

.rating-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.rating-stars {
    display: flex;
    gap: 2px;
    margin-right: var(--spacing-xs);
}

.rating-stars .star {
    color: var(--primary-color);
    font-size: 14px;
    line-height: 1;
}

.rating-stars .star.empty {
    color: var(--text-lighter);
}

.rating-label {
    font-size: var(--font-size-small);
    color: var(--text-color);
    flex: 1;
}

.rating-filter-checkbox:checked ~ .rating-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Quick View Button */
.btn-quick-view {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: var(--font-size-small);
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.product-card:hover .btn-quick-view {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.btn-quick-view:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateX(-50%) translateY(-2px);
}

.btn-quick-view span {
    margin-right: 6px;
}

/* Quick View Modal */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: var(--spacing-xl) var(--spacing-md);
    backdrop-filter: blur(5px);
}

.quick-view-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quick-view-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.quick-view-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.quick-view-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl);
}

.quick-view-image {
    position: sticky;
    top: var(--spacing-xl);
}

.quick-view-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.quick-view-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
}

.quick-view-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.quick-view-description {
    font-size: var(--font-size-base);
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.quick-view-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Product Comparison Bar */
.comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: var(--spacing-md) 0;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

.comparison-bar.active {
    transform: translateY(0);
}

.comparison-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.comparison-bar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    overflow-x: auto;
}

.comparison-bar-title {
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
    font-size: var(--font-size-large);
}

.comparison-products {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.comparison-product-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--bg-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.comparison-product-item:hover {
    border-color: var(--primary-color);
}

.comparison-product-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.comparison-product-name {
    font-size: var(--font-size-small);
    color: var(--text-color);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comparison-product-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: var(--text-lighter);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.comparison-product-remove:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

.comparison-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.comparison-count {
    font-weight: 600;
    color: var(--text-color);
}

.btn-compare-now {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-compare-now:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-compare-clear {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-compare-clear:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* List View Styles */
.woocommerce ul.products.list-view {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.woocommerce ul.products.list-view .product-card {
    display: flex;
    flex-direction: row;
    max-width: 100%;
    height: auto;
}

.woocommerce ul.products.list-view .product-image-wrapper {
    width: 250px;
    min-width: 250px;
    padding-top: 0;
    height: 200px;
}

.woocommerce ul.products.list-view .product-info {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.woocommerce ul.products.list-view .product-title {
    font-size: 18px;
    min-height: auto;
    margin-bottom: var(--spacing-sm);
}

.woocommerce ul.products.list-view .product-price {
    margin-bottom: var(--spacing-sm);
}

.woocommerce ul.products.list-view .product-actions {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
}

/* Featured Categories Section */
.shop-featured-categories {
    padding: var(--spacing-xl) 0;
    background: #ffffff;
    margin-bottom: var(--spacing-xl);
}

.featured-categories-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.featured-category-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.featured-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.featured-category-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.featured-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-category-card:hover .featured-category-image img {
    transform: scale(1.1);
}

.featured-category-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.placeholder-icon {
    font-size: 64px;
    opacity: 0.8;
}

.featured-category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    padding: var(--spacing-sm);
    color: #ffffff;
    font-size: var(--font-size-small);
    font-weight: 600;
}

.featured-category-info {
    padding: var(--spacing-md);
    text-align: center;
}

.featured-category-name {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 var(--spacing-xs) 0;
    transition: color 0.2s ease;
}

.featured-category-card:hover .featured-category-name {
    color: var(--primary-color);
}

.featured-category-link {
    font-size: var(--font-size-small);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    display: inline-block;
}

.featured-category-card:hover .featured-category-link {
    transform: translateX(4px);
}

/* Shop Main */
.shop-main {
    background: #ffffff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Toolbar - Enhanced */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.toolbar-left {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.toolbar-view-options {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.view-option-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.view-option-btn:hover {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
}

.view-option-btn.active {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.toolbar-sorting {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sort-label {
    font-size: var(--font-size-base);
    color: var(--text-color);
    font-weight: 600;
    white-space: nowrap;
}

.product-sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 180px;
}

.product-sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.products-count {
    font-size: var(--font-size-base);
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* WooCommerce Sorting */
.woocommerce-ordering {
    margin: 0;
}

.woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.woocommerce-ordering select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Products Grid - Match Homepage Design */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
}

/* Import Product Card Styles from Homepage */
.woocommerce ul.products .product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.woocommerce ul.products .product-card .btn-quick-view {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: var(--font-size-small);
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.woocommerce ul.products .product-card:hover .btn-quick-view {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.woocommerce ul.products .product-card .btn-quick-view:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateX(-50%) translateY(-2px);
}

.woocommerce ul.products .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.03) 0%, rgba(33, 33, 33, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.woocommerce ul.products .product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

.woocommerce ul.products .product-card:hover::before {
    opacity: 1;
}

.woocommerce ul.products .product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products .product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    z-index: 2;
}

.woocommerce ul.products .product-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    pointer-events: none;
}

.woocommerce ul.products .product-card:hover .product-image-wrapper::after {
    opacity: 1;
}

.woocommerce ul.products .product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1);
}

.woocommerce ul.products .product-card:hover .product-image {
    transform: scale(1.15);
    filter: brightness(1.05);
}

.woocommerce ul.products .price-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce ul.products .stock-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

.woocommerce ul.products .product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products .product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
}

.woocommerce ul.products .product-price {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.woocommerce ul.products .price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.woocommerce ul.products .price-old {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.woocommerce ul.products .product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.woocommerce ul.products .product-actions {
    gap: 10px;
    align-items: stretch;
}

.woocommerce ul.products .btn-add-cart {
    flex: 1;
    min-width: 0;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.woocommerce ul.products .btn-add-cart:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.woocommerce ul.products .btn-add-cart:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
}

.woocommerce ul.products .btn-wishlist {
    width: 44px;
    min-width: 44px;
    height: auto;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.woocommerce ul.products .btn-wishlist span {
    font-size: 18px;
    line-height: 1;
    display: block;
}

.woocommerce ul.products .btn-wishlist:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.woocommerce ul.products .btn-compare-custom {
    width: auto;
    min-width: 70px;
    height: auto;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.woocommerce ul.products .btn-compare-custom:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.woocommerce ul.products .compare-icon {
    font-size: 16px;
    line-height: 1;
    display: block;
}

.woocommerce ul.products .compare-text {
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

/* Lazy loading for product images */
.product-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.loaded {
    opacity: 1;
}

/* No Products */
.woocommerce-info,
.woocommerce-no-products-found {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-light);
    font-size: var(--font-size-large);
}

/* Pagination */
.woocommerce-pagination {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.woocommerce-pagination .page-numbers li {
    margin: 0;
}

.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
    font-size: var(--font-size-base);
    font-weight: 500;
}

.woocommerce-pagination .page-numbers a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.woocommerce-pagination .page-numbers .current {
    background: #003366;
    border-color: #003366;
    color: #ffffff;
    font-weight: 600;
}

.woocommerce-pagination .page-numbers .dots {
    border: none;
    padding: 10px 8px;
    min-width: auto;
}

/* Pagination Info */
.pagination-info {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--text-light);
    font-size: var(--font-size-small);
}

/* Single Product Page */
.single-product-page {
    padding: var(--spacing-xl) 0 var(--spacing-xl);
    background: var(--bg-light);
}

.single-product-hero {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    background: #111111;
    color: #ffffff;
}

.single-product-hero .container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.single-product-hero-tagline {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 6px;
}

.single-product-hero-heading {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.single-product-hero-subtitle {
    font-size: 15px;
    opacity: 0.9;
    max-width: 720px;
}

.single-product-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.product-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    background: #ffffff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* WooCommerce gallery – styled giống card sản phẩm lớn */
.product-images .woocommerce-product-gallery {
    width: 100% !important;   /* Ghi đè width 48% mặc định của WooCommerce */
    max-width: 100%;
    float: none;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.product-images .woocommerce-product-gallery__wrapper {
    position: relative;
}

/* Ảnh chính: fill theo kích thước ảnh, không kéo dài wrapper */
.product-images .woocommerce-product-gallery__image a,
.product-images .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
}

.product-images .woocommerce-product-gallery__image img {
    border-radius: 8px;
    background: #f5f5f5;
    object-fit: cover;
}

/* Thumbnails dưới hình chính */
.product-images .flex-control-nav {
    display: flex;
    gap: 8px;
    margin-top: var(--spacing-sm);
    list-style: none;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin; /* Firefox */
}

.product-images .flex-control-nav li {
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
}

.product-images .flex-control-nav img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.product-images .flex-control-nav img.flex-active,
.product-images .flex-control-nav img:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

/* Scrollbar style cho thumbnail list */
.product-images .flex-control-nav::-webkit-scrollbar {
    height: 6px;
}

.product-images .flex-control-nav::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.product-images .flex-control-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.product-images .flex-control-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Thumbnail gallery với scroll ngang và margin */
.woocommerce div.product div.images .flex-control-thumbs {
    overflow-x: auto;
    margin: 8px 0px;
}

/* Sale badge vị trí góc trên trái gallery */
.product-images .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--accent-color);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-summary {
    padding-left: var(--spacing-lg);
}

.product-summary .product_title {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.product-summary .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.product-summary .price del {
    font-size: 20px;
    color: var(--text-light);
    margin-right: var(--spacing-sm);
}

.product-summary .woocommerce-product-details__short-description {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    /* Đảm bảo nội dung dài không tràn khỏi khung */
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Fix hiển thị khi nội dung mô tả bị bọc trong thẻ <pre> từ editor */
.product-summary .woocommerce-product-details__short-description pre,
.woocommerce-Tabs-panel--description pre {
    white-space: pre-line;      /* giữ xuống dòng nhưng cho phép tự bẻ dòng */
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.product-summary .cart {
    margin-bottom: var(--spacing-lg);
}

.product-summary .quantity {
    margin-right: var(--spacing-sm);
}

.product-summary .single_add_to_cart_button {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-large);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-summary .single_add_to_cart_button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Product Benefits block */
.product-benefits {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.product-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.benefit-icon {
    font-size: 22px;
}

.benefit-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.benefit-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Product Tabs */
.product-tabs-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.woocommerce-tabs {
    margin-top: var(--spacing-xl);
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    margin: 0 0 var(--spacing-lg);
    padding: 0;
    display: flex;
    gap: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: #003366;
    border-bottom-color: #003366;
}

.woocommerce-tabs .panel {
    padding: var(--spacing-lg) 0;
    color: var(--text-color);
    line-height: 1.8;
}

/* Related Products */
.woocommerce .related {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.woocommerce .related h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: static;
        margin-bottom: var(--spacing-lg);
    }

    .product-details-layout {
        grid-template-columns: 1fr;
    }

    .product-images {
        position: static;
    }

    .product-summary {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .shop-header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .shop-header-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .shop-title {
        font-size: 32px;
    }

    .shop-description {
        font-size: var(--font-size-base);
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    .woocommerce ul.products .product-title {
        font-size: 15px;
        min-height: auto;
        line-height: 1.5;
    }
    
    .woocommerce ul.products .price-current {
        font-size: 18px;
    }
    
    .woocommerce ul.products .product-actions {
        gap: var(--spacing-sm);
    }
    
    .woocommerce ul.products .btn-add-cart {
        font-size: 13px;
        padding: 12px 16px;
        min-height: 48px;
    }
    
    .woocommerce ul.products .btn-wishlist {
        width: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .woocommerce ul.products .btn-compare-custom {
        min-width: 70px;
        min-height: 48px;
        padding: 10px 12px;
    }
    
    .woocommerce ul.products .compare-text {
        font-size: 10px;
    }

    .product-summary .product_title {
        font-size: 24px;
    }

    .product-summary .price {
        font-size: 24px;
    }
}

/* Breadcrumb */
.product-breadcrumb-wrapper {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
}

.woocommerce-breadcrumb {
    font-size: var(--font-size-small);
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.woocommerce-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-light);
    margin: 0 4px;
}

/* Product Meta Info */
.product-meta-info {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.product-meta-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-small);
}

.product-meta-item:last-child {
    margin-bottom: 0;
}

.product-meta-item .meta-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: var(--spacing-xs);
    min-width: 100px;
}

.product-meta-item .meta-value {
    color: var(--text-light);
    flex: 1;
    /* Ngăn text hoặc link quá dài làm vỡ layout */
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Improve contrast for small meta text on single product */
.single-product-page .product-meta-item .meta-label,
.single-product-page .product-meta-item .meta-value {
    font-size: 14px;
}

.single-product-page .product-meta-item .meta-label {
    color: var(--secondary-color);
}

.product-meta-item .meta-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-meta-item .meta-value a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Stock Status Badge */
.stock-status .stock-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--font-size-small);
}

.stock-status.in-stock .stock-badge {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-status.out-of-stock .stock-badge {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Social Sharing */
.product-social-sharing {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.sharing-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-small);
}

.sharing-buttons {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: var(--font-size-small);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-facebook:hover {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.share-zalo:hover {
    background: #0068ff;
    color: #ffffff;
    border-color: #0068ff;
}

.share-copy:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.share-copy.copied {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

.share-copy.copied .share-text::after {
    content: ' ✓';
    margin-left: 4px;
}

.share-icon {
    font-size: 16px;
}

.share-text {
    font-size: var(--font-size-small);
}

/* Compare Button in Single Product */
.single-product-compare {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.single-product-compare .btn-compare-custom {
    width: 100%;
    justify-content: center;
}

/* Product Reviews Styling */
.woocommerce-Reviews {
    margin-top: var(--spacing-xl);
}

.woocommerce-Reviews-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-lg);
}

#reviews .commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

#reviews .comment {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    border-left: 3px solid var(--primary-color);
}

#reviews .comment-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

#reviews .comment-author {
    font-weight: 700;
    color: var(--secondary-color);
}

#reviews .comment-date {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

#reviews .star-rating {
    margin-left: auto;
    color: var(--primary-color);
}

#reviews .comment-text {
    color: var(--text-color);
    line-height: 1.7;
}

#review_form_wrapper {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: 8px;
}

#review_form .comment-form-rating label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
    display: block;
}

#review_form .stars {
    margin-bottom: var(--spacing-md);
}

#review_form .stars a {
    color: var(--primary-color);
    font-size: 20px;
    text-decoration: none;
    margin-right: 4px;
}

#review_form .stars a:hover,
#review_form .stars a.active {
    color: var(--primary-dark);
}

#review_form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    min-height: 120px;
    margin-bottom: var(--spacing-md);
}

#review_form input[type="text"],
#review_form input[type="email"] {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
}

/* Upsells & Cross-sells */
.woocommerce .upsells,
.woocommerce .cross-sells {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.woocommerce .upsells h2,
.woocommerce .cross-sells h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
}

.woocommerce .upsells ul.products,
.woocommerce .cross-sells ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

/* Product Attributes Table */
.woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
}

.woocommerce-product-attributes th {
    background: var(--bg-light);
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-weight: 700;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    width: 200px;
}

.woocommerce-product-attributes td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.woocommerce-product-attributes tr:hover td {
    background: rgba(255, 193, 7, 0.05);
}

/* Add to Cart Loading State */
.single_add_to_cart_button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.single_add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(33, 33, 33, 0.3);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-meta-info {
        padding: var(--spacing-sm);
    }

    .product-meta-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-meta-item .meta-label {
        margin-bottom: 4px;
        min-width: auto;
    }

    .product-social-sharing {
        flex-direction: column;
        align-items: flex-start;
    }

    .sharing-buttons {
        width: 100%;
    }

    .share-btn {
        flex: 1;
        justify-content: center;
    }

    .woocommerce .upsells ul.products,
    .woocommerce .cross-sells ul.products {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }
    
    .share-btn {
        min-height: 48px;
        font-size: 14px;
    }
}

