/*
 * Baking Challenge — WooCommerce Override Styles
 * Loaded at priority 9999 in wp_footer to guarantee it wins.
 */

/* ── PRODUCT TITLE ── */
body .summary.entry-summary h1.product_title.entry-title,
body h1.product_title.entry-title,
body h1.product_title {
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(2rem, 3.5vw, 3rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    color: #2C2420 !important;
    margin-bottom: 18px !important;
}

/* ── PRODUCT PRICE ── */
body .summary.entry-summary p.price,
body .summary p.price,
body p.price,
body .woocommerce div.product p.price {
    font-family: 'Playfair Display', serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #C4873A !important;
}
body p.price del { font-size: 1.1rem !important; color: #7A6A60 !important; opacity: 0.6 !important; }
body p.price ins { text-decoration: none !important; }

/* ── SHORT DESCRIPTION ── */
body .summary.entry-summary .woocommerce-product-details__short-description,
body .woocommerce-product-details__short-description {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.12rem !important;
    line-height: 1.78 !important;
    color: #7A6A60 !important;
    margin-bottom: 28px !important;
}

/* ── PRODUCT GALLERY ── */
body .woocommerce div.product div.images,
body .woocommerce-product-gallery {
    overflow: hidden !important;
}
body .woocommerce div.product div.images img {
    filter: saturate(0.9) !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
body .woocommerce div.product div.images:hover img {
    transform: scale(1.03) !important;
}
body .woocommerce div.product div.images .flex-control-thumbs li img {
    border: 2px solid transparent !important;
    transition: border-color 0.2s !important;
}
body .woocommerce div.product div.images .flex-control-thumbs li img:hover,
body .woocommerce div.product div.images .flex-control-thumbs li img.flex-active {
    border-color: #C4873A !important;
}

/* ── STAR RATING ── */
body .star-rating { color: #C4873A !important; }

/* ── ADD TO CART BUTTON ── */
body .summary.entry-summary form.cart button.single_add_to_cart_button,
body button.single_add_to_cart_button.button.alt,
body .single_add_to_cart_button {
    background: #C4873A !important;
    color: #fff !important;
    padding: 18px 40px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    display: block !important;
    transition: all 0.3s !important;
    font-family: 'DM Sans', sans-serif !important;
}
body button.single_add_to_cart_button:hover,
body .single_add_to_cart_button:hover {
    background: #E8A84E !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(196, 135, 58, 0.25) !important;
}

/* ── QUANTITY INPUT ── */
body .woocommerce .quantity .qty,
body input.qty {
    width: 64px !important;
    padding: 12px !important;
    border: 1.5px solid rgba(61, 43, 31, 0.12) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 1rem !important;
    text-align: center !important;
    border-radius: 0 !important;
}
body .woocommerce .quantity .qty:focus {
    border-color: #C4873A !important;
    outline: none !important;
}

/* ── PRODUCT TABS ── */
body .woocommerce-tabs {
    border-top: 1px solid rgba(61, 43, 31, 0.12) !important;
    padding-top: 48px !important;
    margin-top: 48px !important;
}
body .woocommerce-tabs ul.tabs {
    padding: 0 !important;
    margin: 0 0 40px !important;
    border-bottom: 2px solid rgba(61, 43, 31, 0.12) !important;
    display: flex !important;
    list-style: none !important;
    overflow: visible !important;
}
body .woocommerce-tabs ul.tabs::before { display: none !important; }
body .woocommerce-tabs ul.tabs li {
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 0 !important;
    margin: 0 0 -2px 0 !important;
    border-radius: 0 !important;
}
body .woocommerce-tabs ul.tabs li::before,
body .woocommerce-tabs ul.tabs li::after { display: none !important; }
body .woocommerce-tabs ul.tabs li a {
    padding: 16px 28px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #7A6A60 !important;
    transition: color 0.25s !important;
}
body .woocommerce-tabs ul.tabs li.active {
    border-bottom-color: #C4873A !important;
}
body .woocommerce-tabs ul.tabs li.active a { color: #3D2B1F !important; }
body .woocommerce-tabs ul.tabs li a:hover { color: #3D2B1F !important; }
body .woocommerce-tabs .panel {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.12rem !important;
    line-height: 1.82 !important;
    color: #7A6A60 !important;
}
body .woocommerce-tabs .panel h2 {
    font-family: 'Playfair Display', serif !important;
    color: #2C2420 !important;
}

/* ── RELATED PRODUCTS ── */
body .related.products > h2 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #2C2420 !important;
    margin-bottom: 32px !important;
    padding-top: 48px !important;
    border-top: 1px solid rgba(61, 43, 31, 0.12) !important;
}

/* ── PRODUCT META ── */
body .product_meta { font-size: 0.75rem !important; color: #7A6A60 !important; margin-top: 24px !important; }
body .product_meta a { color: #C4873A !important; }

/* ── SALE BADGE ── */
body span.onsale {
    background: #C4873A !important;
    color: #fff !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    padding: 6px 14px !important;
    border-radius: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

/* ── SHOP ARCHIVE ── */
body .woocommerce ul.products li.product {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
body .woocommerce ul.products li.product:hover {
    transform: translateY(-6px) !important;
}
body .woocommerce ul.products li.product a img {
    filter: saturate(0.88) !important;
    border: 1px solid rgba(61, 43, 31, 0.12) !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s !important;
}
body .woocommerce ul.products li.product:hover a img {
    transform: scale(1.04) !important;
    filter: saturate(1) !important;
}
body .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #2C2420 !important;
    transition: color 0.2s !important;
}
body .woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    color: #C4873A !important;
}
body .woocommerce ul.products li.product .price {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.2rem !important;
    color: #C4873A !important;
}
body .woocommerce ul.products li.product .button,
body .woocommerce ul.products li.product a.add_to_cart_button {
    background: #3D2B1F !important;
    color: #FAF6EF !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    padding: 12px 24px !important;
    border-radius: 0 !important;
    transition: all 0.25s !important;
    font-family: 'DM Sans', sans-serif !important;
}
body .woocommerce ul.products li.product .button:hover {
    background: #C4873A !important;
    transform: translateY(-1px) !important;
}

/* ── CART ── */
body.woocommerce-cart table.cart th {
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: #7A6A60 !important;
}
body.woocommerce-cart table.cart td.product-name a {
    font-family: 'Playfair Display', serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #2C2420 !important;
}
body.woocommerce-cart table.cart td.product-name a:hover { color: #C4873A !important; }
body.woocommerce-cart table.cart td.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border: 1px solid rgba(61, 43, 31, 0.12) !important;
}
body.woocommerce-cart table.cart td.product-price,
body.woocommerce-cart table.cart td.product-subtotal {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.05rem !important;
    color: #3D2B1F !important;
}
body.woocommerce-cart table.cart td.product-remove a { color: #7A6A60 !important; }
body.woocommerce-cart table.cart td.product-remove a:hover { color: #e05252 !important; }

/* ── CART TOTALS (dark box) ── */
body .cart_totals {
    background: #2C2420 !important;
    color: #FAF6EF !important;
    padding: 40px !important;
}
body .cart_totals h2 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 24px !important;
}
body .cart_totals th { color: rgba(250, 246, 239, 0.5) !important; font-weight: 400 !important; border-color: rgba(255, 255, 255, 0.08) !important; }
body .cart_totals td { color: #FAF6EF !important; font-weight: 500 !important; border-color: rgba(255, 255, 255, 0.08) !important; }
body .cart_totals .order-total th,
body .cart_totals .order-total td {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #E8A84E !important;
    border-bottom: none !important;
}
body .wc-proceed-to-checkout a.checkout-button,
body .cart_totals .wc-proceed-to-checkout a {
    display: block !important;
    background: #C4873A !important;
    color: #fff !important;
    text-align: center !important;
    padding: 18px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    transition: all 0.3s !important;
}
body .wc-proceed-to-checkout a:hover {
    background: #E8A84E !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(196, 135, 58, 0.3) !important;
}

/* ── CHECKOUT ── */
body.woocommerce-checkout h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #2C2420 !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(61, 43, 31, 0.12) !important;
    margin-bottom: 24px !important;
}
body.woocommerce-checkout .form-row input.input-text,
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"] {
    padding: 14px 18px !important;
    border: 1.5px solid rgba(61, 43, 31, 0.12) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.9rem !important;
    color: #3D2B1F !important;
    border-radius: 0 !important;
}
body.woocommerce-checkout .form-row input:focus,
body.woocommerce-checkout .form-row select:focus {
    border-color: #C4873A !important;
    box-shadow: 0 0 0 3px rgba(196, 135, 58, 0.08) !important;
    outline: none !important;
}
body.woocommerce-checkout .form-row label {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #7A6A60 !important;
}
body #place_order {
    background: #C4873A !important;
    color: #fff !important;
    padding: 20px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    font-family: 'DM Sans', sans-serif !important;
    transition: all 0.3s !important;
}
body #place_order:hover {
    background: #E8A84E !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(196, 135, 58, 0.25) !important;
}

/* ── MY ACCOUNT ── */
body .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    background: #FFFDF8 !important;
    border: 1px solid rgba(61, 43, 31, 0.12) !important;
}
body .woocommerce-MyAccount-navigation ul li a {
    display: block !important;
    padding: 14px 24px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #7A6A60 !important;
    border-left: 3px solid transparent !important;
    transition: all 0.2s !important;
}
body .woocommerce-MyAccount-navigation ul li a:hover {
    color: #3D2B1F !important;
    background: rgba(196, 135, 58, 0.04) !important;
}
body .woocommerce-MyAccount-navigation ul li.is-active a {
    color: #C4873A !important;
    border-left-color: #C4873A !important;
    background: rgba(196, 135, 58, 0.06) !important;
    font-weight: 600 !important;
}

/* ── NOTICES ── */
body .woocommerce-message { background: rgba(138, 158, 122, 0.1) !important; border-top-color: #8A9E7A !important; }
body .woocommerce-info { background: rgba(196, 135, 58, 0.08) !important; border-top-color: #C4873A !important; }

/* ── ALL WC BUTTONS ── */
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .woocommerce a.button.alt,
body .woocommerce button.button.alt {
    background: #3D2B1F !important;
    color: #FAF6EF !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    padding: 14px 28px !important;
    transition: all 0.25s !important;
    border: none !important;
}
body .woocommerce a.button:hover,
body .woocommerce button.button:hover,
body .woocommerce a.button.alt:hover,
body .woocommerce button.button.alt:hover {
    background: #C4873A !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}
