/* ==========================================================================
   WooCommerce Styles
   ========================================================================== */

.woocommerce-main {
    padding: 40px 0 80px;
    min-height: 60vh;
    position: relative;
    z-index: 1;
}

.woocommerce-main > .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* WooCommerce page content (cart, checkout, account) */
.woocommerce-page-content {
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

.woocommerce-page-content > .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* Global WooCommerce notices container (for non-shop pages like cart/checkout) */
.wc-global-notices {
    padding-top: 100px;
    position: relative;
    z-index: 10;
}

.wc-global-notices .container {
    max-width: var(--container-width);
}

.wc-global-notices:empty,
.wc-global-notices .container:empty {
    display: none;
    padding: 0;
}

.woocommerce-notices-wrapper {
    margin-top: 16px;
}

/* Breadcrumb */
.breadcrumb-nav {
    padding: 120px 0 0;
    position: relative;
    z-index: 1;
}

.breadcrumb-nav .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.breadcrumb-nav a {
    color: var(--text-muted);
}

.breadcrumb-nav a:hover {
    color: var(--color-primary);
}

.breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Shop Header */
.shop-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.shop-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 4px;
}

.woocommerce-result-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.woocommerce-ordering select {
    padding: 10px 36px 10px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B635B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Product Loop - Reset WooCommerce defaults */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.products::before,
ul.products::after {
    display: none !important;
}

ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    list-style: none !important;
    clear: none !important;
}

/* Product Card */
.product-card-inner {
    border-radius: var(--radius-lg);
    overflow: visible;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-smooth);
}

.product-card-inner:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(30, 25, 21, 0.1);
    border-color: rgba(193, 123, 93, 0.25);
}

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--transition);
}

.product-card-inner:hover .product-card-image img {
    transform: scale(1.06);
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 25, 21, 0.6) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-inner:hover .product-card-overlay {
    opacity: 1;
}

.view-product {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card-info {
    padding: 20px;
}

.woocommerce-loop-product__title {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.3rem, 2vw, 1.55rem) !important;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.25;
}

.product-card-info .price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.product-card-info .price del {
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 8px;
}

.product-card-info .price ins {
    text-decoration: none;
    color: var(--color-primary);
}

/* Add to cart button in loop */
ul.products .button,
ul.products .add_to_cart_button,
.product-card-info .add_to_cart_button,
.product-card-inner > .add_to_cart_button,
.product-card-inner > .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px 20px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white !important;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    width: fit-content;
}

ul.products .button:hover,
ul.products .add_to_cart_button:hover,
.product-card-info .add_to_cart_button:hover,
.product-card-inner > .add_to_cart_button:hover,
.product-card-inner > .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(193, 123, 93, 0.3);
    color: white !important;
}

/* Sale Badge - shared */
.onsale {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    margin: 0;
}

/* Sale Badge - larger on single product gallery */
.single-product .woocommerce-product-gallery .onsale {
    padding: 6px 16px;
    font-size: 0.8rem;
}

/* ==========================================================================
   Single Product
   ========================================================================== */

/* Only target the main product div, not li.product in related/upsells */
.single-product div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding-top: 20px;
    position: relative;
}

.single-product .woocommerce-product-gallery {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
    background: var(--bg-secondary, #f5f0eb);
}

/* Zoom trigger / magnifying glass */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger img {
    width: 18px;
    height: 18px;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
    padding: 0;
}

.single-product .woocommerce-product-gallery img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* FlexSlider main image viewport */
.single-product .woocommerce-product-gallery .flex-viewport {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    max-height: 560px;
}

.single-product .woocommerce-product-gallery .flex-viewport img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 560px;
}

/* Single image (no slider) */
.single-product .woocommerce-product-gallery--without-images .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:last-child img {
    max-height: 560px;
    object-fit: cover;
}

/* FlexSlider thumbnail navigation */
.single-product .woocommerce-product-gallery ol.flex-control-nav {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 8px;
    padding: 0;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav li {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s ease;
    opacity: 0.6;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav li:hover {
    opacity: 1;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.single-product .woocommerce-product-gallery ol.flex-control-nav li img.flex-active {
    border-color: var(--color-primary);
    opacity: 1;
}

/* FlexSlider direction nav arrows */
.single-product .woocommerce-product-gallery .flex-direction-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-indent: -9999px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.single-product .woocommerce-product-gallery:hover .flex-direction-nav a {
    opacity: 1;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev {
    left: 12px;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next {
    right: 12px;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    text-indent: 0;
    display: block;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev::after {
    transform: rotate(135deg);
    margin-left: 3px;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next::after {
    transform: rotate(-45deg);
    margin-right: 3px;
}

.single-product .summary {
    padding-top: 20px;
}

.product-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 16px;
    line-height: 1.15;
}

.single-product div.product > .summary .price {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 24px;
}

/* Hide the top-level range price on variable products — variation price shows after selection */
.single-product div.product-type-variable > .summary > .price {
    display: none;
}

.single-product div.product > .summary .price del {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1.1rem;
}

.single-product div.product > .summary .price ins {
    text-decoration: none;
}

.single-product .woocommerce-product-details__short-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Quantity */
.quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-right: 12px;
}

.quantity input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 12px 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
}

.quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Single Add to Cart */
.single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    letter-spacing: 0.02em;
}

.single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* Product Meta */
.product_meta {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product_meta > span {
    display: block;
    margin-bottom: 8px;
}

.product_meta a {
    color: var(--color-primary);
}

/* Product Tabs */
.woocommerce-tabs {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 4px;
    list-style: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
    margin-bottom: 32px;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.woocommerce-tabs .panel {
    max-width: 800px;
}

.woocommerce-tabs .panel h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Additional information table */
.woocommerce-product-attributes,
.shop_attributes {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.woocommerce-product-attributes th,
.shop_attributes th {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 20px 12px 0;
    font-size: 0.9rem;
    white-space: nowrap;
    vertical-align: top;
    border-bottom: 1px solid var(--glass-border);
    width: 140px;
}

.woocommerce-product-attributes td,
.shop_attributes td {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--glass-border);
}

.woocommerce-product-attributes td p,
.shop_attributes td p {
    margin: 0;
}

.woocommerce-product-attributes tr:last-child th,
.woocommerce-product-attributes tr:last-child td,
.shop_attributes tr:last-child th,
.shop_attributes tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Reviews & Star Ratings
   ========================================================================== */

/* Star rating display (read-only, on product cards & reviews) */
.star-rating {
    position: relative;
    display: inline-block;
    width: 5.4em;
    height: 1.1em;
    font-size: 1rem;
    line-height: 1;
    overflow: hidden;
    color: transparent;
    letter-spacing: 0.15em;
}

.star-rating::before {
    content: '\2605\2605\2605\2605\2605';
    position: absolute;
    top: 0;
    left: 0;
    color: #ddd;
    letter-spacing: 0.15em;
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: transparent;
}

.star-rating span::before {
    content: '\2605\2605\2605\2605\2605';
    color: var(--color-primary, #C17B5D);
    letter-spacing: 0.15em;
}

/* Interactive star rating selector (review form) */
.comment-form-rating {
    margin-bottom: 24px;
}

.comment-form-rating > label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

p.stars {
    display: inline-flex;
    margin-bottom: 8px;
    line-height: 1;
}

p.stars span {
    display: inline-flex;
    gap: 2px;
}

p.stars a {
    display: inline-block;
    width: 28px;
    height: 28px;
    text-indent: -9999px;
    position: relative;
    text-decoration: none;
}

p.stars a::before {
    content: '\2605';
    position: absolute;
    top: 0;
    left: 0;
    text-indent: 0;
    font-size: 1.6rem;
    color: #ddd;
    transition: color 0.15s ease, transform 0.15s ease;
}

/* Hover: fill all stars, then un-fill after hovered */
p.stars:hover a::before {
    color: var(--color-primary, #C17B5D);
}

p.stars a:hover ~ a::before {
    color: #ddd !important;
}

/* Selected state: fill up to active, empty after */
p.stars.selected a::before {
    color: var(--color-primary, #C17B5D);
}

p.stars.selected a.active ~ a::before {
    color: #ddd;
}

/* Hover overrides selected */
p.stars.selected:hover a::before {
    color: var(--color-primary, #C17B5D);
}

p.stars.selected:hover a:hover ~ a::before {
    color: #ddd !important;
}

/* Review form */
#review_form_wrapper {
    margin-top: 32px;
}

#review_form .comment-reply-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
}

#review_form .comment-form {
    display: grid;
    gap: 20px;
}

#review_form .comment-form label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

#review_form .comment-form textarea,
#review_form .comment-form input[type="text"],
#review_form .comment-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.2s ease;
    resize: vertical;
}

#review_form .comment-form textarea:focus,
#review_form .comment-form input[type="text"]:focus,
#review_form .comment-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

#review_form .comment-form textarea {
    min-height: 140px;
}

#review_form .comment-form .form-submit input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    letter-spacing: 0.02em;
}

#review_form .comment-form .form-submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* No reviews message */
.woocommerce-noreviews {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 8px;
}

/* Review list */
#comments .commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

#comments .commentlist li.review {
    padding: 24px 0;
    border-bottom: 1px solid var(--glass-border);
}

#comments .commentlist li.review:last-child {
    border-bottom: none;
}

#comments .commentlist .comment_container {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
}

#comments .commentlist .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

#comments .commentlist .comment-text {
    min-width: 0;
}

#comments .commentlist .comment-text .star-rating {
    margin-bottom: 8px;
}

#comments .commentlist .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#comments .commentlist .meta strong {
    color: var(--text-primary);
    font-weight: 600;
}

#comments .commentlist .description p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Reset WooCommerce column classes globally */
ul.products[class*="columns-"] {
    display: grid !important;
    gap: 32px;
}

/* Related Products & Upsells */
.related.products,
.upsells.products,
section.related,
section.upsells {
    grid-column: 1 / -1;
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    clear: both;
}

.related.products > h2,
.upsells.products > h2,
section.related > h2,
section.upsells > h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 40px;
    color: var(--text-primary);
    text-align: center;
}

/* Related products grid - auto-fit ensures items stretch to fill row */
.related.products ul.products,
.upsells.products ul.products,
section.related ul.products,
section.upsells ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 28px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.related.products ul.products li.product,
.upsells.products ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
}

/* Related product cards - fill grid cell */
.related.products .product-card-inner,
.upsells.products .product-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related.products .product-card-image,
.upsells.products .product-card-image {
    aspect-ratio: 4/5;
    width: 100%;
    overflow: hidden;
}

.related.products .product-card-image img,
.upsells.products .product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related.products .product-card-info,
.upsells.products .product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px;
}

/* Related products button spacing */
.related.products .product-card-inner > .button,
.related.products .product-card-inner > .add_to_cart_button,
.upsells.products .product-card-inner > .button,
.upsells.products .product-card-inner > .add_to_cart_button {
    margin-top: auto;
}

@media (max-width: 768px) {
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Cart & Checkout - Block-based WooCommerce
   ========================================================================== */

/* Container matches site-wide --container-width */
.woocommerce-cart .woocommerce-page-content .container,
.woocommerce-checkout .woocommerce-page-content .container {
    max-width: var(--container-width);
}

/* Force block wrappers to fill container */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.woocommerce-page-content .wp-block-woocommerce-cart,
.woocommerce-page-content .wp-block-woocommerce-checkout,
.woocommerce-page-content .wc-block-cart,
.woocommerce-page-content .wc-block-checkout {
    max-width: 100% !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Base font for cart & checkout */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.wc-block-cart,
.wc-block-checkout {
    width: 100%;
    font-family: var(--font-body);
    color: var(--text-primary);
}

.woocommerce-cart h1, .woocommerce-cart h2,
.woocommerce-checkout h1, .woocommerce-checkout h2,
.wc-block-cart h2, .wc-block-checkout h2 {
    font-family: var(--font-heading);
    font-weight: 500;
}

/* Block notices */
.wc-block-components-notices {
    margin-bottom: 16px;
}

/* ---------- Sidebar layout (cart & checkout share this) ---------- */
.wc-block-components-sidebar-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr) !important;
    gap: 40px !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.wc-block-components-main {
    min-width: 0;
}

.wc-block-components-sidebar {
    min-width: 0;
}

@media (max-width: 1024px) {
    .wc-block-components-sidebar-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- Cart items table ---------- */
.wc-block-cart-items {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
    background: transparent !important;
}

.wc-block-cart-items__header {
    border-bottom: 2px solid var(--glass-border);
}

.wc-block-cart-items__header th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 12px 16px;
    font-weight: 600;
    border: none;
    background: transparent;
}

.wc-block-cart-items__row {
    border-bottom: 1px solid var(--glass-border);
}

.wc-block-cart-items__row td {
    padding: 24px 12px;
    vertical-align: top;
}

/* Cart image */
.wc-block-cart-item__image {
    width: 100px;
}

.wc-block-cart-item__image img {
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Cart product details */
.wc-block-cart-item__product {
    vertical-align: top;
}

.wc-block-cart-item__wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wc-block-cart-item__product .wc-block-components-product-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}

.wc-block-cart-item__product .wc-block-components-product-name:hover {
    color: var(--color-primary);
}

.wc-block-cart-item__prices {
    margin-bottom: 4px;
}

.wc-block-cart-item__prices .price {
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 600;
}

.wc-block-cart-item__prices del {
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 6px;
}

.wc-block-cart-item__prices ins {
    text-decoration: none;
    color: var(--color-primary);
}

/* Sale badge in cart */
.wc-block-components-sale-badge {
    display: inline-block;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 4px;
    width: fit-content;
}

/* Product metadata (short description) */
.wc-block-components-product-metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.wc-block-components-product-metadata__description p {
    margin: 0;
}

/* Quantity + remove row */
.wc-block-cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.wc-block-components-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-primary);
}

.wc-block-components-quantity-selector__input {
    width: 48px;
    text-align: center;
    border: 0;
    background: transparent;
    padding: 8px 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.wc-block-components-quantity-selector__button {
    border: 0;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color var(--transition-fast);
}

.wc-block-components-quantity-selector__button:hover {
    color: var(--color-primary);
}

.wc-block-components-quantity-selector__button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Remove item button */
.wc-block-cart-item__remove-link {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: var(--font-body);
    white-space: nowrap;
}

.wc-block-cart-item__remove-link:hover {
    color: #e53e3e;
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
}

/* Cart total column */
.wc-block-cart-item__total {
    text-align: right;
    vertical-align: top;
}

.wc-block-cart-item__total .price {
    font-size: 1.1rem;
    color: var(--color-primary);
    font-weight: 700;
}

.wc-block-cart-item__total .wc-block-components-sale-badge {
    margin-top: 4px;
}

/* ---------- Cart sidebar (totals) ---------- */
.wc-block-components-sidebar .wc-block-cart__totals-title,
.wc-block-cart__totals-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--glass-border);
}

.wc-block-components-totals-wrapper {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.wc-block-components-totals-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.wc-block-components-totals-item__label {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 400;
}

.wc-block-components-totals-item__value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.wc-block-components-totals-footer-item {
    padding-top: 12px;
    margin-top: 4px;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Coupon toggle */
.wc-block-components-totals-coupon__button-wrapper,
.wc-block-components-panel__button {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}

.wc-block-components-panel__button-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.wc-block-components-panel__button[aria-expanded="true"] .wc-block-components-panel__button-icon {
    transform: rotate(180deg);
}

.wc-block-components-panel__button:hover {
    color: var(--color-primary);
}

/* Coupon panel */
.wc-block-components-totals-coupon,
.wc-block-components-panel {
    width: 100%;
    overflow: hidden;
}

/* Coupon form: inline input + button */
.wc-block-components-totals-coupon__content {
    margin-top: 12px;
}

.wc-block-components-totals-coupon__form {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    align-items: stretch;
}

.wc-block-components-totals-coupon__input {
    flex: 1;
    margin-bottom: 0 !important;
}

.wc-block-components-totals-coupon input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.wc-block-components-totals-coupon input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(193, 123, 93, 0.1);
}

/* Coupon input label - position below input, subtle */
.wc-block-components-totals-coupon .wc-block-components-text-input label {
    font-size: 0.78rem;
    opacity: 0.6;
    order: 1;
    margin-top: 4px;
}

/* Coupon apply button */
.wc-block-components-totals-coupon__form .wc-block-components-button {
    white-space: nowrap;
    width: auto !important;
    min-width: 90px;
    padding: 10px 20px !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.85rem !important;
}

/* Primary action buttons */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__actions_row .wc-block-components-button:not(.wc-block-components-checkout-return-to-cart-button) {
    background: var(--gradient-primary) !important;
    color: white !important;
    border-radius: var(--radius-full) !important;
    padding: 16px 32px;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* Generic block buttons (apply coupon, etc.) */
.wc-block-components-button {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

/* Return to cart link */
.wc-block-components-checkout-return-to-cart-button {
    background: transparent !important;
    color: var(--text-secondary) !important;
    padding: 12px 20px;
    font-size: 0.9rem;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto !important;
}

.wc-block-components-checkout-return-to-cart-button:hover {
    color: var(--color-primary) !important;
    box-shadow: none;
    transform: none;
}

/* ---------- Classic cart form (fallback) ---------- */
.woocommerce-cart-form table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.woocommerce-cart-form th {
    text-align: left;
    padding: 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.woocommerce-cart-form td {
    padding: 20px 16px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.woocommerce-cart-form .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.woocommerce-cart-form .product-name a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.woocommerce-cart-form .product-remove a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.woocommerce-cart-form .product-remove a:hover {
    color: #e53e3e;
}

/* Classic cart totals */
.cart_totals {
    max-width: 500px;
    margin-left: auto;
    margin-top: 40px;
    padding: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.cart_totals h2 { font-size: 1.5rem; margin-bottom: 20px; }
.cart_totals table { width: 100%; }
.cart_totals th, .cart_totals td { padding: 12px 0; border-bottom: 1px solid var(--glass-border); }

.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    margin-top: 20px;
    transition: all var(--transition-smooth);
}

.wc-proceed-to-checkout .checkout-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* ==========================================================================
   Checkout
   ========================================================================== */

.wc-block-checkout__main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Checkout steps */
.wc-block-components-checkout-step {
    padding: 28px 0;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    background: transparent;
    border-radius: 0;
}

.wc-block-components-checkout-step:last-child {
    border-bottom: none;
}

.wc-block-components-checkout-step__heading {
    margin-bottom: 18px;
}

.wc-block-components-checkout-step__heading .wc-block-components-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.wc-block-components-checkout-step__content {
    border: none;
}

.wc-block-components-checkout-step hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 16px 0;
}

/* Checkout step number/icon — hide the default step counter if it creates stray elements */
.wc-block-components-checkout-step::before {
    display: none !important;
}

/* Order notes - styled as a clean card */
.wc-block-checkout__add-note {
    padding: 16px 20px;
    background: rgba(193, 123, 93, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.wc-block-checkout__add-note .wc-block-components-checkbox {
    margin-bottom: 8px;
}

.wc-block-checkout__add-note .wc-block-components-checkbox label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Terms and conditions */
.wc-block-checkout__terms {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 16px;
}

.wc-block-checkout__terms a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Checkout form layout - single column (simplified fields) */
.wc-block-components-address-form {
    display: flex !important;
    flex-direction: column;
    gap: 0;
}

.wc-block-components-address-form > * {
    width: 100%;
}

/* More spacing between address form fields */
.wc-block-components-address-form .wc-block-components-text-input,
.wc-block-components-address-form .wc-blocks-components-select__container,
.wc-block-components-address-form .wc-block-components-combobox {
    margin-bottom: 16px;
}

/* Checkout sidebar */
.wc-block-checkout__sidebar .wc-block-components-sidebar-layout {
    display: block !important;
}

.wc-block-checkout__sidebar {
    position: sticky;
    top: 100px;
}

/* ---------- Checkbox SVG fix ---------- */
.wc-block-components-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin: 8px 0;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    position: relative;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.wc-block-components-checkbox .wc-block-components-checkbox__input:hover {
    border-color: rgba(193, 123, 93, 0.5);
}

.wc-block-components-checkbox .wc-block-components-checkbox__input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 123, 93, 0.15);
}

.wc-block-components-checkbox svg,
.wc-block-components-checkbox .wc-block-components-checkbox__mark {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.wc-block-components-checkbox label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

/* ---------- Checkout form inputs ---------- */
.wc-block-components-text-input,
.wc-blocks-components-select__container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

/* Labels: small, below input as helper text */
.wc-block-components-text-input label,
.wc-blocks-components-select__label {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.02em;
    line-height: 1.3;
    order: 1;
    margin-top: 5px;
    margin-bottom: 0;
    padding: 0;
}

/* Active/focused label - subtle highlight, not screaming */
.wc-block-components-text-input.is-active label {
    color: var(--text-secondary);
    position: static !important;
    transform: none !important;
    font-size: 0.78rem !important;
}

/* Inputs */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea {
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-primary);
    outline: none;
    order: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Placeholder for empty inputs */
.wc-block-components-text-input input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.wc-block-components-select select,
.wc-blocks-components-select__select {
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-primary);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Custom select chevron */
.wc-blocks-components-select__container,
.wc-block-components-combobox .wc-blocks-components-select__container {
    position: relative;
}

.wc-blocks-components-select__select {
    padding-right: 40px;
}

.wc-blocks-components-select__chevron,
.wc-blocks-components-select__expand {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

/* Hide duplicate expand SVG if chevron also exists */
.wc-blocks-components-select__container .wc-blocks-components-select__expand ~ .wc-blocks-components-select__chevron,
.wc-blocks-components-select__container .wc-blocks-components-select__chevron ~ .wc-blocks-components-select__expand {
    display: none;
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus,
.wc-block-components-select select:focus,
.wc-blocks-components-select__select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(193, 123, 93, 0.08);
}

/* ---------- Hide address_2 hidden input (WC blocks injects it even when field is hidden) ---------- */
.wc-block-components-address-form__address_2-hidden-input,
input.wc-block-components-address-form__address_2-hidden-input,
input[id$="address_2"],
input[id$="address-2"],
input[id*="-address_2"],
input[autocomplete="address-line2"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
    clip: rect(0,0,0,0) !important;
}

/* ---------- Address card with "Edit" button - always show form directly ---------- */
.wc-block-components-address-card {
    display: none !important;
}

/* When address card is hidden, form should always be visible */
.wc-block-components-address-form {
    display: flex !important;
}

/* Also hide the address_2 toggle link "Add apartment..." */
.wc-block-components-address-form__address_2-toggle,
a[class*="address_2-toggle"],
button[class*="address_2-toggle"] {
    display: none !important;
}

/* Textarea (order notes) */
.wc-block-components-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    resize: vertical;
}

.wc-block-components-textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 123, 93, 0.1);
}

/* Address toggle */
.wc-block-components-address-form__address_2-toggle {
    color: var(--color-primary);
    font-size: 0.85rem;
}

/* ---------- Order summary in checkout sidebar ---------- */
/* Main rules now in Cart & Checkout UX Overhaul section below */

/* ---------- Checkout totals ---------- */
/* Main rules now in Cart & Checkout UX Overhaul section below */

/* ---------- Classic checkout form (fallback) ---------- */
.woocommerce form .form-row {
    margin-bottom: 16px;
}

.woocommerce form .form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--color-primary);
}

#place_order {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    margin-top: 20px;
}

#place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* ==========================================================================
   WooCommerce Notices
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9rem;
    border: 1px solid;
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.woocommerce-message {
    background: rgba(39, 174, 96, 0.08);
    border-color: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.woocommerce-info {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.woocommerce-error {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    list-style: none;
    padding-left: 24px;
}

.woocommerce-message a,
.woocommerce-info a {
    margin-left: auto;
    padding: 6px 16px;
    background: var(--gradient-primary);
    color: white !important;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pagination */
.woocommerce-pagination {
    margin-top: 60px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 4px;
    list-style: none;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.woocommerce-pagination ul li a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.woocommerce-pagination ul li span.current {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ==========================================================================
   Color Swatches - Variable Products
   ========================================================================== */

/* ── Color Swatch System ── */
.um-variations {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.um-variation-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.um-variation-label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-heading);
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 2px;
}

.um-attr-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.um-selected-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(-4px);
}

.um-selected-value.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Swatch Grid */
.um-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px;
}

/* Individual Swatch */
.um-swatch {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    outline: none;
    padding: 0;
    box-shadow: none;
}

/* Inner color circle */
.um-swatch::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--swatch-color, var(--bg-tertiary));
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Checkmark */
.um-swatch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(-10deg);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 3;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* Light swatches get a dark checkmark */
.um-swatch-light::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231E1915' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* Light swatches get a visible border */
.um-swatch-light::before {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Hover - gentle lift */
.um-swatch:hover::before {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.um-swatch:hover {
    border-color: rgba(0, 0, 0, 0.06);
}

.um-swatch:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

/* Active / selected state */
.um-swatch.active {
    border-color: var(--text-primary);
}

.um-swatch.active::before {
    transform: scale(0.82);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.um-swatch.active::after {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
}

/* Pulse ring on select */
.um-swatch.active .um-swatch-ring {
    animation: um-ring-pulse 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.um-swatch-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

@keyframes um-ring-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Disabled swatch */
.um-swatch-disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

.um-swatch-disabled::before {
    box-shadow: none;
}

/* Strike-through for disabled */
.um-swatch-disabled .um-swatch-strike {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.4);
    top: 50%;
    left: 0;
    transform: rotate(45deg);
    z-index: 5;
    border-radius: 1px;
}

/* Text fallback for swatches without color */
.um-swatch-text {
    position: relative;
    z-index: 2;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    letter-spacing: 0.02em;
}

/* Shimmer effect on click */
.um-swatch-shimmer {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.um-swatch-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.5) 60deg,
        transparent 120deg
    );
    animation: um-shimmer 0.7s ease-out forwards;
}

@keyframes um-shimmer {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(180deg);
        opacity: 0;
    }
}

/* Tooltip on hover */
.um-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-body);
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    letter-spacing: 0.02em;
}

.um-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
}

.um-swatch:hover .um-swatch-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Color name fade-in below swatches on mobile */
@media (hover: none) {
    .um-swatch-tooltip {
        display: none;
    }
}

/* Hide the original select for color attributes */
.um-hidden-select.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Non-color variation selects (size etc) keep styled dropdown */
.um-select-variation .um-hidden-select {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}

.um-select-variation select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B635B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.um-select-variation select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Reset variations link */
.um-variations .reset_variations {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.um-variations .reset_variations:hover {
    color: var(--color-primary);
}

/* Override default WooCommerce variation table */
/* .single-product .variations {
    display: none;
} */

/* Single variation price/description */
.single_variation_wrap {
    min-height: 60px;
}

.single_variation_wrap .woocommerce-variation-price {
    margin-bottom: 16px;
}

.single_variation_wrap .woocommerce-variation-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    transition: opacity 0.25s ease;
}

/* Skeleton loader for price during variation update */
.single_variation_wrap .woocommerce-variation-price.um-price-loading .price {
    opacity: 0;
}

.single_variation_wrap .woocommerce-variation-price.um-price-loading::before {
    content: '';
    display: block;
    width: 140px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0ebe3 25%, #e8e0d4 50%, #f0ebe3 75%);
    background-size: 200% 100%;
    animation: um-skeleton 1.2s ease-in-out infinite;
}

@keyframes um-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .um-swatch {
        width: 42px;
        height: 42px;
    }

    .um-color-swatches {
        gap: 10px;
    }

    .um-attr-name {
        font-size: 0.85rem;
    }

    /* Smaller gallery on mobile so swatches and image are both visible */
    .single-product .woocommerce-product-gallery .flex-viewport {
        max-height: 350px;
    }

    .single-product .woocommerce-product-gallery .flex-viewport img {
        max-height: 350px;
    }

    /* Tighter spacing on mobile product page */
    .single-product .summary {
        padding-top: 8px;
    }

    .product-title {
        margin-bottom: 10px;
    }

    .single-product .woocommerce-product-details__short-description {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Cart & Checkout - Major UX Overhaul
   ========================================================================== */

/* ---------- Skeleton loaders while WC blocks load ---------- */
@keyframes cart-skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.wc-block-cart .wc-block-components-sidebar-layout:empty::before,
.wc-block-checkout .wc-block-components-sidebar-layout:empty::before {
    content: '';
    display: block;
    width: 100%;
    min-height: 400px;
    background:
        linear-gradient(var(--glass-border) 20px, transparent 0) 0 0 / 60% 20px no-repeat,
        linear-gradient(var(--glass-border) 14px, transparent 0) 0 36px / 40% 14px no-repeat,
        linear-gradient(var(--glass-border) 100px, transparent 0) 0 70px / 100px 100px no-repeat,
        linear-gradient(var(--glass-border) 16px, transparent 0) 120px 70px / 50% 16px no-repeat,
        linear-gradient(var(--glass-border) 12px, transparent 0) 120px 100px / 30% 12px no-repeat,
        linear-gradient(var(--glass-border) 40px, transparent 0) 120px 130px / 120px 40px no-repeat;
    border-radius: var(--radius-md);
    animation: cart-skeleton-pulse 1.5s ease-in-out infinite;
}

/* Cart loading overlay */
.wc-block-components-spinner::after {
    border-color: var(--color-primary) transparent transparent transparent !important;
}

/* ---------- Empty cart page ---------- */
.wc-block-cart__empty-state,
.cart-empty {
    text-align: center;
    padding: 60px 20px 80px;
    max-width: 480px;
    margin: 0 auto;
}

.wc-block-cart__empty-state__title,
.cart-empty.woocommerce-info {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    border: none;
    background: none;
    display: block;
    text-align: center;
}

/* Empty cart icon */
.wc-block-cart__empty-state::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%23C9A96E' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 01-8 0'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.wc-block-cart__empty-state__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Empty cart "Continue shopping" / "Return to shop" button */
.wc-block-cart__empty-state .wc-block-cart__empty-state__button,
.wc-block-cart__empty-state a,
.return-to-shop a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary) !important;
    color: white !important;
    border-radius: var(--radius-full);
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.wc-block-cart__empty-state .wc-block-cart__empty-state__button:hover,
.wc-block-cart__empty-state a:hover,
.return-to-shop a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(193, 123, 93, 0.4);
}

/* Empty cart - "New in store" products: MUST be grid */
.wc-block-cart__empty-state ~ *,
.wc-block-cart .wp-block-woocommerce-product-new,
.wc-block-cart [class*="wp-block-woocommerce-product"],
.woocommerce-cart .wp-block-woocommerce-product-new {
    max-width: 1000px;
    margin: 40px auto 0;
}

/* Force product grid in empty cart */
.wc-block-cart .wc-block-grid__products,
.wc-block-cart ul.products,
.woocommerce-cart .wc-block-grid__products,
.woocommerce-cart ul.products,
.wc-block-cart .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .wc-block-cart .wc-block-grid__products,
    .wc-block-cart ul.products,
    .woocommerce-cart .wc-block-grid__products,
    .woocommerce-cart ul.products,
    .wc-block-cart .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .wc-block-cart .wc-block-grid__products,
    .wc-block-cart ul.products,
    .woocommerce-cart .wc-block-grid__products,
    .woocommerce-cart ul.products,
    .wc-block-cart .wp-block-post-template {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Product items in empty cart grid - match standard product cards */
.wc-block-cart .wc-block-grid__product,
.wc-block-cart li.product,
.woocommerce-cart .wc-block-grid__product,
.woocommerce-cart li.product {
    text-align: left;
    list-style: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-smooth);
}

.wc-block-cart .wc-block-grid__product:hover,
.wc-block-cart li.product:hover,
.woocommerce-cart .wc-block-grid__product:hover,
.woocommerce-cart li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(30, 25, 21, 0.1);
    border-color: rgba(193, 123, 93, 0.25);
}

.wc-block-cart .wc-block-grid__product-image,
.woocommerce-cart .wc-block-grid__product-image {
    overflow: hidden;
    aspect-ratio: 4/5;
}

.wc-block-cart .wc-block-grid__product-image img,
.woocommerce-cart .wc-block-grid__product-image img,
.woocommerce-cart li.product img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform 0.8s var(--transition, cubic-bezier(0.16, 1, 0.3, 1));
}

.wc-block-cart .wc-block-grid__product:hover .wc-block-grid__product-image img,
.woocommerce-cart .wc-block-grid__product:hover .wc-block-grid__product-image img {
    transform: scale(1.06);
}

.wc-block-cart .wc-block-grid__product-title,
.woocommerce-cart .wc-block-grid__product-title {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding: 16px 16px 4px;
    line-height: 1.3;
}

.wc-block-cart .wc-block-grid__product-title a,
.woocommerce-cart .wc-block-grid__product-title a {
    color: inherit;
    text-decoration: none;
}

.wc-block-cart .wc-block-grid__product-price,
.woocommerce-cart .wc-block-grid__product-price {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 16px 8px;
}

.wc-block-cart .wc-block-grid__product-add-to-cart,
.woocommerce-cart .wc-block-grid__product-add-to-cart {
    padding: 0 16px 16px;
}

.wc-block-cart .wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-cart .add_to_cart_button,
.woocommerce-cart .wc-block-grid__product-add-to-cart .wp-block-button__link,
.woocommerce-cart .add_to_cart_button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary) !important;
    color: white !important;
    border-radius: var(--radius-full);
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    width: fit-content;
}

.wc-block-cart .wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
.wc-block-cart .add_to_cart_button:hover,
.woocommerce-cart .wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
.woocommerce-cart .add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(193, 123, 93, 0.3);
}

/* Hide bullet points from list items */
.wc-block-cart li.product::marker,
.woocommerce-cart li.product::marker {
    content: none;
    display: none;
}

/* Hide rating stars in empty cart grid (too noisy) */
.wc-block-cart .wc-block-grid__product-rating,
.woocommerce-cart .wc-block-grid__product-rating {
    display: none;
}

/* ---------- Cart: Clean up price redundancy ---------- */

/* On mobile cart, only show total price column, not per-item price in details */
@media (max-width: 768px) {
    .wc-block-cart-item__prices {
        display: none;
    }

    .wc-block-cart-item__total .price {
        font-size: 1rem;
    }

    .wc-block-cart-item__total .wc-block-components-sale-badge {
        font-size: 0.7rem;
        margin-top: 2px;
    }
}

/* Desktop cart: de-emphasize the per-item price to reduce visual noise */
.wc-block-cart-item__prices .price {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* Keep total column prominent */
.wc-block-cart-item__total .price {
    font-size: 1.1rem;
    color: var(--color-primary);
    font-weight: 700;
}

/* ---------- Cart mobile layout ---------- */
@media (max-width: 768px) {
    .wc-block-cart-items__header {
        display: none !important;
    }

    .wc-block-cart-items__row {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px 0 !important;
    }

    .wc-block-cart-items__row td {
        padding: 0 !important;
    }

    .wc-block-cart-item__image {
        width: 80px !important;
    }

    .wc-block-cart-item__image img {
        width: 80px !important;
        height: 80px !important;
    }

    .wc-block-cart-item__product {
        flex: 1;
        min-width: 0;
    }

    .wc-block-cart-item__total {
        width: auto;
        text-align: right;
    }

    .wc-block-cart-item__product .wc-block-components-product-name {
        font-size: 1rem;
    }

    /* Cart totals section on mobile */
    .wc-block-cart__totals-title {
        font-size: 1.3rem !important;
    }
}

/* ---------- Cart: hide shipping (only calculated at checkout) ---------- */
.wc-block-cart .wc-block-components-totals-shipping,
.wc-block-cart .wc-block-components-shipping-rates-control,
.wc-block-cart .wc-block-components-totals-item--shipping {
    display: none !important;
}

/* Hide "Estimated total" in cart - it includes shipping which isn't chosen yet.
   Subtotal is sufficient; real total is shown at checkout. */
.wc-block-cart .wc-block-components-totals-footer-item {
    display: none !important;
}

/* ---------- Cart totals sidebar - cleaner ---------- */
.wc-block-components-sidebar .wc-block-cart__totals-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--glass-border);
}

/* ---------- Checkout: hide removed fields with CSS (fallback) ---------- */
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="last-name"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="last_name"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="company"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="address_2"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="state"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="postcode"]),
.wc-block-components-address-form .wc-block-components-combobox:has(input[id*="state"]),
.wc-block-components-address-form .wc-block-components-combobox:has(select[id*="state"]),
.wc-block-components-address-form__address_2-toggle {
    display: none !important;
}

/* Also hide Област and Поштенски број selects */
.wc-block-components-address-form .wc-blocks-components-select__container:has(select[id*="state"]) {
    display: none !important;
}

/* Since we removed last_name, first_name should span full width */
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="first-name"]),
.wc-block-components-address-form .wc-block-components-text-input:has(input[id*="first_name"]) {
    grid-column: 1 / -1 !important;
}

/* ---------- Checkout: Delivery method cards ---------- */
.wc-block-checkout__shipping-method {
    margin-bottom: 8px;
}

.wc-block-checkout__shipping-method .wc-block-components-radio-control,
.wc-block-checkout__shipping-method .wc-block-components-shipping-rates-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Style Ship / Pickup as selectable cards */
.wc-block-checkout__shipping-method .wc-block-components-radio-control__option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-primary);
    position: relative;
}

.wc-block-checkout__shipping-method .wc-block-components-radio-control__option:hover {
    border-color: rgba(193, 123, 93, 0.3);
    background: rgba(193, 123, 93, 0.02);
}

.wc-block-checkout__shipping-method .wc-block-components-radio-control__option--checked,
.wc-block-checkout__shipping-method .wc-block-components-radio-control__option[class*="checked"] {
    border-color: var(--color-primary);
    background: rgba(193, 123, 93, 0.04);
}

.wc-block-checkout__shipping-method .wc-block-components-radio-control__input {
    accent-color: var(--color-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wc-block-checkout__shipping-method .wc-block-components-radio-control__label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.wc-block-checkout__shipping-method svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ---------- Shipping options: fix spacing ---------- */
.wc-block-components-shipping-rates-control__package {
    padding: 0;
}

.wc-block-components-radio-control__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.wc-block-components-radio-control__option:hover {
    border-color: rgba(193, 123, 93, 0.3);
}

/* Fix: add space between method name and price */
.wc-block-components-radio-control__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    flex: 1;
}

.wc-block-components-radio-control__secondary-label {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.wc-block-components-radio-control__description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Shipping rate price - ensure spacing */
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__label .wc-block-formatted-money-amount,
.wc-block-components-radio-control__label .wc-block-formatted-money-amount {
    margin-left: 6px;
    font-weight: 600;
}

/* ---------- Payment options: card style ---------- */
.wc-block-checkout__payment-method .wc-block-components-radio-control__option {
    padding: 16px 20px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__option:hover {
    border-color: rgba(193, 123, 93, 0.3);
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__option--checked {
    border-color: var(--color-primary);
    background: rgba(193, 123, 93, 0.03);
}

/* ---------- Checkout form inputs - additional overrides ---------- */
/* (Main label/input rules defined in Checkout section above) */

/* ---------- Checkout: section headings ---------- */
.wc-block-components-checkout-step__heading .wc-block-components-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Clean step dividers */
.wc-block-components-checkout-step {
    padding: 28px 0;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    background: transparent;
}

.wc-block-components-checkout-step:last-child {
    border-bottom: none;
}

/* ---------- Order summary sidebar: cleanup ---------- */
.wc-block-components-order-summary {
    border: none;
    padding: 0;
}

.wc-block-components-order-summary .wc-block-components-panel__button {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    padding: 0 0 12px;
}

/* Order summary items - clean layout */
.wc-block-components-order-summary-item {
    display: grid !important;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.wc-block-components-order-summary-item:last-child {
    border-bottom: none;
}

.wc-block-components-order-summary-item__image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.wc-block-components-order-summary-item__image img {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
}

/* Product name in summary */
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    line-height: 1.3;
}

/* Hide cluttered individual prices in order summary */
.wc-block-components-order-summary-item__individual-prices {
    display: none;
}

/* Keep only the total price */
.wc-block-components-order-summary-item__total-price .price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Hide sale badge in order summary (too noisy) */
.wc-block-components-order-summary-item .wc-block-components-sale-badge {
    display: none;
}

/* Quantity badge on image */
.wc-block-components-order-summary-item__quantity {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Totals in sidebar */
.wc-block-components-totals-item__label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.wc-block-components-totals-item__value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ---------- Checkout actions row ---------- */
.wc-block-checkout__actions_row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

/* Place Order button */
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
    flex: 1;
}

/* ---------- "Use same address for billing" - cleaner ---------- */
.wc-block-checkout__use-address-for-billing {
    margin-top: 8px;
}

.wc-block-checkout__use-address-for-billing .wc-block-components-checkbox {
    padding: 12px 16px;
    background: rgba(193, 123, 93, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* ---------- Checkout: mobile responsive ---------- */
@media (max-width: 1024px) {
    /* Stack sidebar below main content */
    .wc-block-components-sidebar-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Sticky sidebar becomes normal */
    .wc-block-checkout__sidebar {
        position: static;
        border-top: 2px solid var(--glass-border);
        padding-top: 24px;
    }
}

@media (max-width: 768px) {
    /* Tighter checkout spacing */
    .wc-block-components-checkout-step {
        padding: 20px 0;
    }

    .wc-block-components-checkout-step__heading .wc-block-components-title {
        font-size: 1.1rem;
    }

    /* Full width inputs */
    .wc-block-components-address-form {
        grid-template-columns: 1fr !important;
    }

    /* Smaller order summary images */
    .wc-block-components-order-summary-item {
        grid-template-columns: 48px 1fr auto;
        gap: 8px;
    }

    .wc-block-components-order-summary-item__image,
    .wc-block-components-order-summary-item__image img {
        width: 48px !important;
        height: 48px !important;
    }

    /* Checkout actions - stack on mobile */
    .wc-block-checkout__actions_row {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .wc-block-checkout__actions_row .wc-block-components-checkout-return-to-cart-button {
        width: 100% !important;
        justify-content: center;
    }

    /* Delivery method cards - tighter */
    .wc-block-checkout__shipping-method .wc-block-components-radio-control__option {
        padding: 14px 16px;
    }

    /* Totals - smaller text */
    .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
        font-size: 1.15rem;
    }

    /* Empty cart */
    .wc-block-cart__empty-state {
        padding: 40px 16px 60px;
    }

    .wc-block-cart__empty-state::before {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    /* Cart item - even tighter */
    .wc-block-cart-item__image {
        width: 70px !important;
    }
    .wc-block-cart-item__image img {
        width: 70px !important;
        height: 70px !important;
    }

    .wc-block-cart-item__product .wc-block-components-product-name {
        font-size: 0.95rem;
    }

    /* Coupon - stack vertically on very small screens */
    .wc-block-components-totals-coupon__form {
        flex-direction: column !important;
    }

    .wc-block-components-totals-coupon__form .wc-block-components-button {
        width: 100% !important;
    }

    /* Quantity selector smaller */
    .wc-block-components-quantity-selector__input {
        width: 40px;
        padding: 6px 2px;
    }

    .wc-block-components-quantity-selector__button {
        padding: 6px 10px;
    }
}

/* ---------- Checkout page heading ---------- */
.woocommerce-checkout .wp-block-woocommerce-checkout > .wc-block-checkout__form,
.woocommerce-cart .wp-block-woocommerce-cart {
    max-width: 100%;
}

/* Page titles (Cart / Checkout) */
.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-cart .wp-block-post-title,
.woocommerce-checkout .wp-block-post-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .woocommerce-cart .entry-title,
    .woocommerce-checkout .entry-title,
    .woocommerce-cart .wp-block-post-title,
    .woocommerce-checkout .wp-block-post-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
}

/* ---------- Hide "Use same address for billing" - simplify ---------- */
/* Only show if there's actually a different billing address needed */
.wc-block-checkout__use-address-for-billing {
    margin: 12px 0 4px;
}

/* ---------- Fix: WC blocks loading state ---------- */
.wc-block-components-loading-mask {
    position: relative;
}

.wc-block-components-loading-mask::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--bg-primary-rgb, 245, 241, 234), 0.6);
    z-index: 10;
    backdrop-filter: blur(2px);
    border-radius: var(--radius-md);
}

.wc-block-components-loading-mask .wc-block-components-spinner {
    z-index: 11;
}

/* ---------- Guest checkout notice ---------- */
.wc-block-checkout__guest-checkout {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- Checkout sidebar: clean "Order summary" toggle ---------- */
.wc-block-checkout__sidebar .wc-block-components-panel__button {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    padding: 0 0 16px;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 16px;
}

/* Sidebar total price in header */
.wc-block-components-order-summary .wc-block-components-panel__button .wc-block-formatted-money-amount {
    font-weight: 600;
    color: var(--color-primary);
}

/* ---------- Cart page: "New in store" products below empty cart ---------- */
.wc-block-grid.has-3-columns .wc-block-grid__products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---------- Pickup location styling ---------- */
.wc-block-checkout__pickup-options,
.wc-block-components-local-pickup-select {
    margin-top: 12px;
}

.wc-block-checkout__pickup-options .wc-block-components-radio-control__option,
.wc-block-components-local-pickup-select .wc-block-components-radio-control__option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-primary);
    margin-bottom: 8px;
}

.wc-block-checkout__pickup-options .wc-block-components-radio-control__option:hover,
.wc-block-components-local-pickup-select .wc-block-components-radio-control__option:hover {
    border-color: rgba(193, 123, 93, 0.3);
    background: rgba(193, 123, 93, 0.02);
}

.wc-block-checkout__pickup-options .wc-block-components-radio-control__option--checked,
.wc-block-components-local-pickup-select .wc-block-components-radio-control__option--checked {
    border-color: var(--color-primary);
    background: rgba(193, 123, 93, 0.04);
}

/* Radio buttons in shipping/pickup */
.wc-block-components-radio-control__input {
    -webkit-appearance: none;
    appearance: none;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.wc-block-components-radio-control__input:checked {
    border-color: var(--color-primary);
    background: var(--bg-primary);
}

.wc-block-components-radio-control__input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
}

.wc-block-components-radio-control__input:hover {
    border-color: rgba(193, 123, 93, 0.5);
}

/* Pickup location details */
.wc-block-components-local-pickup-select__description,
.wc-block-components-radio-control__description {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* Shipping method toggle (Ship / Pickup tabs) */
.wc-block-checkout__shipping-method-container {
    margin-bottom: 20px;
}

.wc-block-checkout__shipping-method-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    font-weight: 500;
    color: var(--text-secondary);
}

.wc-block-checkout__shipping-method-option:hover {
    border-color: rgba(193, 123, 93, 0.3);
}

.wc-block-checkout__shipping-method-option--selected,
.wc-block-checkout__shipping-method-option[aria-checked="true"] {
    border-color: var(--color-primary);
    background: rgba(193, 123, 93, 0.04);
    color: var(--text-primary);
}

.wc-block-checkout__shipping-method-option svg {
    color: var(--color-primary);
}
