/*
Theme Name: DWDLZ Theme
Theme URI: https://example.com
Author: DWDLZ
Author URI: https://example.com
Description: DEWALT风格响应式主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dwdlz
*/

.slick-slider, .slick-list, .slick-track, .slick-slide, .slick-slide > div {
    height: 100% !important;
}

.trade-slider:not(.slick-initialized) {
    display: flex;
    gap: 12px;
    overflow: hidden;
}

.trade-slider:not(.slick-initialized) > a {
    flex: 0 0 calc(25% - 9px);
}

@media (max-width: 1024px) {
    .trade-slider:not(.slick-initialized) > a {
        flex: 0 0 calc(50% - 6px);
    }
}

@media (max-width: 640px) {
    .trade-slider:not(.slick-initialized) > a {
        flex: 0 0 85%;
    }
}

.trade-slider .slick-slide {
    padding: 0 4px;
}

@media (min-width: 640px) {
    .trade-slider .slick-slide {
        padding: 0 6px;
    }
}

.drawer-panel {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.4s ease;
}

.drawer-panel.open {
    clip-path: inset(0 0 0 0);
}

.submenu-slide {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.submenu-slide.open {
    transform: translateX(0);
}

.content-auto {
    content-visibility: auto;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scrollbar-none::-webkit-scrollbar {
    display: none;
}

.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.text-balance {
    text-wrap: balance;
}

.bg-brand-surface-primary {
    background: #ffffff;
}

.bg-brand-surface-black {
    background: #000000;
}

.bg-brand-surface-card-light {
    background: #fff;
}

.bg-brand-surface-gray {
    background: #f5f5f5;
}

.text-brand-text-primary {
    color: #111111;
}

.text-brand-text-secondary {
    color: #555555;
}

.text-utility-text-primary {
    color: #222;
}

.text-utility-text-tertiary {
    color: #777;
}

.bg-tag-fill {
    background: #3973f5;
}

.text-tag-text {
    color: #000;
}

.border-brand-border-card-border {
    border-color: #e5e5e5;
}

.border-brand-border-accent {
    border-color: #3973f5;
}

.border-brand-border-primary {
    border-color: #ddd;
}

.card-radius-lg {
    border-radius: 12px;
}

.overlay-dark-30 {
    background: rgba(0,0,0,0.3);
}

.z-hero-1 {
    z-index: 1;
}

.z-hero-2 {
    z-index: 2;
}

.z-hero-3 {
    z-index: 3;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.size-full {
    width: 100%;
    height: 100%;
}

.touch-pan-y {
    touch-action: pan-y;
}

.wrap-anywhere {
    overflow-wrap: anywhere;
}

.prose-brand-md {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
}

.prose-brand-2xl {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.prose-display-md {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
}

.prose-body-medium-sm {
    font-size: 1rem;
    line-height: 1.5;
}

.prose-body-medium-md {
    font-size: 1.125rem;
    line-height: 1.6;
}

.prose-btn-sm {
    font-size: 0.875rem;
    font-weight: 600;
}

.prose-btn-lg {
    font-size: 1rem;
    font-weight: 600;
}

.prose-brand-3xs {
    font-size: 0.75rem;
    font-weight: 500;
}

.rounded-button {
    border-radius: 4px;
}

.px-btn-side-padding-md {
    padding-inline: 12px;
}

.bg-dewalt-yellow {
    background: #3973f5 !important;
}

.text-dewalt-yellow {
    color: #3973f5 !important;
}

.border-dewalt-yellow {
    border-color: #3973f5 !important;
}

.border-b-dewalt-yellow {
    border-bottom-color: #3973f5 !important;
}

.pl-6 {
    padding-left: 3rem !important;
}

.pb-4 {
    padding: 0.5rem 0 !important;
}

#mobileDrawerPanel *,
#mobileDrawerPanel .mobile-menu-toggle,
#mobileDrawerPanel .mobile-menu-toggle-2,
#mobileDrawerPanel .mobile-submenu a,
#mobileDrawerPanel .mobile-submenu-2 a {
    color: #000 !important;
}

#mobileDrawerPanel .mobile-menu-toggle span,
#mobileDrawerPanel .mobile-menu-toggle-2 span {
    color: #000 !important;
}

.mobile-menu-toggle,
.mobile-menu-toggle-2 {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.custom-logo {
    height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
}

.menu-item-has-children {
    position: relative;
}

.submenu-dropdown {
    display: none;
    position: absolute;
}

.menu-item-has-children:hover > .submenu-dropdown,
.menu-item-has-children > button:hover + .submenu-dropdown {
    display: block;
}

.menu-item-has-children > .submenu-dropdown:hover {
    display: block;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.show {
    max-height: 1000px;
}

/* ===== 产品分类页 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.product-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card h3 {
    color: #000;
    line-height: 1.3;
}

.product-card h3:hover {
    color: #3973f5;
}

/* 排序 */
.woocommerce-ordering select {
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    outline: none;
    cursor: pointer;
}

.woocommerce-ordering select:focus {
    border-color: #3973f5;
}

/* 分页 */
.product-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 2.5rem 0;
}

.product-pagination a.page-numbers,
.product-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: #fff;
}

.product-pagination a.page-numbers:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.product-pagination span.page-numbers.current {
    background: #3973f5;
    color: #fff;
    border-color: #3973f5;
    font-weight: 600;
}

.product-pagination a.prev,
.product-pagination a.next {
    font-size: 18px;
    line-height: 1;
}

/* 筛选器 */
.widget_layered_nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_layered_nav ul li {
    padding: 4px 0;
}

.widget_layered_nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget_layered_nav ul li a:hover,
.widget_layered_nav ul li.chosen a {
    color: #3973f5;
    font-weight: 600;
}

.widget_layered_nav_filter a {
    color: #3973f5;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 产品详情页 ===== */
.single-product .entry-hero,
.single-product .page-hero-section,
.single-product .entry-hero-layout-standard,
.single-product .entry-header,
.single-product .woocommerce-breadcrumb,
.single-product .site-container .entry-title,
.single-product .kadence-breadcrumbs,
.single-product .wp-block-kadence-spacer,
.single-product header.entry-header {
    display: none !important;
}

.single-product main {
    padding-top: 0 !important;
}

.product-accordion .accordion-toggle {
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
}

.product-accordion .accordion-toggle:hover .accordion-icon {
    color: #3973f5;
}

.product-accordion .accordion-content {
    display: block;
}

.product-accordion.is-collapsed .accordion-content {
    display: none;
}

.spec-row:last-child {
    border-bottom: none;
}

.product-progress-bar {
    cursor: pointer;
    min-width: 16px;
}

.single-product .prose p {
    margin-bottom: 0.75rem;
}

.single-product .prose ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.single-product .prose ol {
    list-style: decimal;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.single-product .prose strong {
    color: #000;
    font-weight: 600;
}

.single-product .prose a {
    color: #3973f5;
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .single-product .accordion-toggle {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}