/* === Header 样式 === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    /* Ensure header is always top-most */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ... existing code ... */

/* Badge Positioning Group */
.product-card-badges-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem;
    z-index: 5;
    /* Lowered from 20 to avoid header overlap */
    pointer-events: none;
    /* Let clicks pass through to image link */
}



/* Logo */
.wp-block-site-title a {
    font-weight: 700;
    letter-spacing: -0.025em;
    text-decoration: none;
}



/* Cart Count Badge */
.wc-block-mini-cart__badge {
    position: absolute;
    background-color: var(--wp--preset--color--gold-600);
    color: var(--wp--preset--color--white);
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Navigation */
.main-navigation {
    border-top: 1px solid var(--wp--preset--color--gray-200);
}

.main-navigation .wp-block-navigation__container {
    background-color: var(--wp--preset--color--white);
    gap: 2rem;
}

/* === Global Button Styling (Overrides) === */

/* Fill / Default -> Matches Hero Primary */
.wp-block-button__link:not(.has-background) {
    background-color: var(--wp--preset--color--gold-600) !important;
    color: var(--wp--preset--color--white) !important;
    transition: background-color 0.2s ease;
    border: none;
}

.wp-block-button__link:not(.has-background):hover {
    background-color: var(--wp--preset--color--gold-700) !important;
    color: var(--wp--preset--color--white) !important;
    opacity: 1;
}

/* Outline -> Matches Hero Secondary */
.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border: 1px solid var(--wp--preset--color--white) !important;
    color: var(--wp--preset--color--white) !important;
    transition: all 0.2s ease;
}

.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--white) !important;
    color: var(--wp--preset--color--navy-900) !important;
    border-color: var(--wp--preset--color--white) !important;
}

.main-navigation a {
    color: var(--wp--preset--color--navy-700);
    text-decoration: none;
    transition: color 0.15s ease;
}

.main-navigation a:hover {
    color: var(--wp--preset--color--gold-600);
}



/* === Category Cards === */
.category-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Ensure image scale doesn't overflow */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* Tailwind shadow-sm */
    cursor: pointer;
}

.category-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Tailwind shadow-xl */
}

.category-card__image,
.category-card .wp-block-cover__image-background {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Note: When using Cover block, the img is usually .wp-block-cover__image-background */
.category-card:hover .category-card__image,
.category-card:hover .wp-block-cover__image-background {
    transform: scale(1.1);
}

.category-card .wp-block-cover__inner-container>.wp-block-group {
    padding: 0 !important;
}

.category-card h3 a {
    text-decoration: none !important;
}

.category-card .wp-block-cover__background {
    background: linear-gradient(to top, rgba(16, 42, 67, 0.8), transparent) !important;
    opacity: 1 !important;
}

.category-card__arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

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

/* === Recommended Products Section (Product Collection Block) === */

/* View All Link */
.recommended-view-all a,
h4 {
    transition: all 0.3s ease;
}

.recommended-view-all a,
h4:hover {
    color: var(--wp--preset--color--gold-700) !important;
}

/* Product Card (List Item) */
.wp-block-woocommerce-product-collection .wc-block-product {
    position: relative;
    /* Badge Context */
    background-color: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--gray-200);
    border-radius: 0.75rem;
    /* rounded-xl */
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    /* Reset WC default paddings/margins if any */
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Badge Positioning Group */
.product-card-badges-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0;
    /* Remove padding as requested */
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through to image link */
}

/* Common Badge Styles */
.product-card-badge-tag,
.product-card-badge-cat {
    /* Remove absolute positioning, let flex container handle it */
    position: static !important;
    margin: 0 !important;
    font-size: 0.75rem;
    line-height: 1;
    z-index: 10;
    pointer-events: auto;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    /* Add some padding to container to offset from edge */
}

.product-card-badge-tag a,
.product-card-badge-cat a {
    display: inline-block;
    text-decoration: none !important;
    padding: 0.55rem 0.65rem;
    /* Horizontal padding for pill shape */
    border-radius: 50px;
    /* Pill shape */
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

/* Tag Badge Visuals (Gold) */
.taxonomy-product_tag a {
    color: white !important;
    background-color: var(--wp--preset--color--gold-600);
    /* Unified Gold Color */
}

/* Category Badge Visuals (Light Blue/Gray) */
.taxonomy-product_cat a {
    color: var(--wp--preset--color--navy-900) !important;
    background-color: #D9E2EC;
}


/* Hide unwanted auto-generated link in category badge */
.taxonomy-product_tag a[data-wp-on--click],
.taxonomy-product_tag a:empty {
    display: none !important;
}

/* Hide separators if list */
.taxonomy-product_tag .wp-block-post-terms__separator,
.taxonomy-product_cat .wp-block-post-terms__separator {
    display: none;
}

.wp-block-woocommerce-product-collection .wc-block-product:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* shadow-xl */
}

/* Product Specifications Block (Table) */
.wp-block-woocommerce-product-specifications {
    margin-bottom: 0.25rem !important;
    font-size: 0.875rem !important;
    /* Small size */
    color: var(--wp--preset--color--navy-600) !important;
}

.wp-block-woocommerce-product-specifications table,
.wp-block-woocommerce-product-specifications th,
.wp-block-woocommerce-product-specifications td,
.wp-block-woocommerce-product-specifications tr {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    /* Compact layout */
}

.wp-block-woocommerce-product-specifications th {
    font-weight: normal;
    padding-right: 0.75rem !important;
    display: table-cell;
    width: 1%;
    /* Force shrink to fit */
    white-space: nowrap;
    /* Prevent wrapping */
}

/* Ensure links in specs inherit color */
.wp-block-woocommerce-product-specifications a {
    color: var(--wp--preset--color--navy-600) !important;
    text-decoration: none !important;
}

/* Image Wrapper */
.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-image {
    background-color: var(--wp--preset--color--beige-100);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin-bottom: 0 !important;
    position: relative;
    width: 100%;
    display: flex;
    /* Ensure inner elements stretch */
}

.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-image a {
    width: 100%;
    height: 100%;
    display: block;
}

.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    transition: transform 0.3s ease;
    display: block;
    /* Eliminate bottom gap */
    max-width: none !important;
    /* Override potential themes/default max-width */
}

.wp-block-woocommerce-product-collection .wc-block-product:hover .wc-block-components-product-image img {
    transform: scale(1.05);
}

/* Content Padding - Target direct children excluding image */
.wp-block-woocommerce-product-collection .wc-block-product>*:not(.wc-block-components-product-image) {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Title Styling */
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title {
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600;
    font-size: 1.125rem;
    text-align: left !important;
}

.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title a {
    color: var(--wp--preset--color--navy-900);
    text-decoration: none;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Hover effect on title when card is hovered */
.wp-block-woocommerce-product-collection .wc-block-product:hover .wp-block-post-title {
    color: var(--wp--preset--color--gold-600) !important;
}

/* Price Styling */
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-woocommerce-product-price {
    margin-top: auto;
    margin-bottom: 1rem !important;
    text-align: left !important;
}

/* Flexbox to reorder Price elements (Current Price First) */
.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-price {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--wp--preset--color--navy-900);
    font-weight: 400;
}

/* Current Price (ins) - Ensure it visually leads */
.wc-block-components-product-price ins {
    order: -1;
    /* Move to start */
    text-decoration: none;
    font-weight: 700;
    color: var(--wp--preset--color--navy-900);
    background: transparent;
    /* Reset default highlight if any */
}

/* Original Price (del) - Style small and dark gray */
.wc-block-components-product-price del {
    order: 1;
    /* Move to end */
    font-size: 0.875rem;
    /* Smaller font */
    color: var(--wp--preset--color--gray-500);
    /* Dark Gray */
    opacity: 0.8;
}

/* Button Styling */
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-woocommerce-product-button {
    margin-bottom: 1rem !important;
    width: 100%;
    max-width: 100%;
    /* Ensure it doesn't exceed parent */
    box-sizing: border-box;
    /* Include padding in width */
    padding-bottom: 1rem;
    padding-left: 0.75rem !important;
    /* Remove inherited padding */
    padding-right: 0.75rem !important;
    /* Remove inherited padding */
    display: flex;
    justify-content: center;
}

.wp-block-woocommerce-product-collection .wc-block-product .wp-block-button__link {
    background-color: var(--wp--preset--color--gold-600) !important;
    color: white !important;
    width: 100% !important;
    min-width: 0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
}

.wp-block-woocommerce-product-collection .wc-block-product .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--gold-700) !important;
    text-decoration: none !important;
}



/* Product Filters */
.wp-block-woocommerce-product-filters h2 {
    font-size: 1.5rem !important;
}

.wp-block-woocommerce-product-filters h3 {
    font-size: 1.25rem !important;
}

.wp-block-woocommerce-product-filters .wc-block-product-filter-checkbox-list__text:hover {
    color: var(--wp--preset--color--gold-600) !important;
}

.wp-block-woocommerce-product-filters .wc-block-product-filter-checkbox-list__text {
    color: var(--wp--preset--color--navy-900) !important;
}

/* Cart & Checkout Buttons */
.wc-block-cart__submit,
.wp-block-woocommerce-proceed-to-checkout-block,
.wc-block-components-checkout-place-order-button {
    background-color: var(--wp--preset--color--gold-600) !important;
    color: white !important;
    border-radius: 0.5rem !important;
    transition: background-color 0.2s ease;
}

.wc-block-cart__submit:hover,
.wp-block-woocommerce-proceed-to-checkout-block:hover,
.wc-block-components-checkout-place-order-button:hover {
    background-color: var(--wp--preset--color--gold-700) !important;
}

/* Checkout Order Summary */
.wp-block-woocommerce-checkout-order-summary-block {
    background-color: var(--wp--preset--color--white) !important;
}

/* Mini Cart Buttons */
/* Checkout Button - Gold Style */
.wc-block-mini-cart__footer-checkout {
    background-color: var(--wp--preset--color--gold-600) !important;
    color: white !important;
    border-radius: 0.5rem !important;
    transition: background-color 0.2s ease;
}

.wc-block-mini-cart__footer-checkout:hover {
    background-color: var(--wp--preset--color--gold-700) !important;
}

/* Cart Button - Outline Style with Navy Hover */
.wc-block-mini-cart__footer-cart {
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
}

.wc-block-mini-cart__footer-cart:hover {
    background-color: var(--wp--preset--color--navy-800) !important;
    border-color: var(--wp--preset--color--navy-800) !important;
}

/* === Footer Styling === */
/* Footer Links - Hover Effects Only */
footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--wp--preset--color--gold-500) !important;
}

/* Footer Lists */
footer .footer-nav-list,
footer .footer-contact-list {
    list-style: none;
    margin: 0;
}

footer .footer-nav-list li,
footer .footer-contact-list li {
    margin-bottom: 0.5rem;
}

footer .footer-nav-list li:last-child,
footer .footer-contact-list li:last-child {
    margin-bottom: 0;
}

/* Social Links Hover */
footer .footer-social-links a:hover {
    opacity: 0.8;
}

footer .footer-social-links svg {
    transition: all 0.2s ease;
}

footer .footer-social-links a:hover svg {
    color: var(--wp--preset--color--gold-500) !important;
}