/* ============================================
   AMMOURI PARFUM - WOOCOMMERCE CUSTOM STYLES
   ============================================ */

/* ============================================
   GENERAL WOOCOMMERCE
   ============================================ */

.woocommerce {
    font-family: var(--font-body);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: var(--space-xl);
}

body.post-type-archive-product .woocommerce .woocommerce-result-count,
body.post-type-archive-product .woocommerce .woocommerce-ordering {
    margin-bottom: var(--space-sm);
}

.woocommerce .woocommerce-ordering select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: var(--text-primary);
    background: var(--bg-white);
    border-radius: 0;
    cursor: pointer;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.ammouri-breadcrumbs {
    background: var(--bg-cream-light);
    padding-top: 20px;
    padding-bottom: 20px;
    margin: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

body.post-type-archive-product .ammouri-breadcrumbs {
    padding-top: 8px;
    padding-bottom: 8px;
}

.ammouri-breadcrumbs .container {
    padding-top: 0;
    padding-bottom: 0;
}

.ammouri-breadcrumbs .breadcrumb-item {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.ammouri-breadcrumbs .breadcrumb-item a {
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.ammouri-breadcrumbs .breadcrumb-item a:hover {
    color: var(--color-secondary);
}

.breadcrumb-sep {
    margin: 0 0.5rem;
    font-size: 0.6rem;
    color: var(--text-light);
}

/* ============================================
   SHOP PAGE
   ============================================ */

.woocommerce-page .ammouri-main {
    padding-top: var(--header-height);
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

body.post-type-archive-product .woocommerce ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    float: none;
    width: 100% !important;
    margin: 0 !important;
    padding: 0;
}

body.post-type-archive-product .woocommerce ul.products li.product {
    min-width: 0;
}

body.post-type-archive-product .woocommerce ul.products li.product .product-card-info,
body.post-type-archive-product .woocommerce ul.products li.product .product-card-buttons {
    min-width: 0;
}

body.post-type-archive-product .woocommerce ul.products li.product .product-card-buttons .btn-add-to-cart,
body.post-type-archive-product .woocommerce ul.products li.product .product-card-buttons .btn-buy-now {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 992px) {
    body.post-type-archive-product .shop-layout,
    body.post-type-archive-product .shop-main {
        min-width: 0;
    }

    body.post-type-archive-product .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1rem;
        width: 100%;
    }
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
}

.woocommerce ul.products li.product:hover .woocommerce-LoopProduct-link {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-5px);
}

.woocommerce ul.products li.product img {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: transform var(--transition-slow), opacity 0.4s ease;
}

.woocommerce ul.products li.product:hover img:only-child {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md) 0;
    text-align: center;
}

.woocommerce ul.products li.product .price {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: var(--fw-light);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.woocommerce ul.products li.product .price del {
    color: var(--text-light);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    margin-right: 6px;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: #c0392b;
    font-weight: var(--fw-regular);
}

/* Shop Buttons */
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button {
    font-family: var(--font-body);
    font-size: var(--fs-xs) !important;
    font-weight: var(--fw-semibold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--bg-black) !important;
    color: var(--text-white) !important;
    border: 2px solid var(--bg-black) !important;
    border-radius: 0 !important;
    padding: 0.75rem 1.5rem !important;
    transition: all var(--transition-smooth) !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: var(--bg-black) !important;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: var(--bg-black) !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background: var(--bg-black) !important;
    border-color: var(--bg-black) !important;
    color: var(--text-white) !important;
}

/* Sale Badge */
.woocommerce span.onsale {
    background: #c0392b;
    color: var(--text-white);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    min-width: auto;
    min-height: auto;
    line-height: 1.4;
    top: var(--space-md);
    left: var(--space-md);
    right: auto;
}

/* Star Ratings */
.woocommerce .star-rating {
    color: var(--color-secondary);
    font-size: 0.75rem;
}

/* ============================================
   SINGLE PRODUCT PAGE � LAYOUT FIXES
   ============================================ */

/* Override the inline var(--space-xl) padding on the product container */
body.single-product .ammouri-page-wrapper>.container {
    padding-top: 30px !important;
    padding-bottom: 4rem !important;
}

/* Prevent grid columns from overflowing */
.ammouri-product-gallery,
.ammouri-product-summary {
    min-width: 0;
}

/* ============================================
   SINGLE PRODUCT: ADD-TO-CART BUTTON STATES
   ============================================ */

/* Hide default WooCommerce success message on single product */
body.single-product .woocommerce-message {
    display: none !important;
}

/* Hide lightbox/zoom trigger icon */
.woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Loading state */
.ammouri-product-summary .single_add_to_cart_button.ammouri-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Added / View Cart state */
.ammouri-product-summary .single_add_to_cart_button.ammouri-added {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--bg-black);
}

.ammouri-product-summary .single_add_to_cart_button.ammouri-added:hover {
    background: var(--bg-black);
    border-color: var(--bg-black);
    color: var(--text-white);
}

.ammouri-product-summary .single_add_to_cart_button i {
    margin-right: 6px;
}

/* Keep action buttons perfectly aligned on one row */
body.single-product .ammouri-product-summary form.cart .single_add_to_cart_button,
body.single-product .ammouri-product-summary form.cart .ammouri-buy-now-button {
    width: 100%;
    min-height: 52px;
    margin: 0 !important;
    box-sizing: border-box;
    align-self: stretch;
    float: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

/* Buy now companion button on single-product page */
body.single-product .ammouri-product-summary .ammouri-buy-now-button {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--bg-black) !important;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body.single-product .ammouri-product-summary .ammouri-buy-now-button .ammouri-buy-now-text {
    display: inline-block;
    text-align: center;
    line-height: 1.05;
}

body.single-product .ammouri-product-summary .ammouri-buy-now-button:hover {
    color: var(--bg-black) !important;
}

body.single-product .ammouri-product-summary .ammouri-buy-now-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(201, 164, 74, 0.95) 0%, var(--color-secondary) 55%, rgba(237, 214, 156, 0.92) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.35s ease;
    opacity: 0.88;
    will-change: transform;
    z-index: -1;
}

body.single-product .ammouri-product-summary .ammouri-buy-now-button:hover::before {
    transform: scaleX(1);
    opacity: 1;
}

body.single-product .ammouri-product-summary .ammouri-buy-now-button:disabled,
body.single-product .ammouri-product-summary .ammouri-buy-now-button.disabled,
body.single-product .ammouri-product-summary .ammouri-buy-now-button.wc-variation-selection-needed {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ============================================
   CART PAGE: PREMIUM LAYOUT
   ============================================ */

/* Two-column grid: items left, totals right */
.woocommerce-cart .woocommerce {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Left column — cart table + coupon + cross-sells */
.woocommerce-cart .woocommerce>form,
.woocommerce-cart .woocommerce>.cross-sells {
    grid-column: 1;
}

/* Right column — totals box */
.woocommerce-cart .cart-collaterals {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 100px;
}

.woocommerce-cart .cart_totals {
    background: #f7f8fa;
    padding: 32px 28px;
    border-radius: var(--radius-md);
}

.woocommerce-cart .cart_totals h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.woocommerce-cart .cart_totals table {
    width: 100%;
    border: none;
}

.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td {
    padding: 12px 0;
    border: none;
    font-size: var(--fs-base);
    vertical-align: top;
}

.woocommerce-cart .cart_totals table th {
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    text-align: left;
    width: 40%;
}

.woocommerce-cart .cart_totals table td {
    text-align: right;
    font-weight: var(--fw-semibold);
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* Checkout button */
.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
    margin-top: var(--space-lg);
}

.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px 24px !important;
    font-size: var(--fs-sm) !important;
    font-weight: var(--fw-semibold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   CART TABLE STYLING
   ============================================ */

.woocommerce-cart table.shop_table {
    border: none;
    border-collapse: collapse;
    width: 100%;
}

.woocommerce-cart table.shop_table thead {
    border-bottom: 2px solid var(--border-light);
}

.woocommerce-cart table.shop_table thead th {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 12px 16px;
    border: none;
    background: transparent;
}

.woocommerce-cart table.shop_table td {
    padding: 20px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: var(--fs-base);
}

/* Product thumbnail */
.woocommerce-cart table.shop_table .product-thumbnail {
    width: 90px;
    padding-right: 0;
}

.woocommerce-cart table.shop_table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid #f0f0f0;
}

/* Product name */
.woocommerce-cart table.shop_table .product-name {
    font-family: var(--font-heading);
    font-weight: var(--fw-medium);
    font-size: var(--fs-base);
}

.woocommerce-cart table.shop_table .product-name a {
    color: var(--text-primary);
}

.woocommerce-cart table.shop_table .product-name a:hover {
    color: var(--color-secondary);
}

/* Product price */
.woocommerce-cart table.shop_table .product-price,
.woocommerce-cart table.shop_table .product-subtotal {
    font-weight: var(--fw-semibold);
}

/* Remove button */
.woocommerce-cart table.shop_table .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: #f5f5f5;
    color: var(--text-secondary) !important;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.woocommerce-cart table.shop_table .product-remove a.remove:hover {
    background: #c0392b;
    color: #fff !important;
}

/* ============================================
   QUANTITY +/– BUTTONS (MODERN STYLE)
   ============================================ */

.ammouri-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ammouri-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 40px;
    background: #fafafa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    transition: background 0.2s ease;
    padding: 0;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

.ammouri-qty-btn:hover {
    background: #f0f0f0;
}

.ammouri-qty-wrap input.qty {
    width: 48px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    font-family: var(--font-body);
    -moz-appearance: textfield;
    background: #fff;
    margin: 0;
    padding: 0;
}

.ammouri-qty-wrap input.qty::-webkit-inner-spin-button,
.ammouri-qty-wrap input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================
   CART COUPON SECTION
   ============================================ */

.woocommerce-cart .coupon {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: var(--space-md);
}

.woocommerce-cart .coupon label {
    display: none;
}

.woocommerce-cart .coupon #coupon_code {
    flex: 1;
    max-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
}

.woocommerce-cart .coupon #coupon_code:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.woocommerce-cart .coupon .button {
    padding: 10px 20px !important;
    font-size: var(--fs-xs) !important;
}

/* Update cart button */
.woocommerce-cart button[name="update_cart"] {
    float: right;
    margin-top: var(--space-md);
}

/* Actions row */
.woocommerce-cart .actions {
    padding: var(--space-md) 0 !important;
    border: none !important;
}

/* ============================================
   CART CROSS-SELLS
   ============================================ */

.woocommerce-cart .cross-sells {
    margin-top: var(--space-2xl);
}

.woocommerce-cart .cross-sells h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-medium);
    letter-spacing: 0.5px;
    margin-bottom: var(--space-lg);
}

.woocommerce-cart .cross-sells ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* ============================================
   CART EMPTY STATE
   ============================================ */

.woocommerce-cart .cart-empty {
    text-align: center;
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    color: var(--text-secondary);
    padding: var(--space-4xl) 0;
    grid-column: 1 / -1;
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    grid-column: 1 / -1;
    margin-bottom: var(--space-2xl);
}

/* ============================================
   CART PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .woocommerce-cart .woocommerce {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .woocommerce-cart .cart-collaterals {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }
}

@media (max-width: 768px) {

    /* Make cart table scrollable */
    .woocommerce-cart table.shop_table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .woocommerce-cart .cart_totals {
        padding: 24px 20px;
    }

    .woocommerce-cart .coupon {
        flex-wrap: wrap;
    }

    .woocommerce-cart .coupon #coupon_code {
        max-width: 100%;
        width: 100%;
    }

    .woocommerce-cart .cross-sells ul.products {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 575px) {
    .woocommerce-cart table.shop_table .product-thumbnail {
        width: 60px;
    }

    .woocommerce-cart table.shop_table .product-thumbnail img {
        width: 56px;
        height: 56px;
    }

    .woocommerce-cart table.shop_table td {
        padding: 12px 8px;
        font-size: var(--fs-sm);
    }

    .woocommerce-cart table.shop_table thead th {
        padding: 8px;
        font-size: 10px;
    }
}

/* ============================================
   CART & WISHLIST PAGE HEADERS — REFINED SPACING
   ============================================ */

/* Reduce excessive hero/title padding on Cart pages */
.woocommerce-cart .page-header {
    padding: var(--space-xl) 0 var(--space-lg) !important;
}

/* Reduce excessive hero/title padding on Wishlist pages */
.woocommerce-wishlist .page-header {
    padding: var(--space-xl) 0 var(--space-lg) !important;
}

/* Also handle hero images when present */
.woocommerce-cart .page-hero,
.woocommerce-wishlist .page-hero {
    height: 240px !important;
}

/* Reduce top padding of wrapper for these pages to bring content closer */
.woocommerce-cart .ammouri-page-wrapper,
.woocommerce-wishlist .ammouri-page-wrapper {
    padding-top: 0 !important;
}

/* Reduce content padding to bring sections together */
.woocommerce-cart .page-content {
    padding: var(--space-2xl) 0 !important;
}

.woocommerce-wishlist .page-content {
    padding: var(--space-lg) 0 var(--space-2xl) !important;
}

/* Wishlist page title block inside the YITH form */
.woocommerce-wishlist .wishlist-title-container {
    margin: 0 0 18px;
    text-align: center;
}

.woocommerce-wishlist .wishlist-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-wishlist .wishlist-title h2 {
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    max-width: 34ch;
    font-size: clamp(1.02rem, 0.7vw + 0.85rem, 1.3rem);
    font-weight: var(--fw-semibold);
    letter-spacing: 2.1px;
    text-transform: uppercase;
    line-height: 1.2;
    text-wrap: balance;
    color: var(--text-primary);
}

.woocommerce-wishlist .wishlist-title a.show-title-form {
    display: none;
}

/* Wishlist table as a refined two-column card list */
.woocommerce-wishlist table.wishlist_table,
.woocommerce-wishlist .wishlist_table.shop_table {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 18px;
}

.woocommerce-wishlist table.wishlist_table thead,
.woocommerce-wishlist .wishlist_table thead {
    display: none !important;
}

.woocommerce-wishlist table.wishlist_table tbody,
.woocommerce-wishlist .wishlist_table tbody {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 0 !important;
}

.woocommerce-wishlist table.wishlist_table tbody tr.yith-wcwl-row,
.woocommerce-wishlist .wishlist_table tbody tr {
    display: grid !important;
    grid-template-columns: minmax(160px, 190px) minmax(0, 1fr);
    grid-template-areas:
        "thumb name"
        "thumb notes"
        "thumb actions";
    align-items: center;
    row-gap: 4px;
    position: relative;
    margin: 0;
    padding: 18px 20px 16px 16px !important;
    background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
    border: 1px solid rgba(185, 154, 79, 0.55);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(46, 34, 12, 0.08);
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.woocommerce-wishlist table.wishlist_table tbody tr.yith-wcwl-row:hover,
.woocommerce-wishlist .wishlist_table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(46, 34, 12, 0.12);
}

.woocommerce-wishlist table.wishlist_table td,
.woocommerce-wishlist .wishlist_table td {
    display: block !important;
    border: 0 !important;
    padding: 0 !important;
}

.woocommerce-wishlist table.wishlist_table td.product-thumbnail,
.woocommerce-wishlist .wishlist_table td.product-thumbnail {
    grid-area: thumb;
    position: relative;
    padding: 0 !important;
}

.woocommerce-wishlist table.wishlist_table td.product-thumbnail a,
.woocommerce-wishlist .wishlist_table td.product-thumbnail a {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none !important;
    min-height: 176px;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(184, 160, 91, 0.34);
    border-radius: 14px;
    overflow: hidden;
}

.woocommerce-wishlist table.wishlist_table td.product-thumbnail img,
.woocommerce-wishlist .wishlist_table td.product-thumbnail img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 176px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

.woocommerce-wishlist .ammouri-wishlist-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    background: rgba(199, 168, 91, 0.9);
    color: #23190b;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: var(--fw-bold);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Remove curated badge from wishlist cards */
.woocommerce-wishlist .ammouri-wishlist-badge {
    display: none !important;
}

.woocommerce-wishlist .ammouri-wishlist-badge i {
    font-size: 0.72rem;
}

.woocommerce-wishlist table.wishlist_table td.product-name,
.woocommerce-wishlist .wishlist_table td.product-name {
    grid-area: name;
    align-self: center;
    padding: 0 0 0 18px !important;
    background: transparent !important;
    text-align: left;
}

.woocommerce-wishlist table.wishlist_table td.product-name a,
.woocommerce-wishlist .wishlist_table td.product-name a {
    display: -webkit-box;
    max-width: 28ch;
    font-family: var(--font-heading);
    font-size: clamp(1.08rem, 0.9vw + 0.82rem, 1.42rem);
    font-weight: 600;
    line-height: 1.16;
    min-height: calc(1.16em * 2);
    letter-spacing: 0.16px;
    text-transform: uppercase;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-wrap: balance;
    color: var(--text-primary);
}

.woocommerce-wishlist .ammouri-wishlist-notes {
    grid-area: notes;
    max-width: 40ch;
    padding: 3px 0 0 18px;
    background: transparent !important;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    line-height: 1.35;
    letter-spacing: 1.35px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.woocommerce-wishlist table.wishlist_table td.product-add-to-cart,
.woocommerce-wishlist .wishlist_table td.product-add-to-cart {
    grid-area: actions;
    padding: 8px 0 0 18px !important;
    background: transparent !important;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px;
}

.woocommerce-wishlist table.wishlist_table td.product-add-to-cart .button,
.woocommerce-wishlist .wishlist_table td.product-add-to-cart .button,
.woocommerce-wishlist table.wishlist_table td.product-add-to-cart a,
.woocommerce-wishlist .wishlist_table td.product-add-to-cart a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 176px;
    padding: 12px 24px !important;
    margin: 0 !important;
    background: var(--color-secondary) !important;
    color: #2c2010 !important;
    border: 1px solid #b79b53 !important;
    border-radius: 0 !important;
    font-family: var(--font-body);
    font-size: var(--fs-xs) !important;
    font-weight: var(--fw-semibold);
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: none !important;
}

.woocommerce-wishlist table.wishlist_table td.product-add-to-cart .button:hover,
.woocommerce-wishlist .wishlist_table td.product-add-to-cart .button:hover,
.woocommerce-wishlist table.wishlist_table td.product-add-to-cart a:hover,
.woocommerce-wishlist .wishlist_table td.product-add-to-cart a:hover {
    background: #b89236 !important;
    border-color: #b89236 !important;
    color: #23190b !important;
}

.woocommerce-wishlist table.wishlist_table .product-price,
.woocommerce-wishlist .wishlist_table .product-price,
.woocommerce-wishlist table.wishlist_table .product-quantity,
.woocommerce-wishlist .wishlist_table .product-quantity,
.woocommerce-wishlist table.wishlist_table .product-stock-status,
.woocommerce-wishlist .wishlist_table .product-stock-status,
.woocommerce-wishlist table.wishlist_table .product-arrange,
.woocommerce-wishlist .wishlist_table .product-arrange,
.woocommerce-wishlist table.wishlist_table .product-checkbox,
.woocommerce-wishlist .wishlist_table .product-checkbox {
    display: none !important;
}

.woocommerce-wishlist table.wishlist_table .product-remove,
.woocommerce-wishlist .wishlist_table .product-remove {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 4;
}

.woocommerce-wishlist table.wishlist_table .product-remove a,
.woocommerce-wishlist .wishlist_table .product-remove a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: blur(4px);
    color: #7c6a46 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.woocommerce-wishlist table.wishlist_table .product-remove a:hover,
.woocommerce-wishlist .wishlist_table .product-remove a:hover {
    background: #c0392b !important;
    color: #fff !important;
}

.woocommerce-wishlist table.wishlist_table tfoot,
.woocommerce-wishlist .wishlist_table tfoot {
    display: block;
    margin-top: 20px;
}

.woocommerce-wishlist .yith_wcwl_wishlist_footer,
.woocommerce-wishlist .yith_wcwl_wishlist_footer .yith-wcwl-share,
.woocommerce-wishlist .yith-wcwl-share {
    margin-top: 0;
}

/* Remove social sharing block on wishlist page */
.woocommerce-wishlist .yith-wcwl-share,
.woocommerce-wishlist .yith_wcwl_wishlist_footer .yith-wcwl-share {
    display: none !important;
}

.woocommerce-wishlist .yith-wcwl-share {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid rgba(185, 154, 79, 0.32);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
}

.woocommerce-wishlist .yith-wcwl-share h4.yith-wcwl-share-title {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    letter-spacing: 0.4px;
    text-transform: none;
}

.woocommerce-wishlist .yith-wcwl-share ul {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-wishlist .yith-wcwl-share li.share-button a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #c7a85b;
    color: #2b2113;
    box-shadow: none;
}

.woocommerce-wishlist .yith-wcwl-share li.share-button a:hover {
    background: #b89236;
    color: #20170d;
}

.woocommerce-wishlist .yith_wcwl_wishlist_footer .yith_wcwl_footer_additional_action {
    float: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.woocommerce-wishlist .wishlist-page-links {
    clear: both;
}

/* Similar styles block below the wishlist */
.ammouri-wishlist-similar-styles {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.ammouri-wishlist-similar-header {
    margin-bottom: 18px;
}

.ammouri-wishlist-similar-header .section-title {
    margin: 0;
    font-size: clamp(1.05rem, 0.95vw + 0.85rem, 1.5rem);
    letter-spacing: 3px;
}

.ammouri-wishlist-similar-products {
    margin: 0;
}

@media (max-width: 991px) {
    .woocommerce-wishlist table.wishlist_table tbody,
    .woocommerce-wishlist .wishlist_table tbody {
        grid-template-columns: 1fr;
    }

    .woocommerce-wishlist table.wishlist_table tbody tr.yith-wcwl-row,
    .woocommerce-wishlist .wishlist_table tbody tr {
        grid-template-columns: 150px minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .woocommerce-wishlist table.wishlist_table tbody tr.yith-wcwl-row,
    .woocommerce-wishlist .wishlist_table tbody tr {
        grid-template-columns: 1fr;
        grid-template-areas:
            "thumb"
            "name"
            "notes"
            "actions";
        padding: 16px !important;
        gap: 0;
    }

    .woocommerce-wishlist table.wishlist_table td.product-thumbnail a,
    .woocommerce-wishlist .wishlist_table td.product-thumbnail a {
        min-height: 220px;
    }

    .woocommerce-wishlist table.wishlist_table td.product-name,
    .woocommerce-wishlist .wishlist_table td.product-name,
    .woocommerce-wishlist .ammouri-wishlist-notes,
    .woocommerce-wishlist table.wishlist_table td.product-add-to-cart,
    .woocommerce-wishlist .wishlist_table td.product-add-to-cart {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .woocommerce-wishlist table.wishlist_table td.product-add-to-cart,
    .woocommerce-wishlist .wishlist_table td.product-add-to-cart {
        justify-content: center;
    }

    .woocommerce-wishlist table.wishlist_table td.product-add-to-cart .button,
    .woocommerce-wishlist .wishlist_table td.product-add-to-cart .button,
    .woocommerce-wishlist table.wishlist_table td.product-add-to-cart a,
    .woocommerce-wishlist .wishlist_table td.product-add-to-cart a {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 575px) {
    .woocommerce-wishlist .wishlist-title h2 {
        letter-spacing: 2px;
        font-size: 1.1rem;
    }

    .woocommerce-wishlist .yith-wcwl-share {
        padding: 12px 14px;
    }

    .ammouri-wishlist-similar-styles {
        padding-bottom: var(--space-2xl);
    }
}


/* ============================================
   YITH WISHLIST PAGE — LUXURY GRID REDESIGN
   ============================================ */

/* ============================================
   YITH "ADD TO WISHLIST" — SINGLE PRODUCT PAGE
   ============================================ */

/* Wrap: strip default button appearance, size it as an icon button */
.yith-wcwl-add-to-wishlist {
    display: inline-flex;
    align-items: center;
}

/* The anchor / button itself */
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.add_to_wishlist,
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.single_add_to_wishlist {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-full) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: border-color var(--transition-base), background var(--transition-base) !important;
    /* Collapse inline text without affecting the inline icon */
    font-size: 0 !important;
    letter-spacing: 0 !important;
}

/* Restore icon size inside the collapsed anchor */
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a .yith-wcwl-icon,
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a i {
    font-size: 1rem !important;
    color: var(--text-primary);
    transition: color var(--transition-base), transform var(--transition-base);
    margin: 0 !important;
    line-height: 1 !important;
}

.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a:hover {
    border-color: var(--color-secondary) !important;
    background: transparent !important;
}

.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a:hover .yith-wcwl-icon,
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a:hover i {
    color: var(--color-secondary);
    transform: scale(1.15);
}

/* Added-to-wishlist state (YITH adds class 'added') */
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.added_to_wishlist {
    border-color: var(--color-secondary) !important;
    background: rgba(var(--color-secondary-rgb, 212, 175, 55), 0.08) !important;
}

.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.added_to_wishlist .yith-wcwl-icon,
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.added_to_wishlist i {
    color: var(--color-secondary);
}

/* Hide the "Browse Wishlist" and "Product Added" feedback text links */
.yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse,
.yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse {
    display: none !important;
}

/* Hide the loading spinner text YITH injects */
.yith-wcwl-add-to-wishlist .yith-wcwl-add-button>img {
    display: none !important;
}

/* ============================================
   CLASSIC CHECKOUT: MINIMAL LUXURY LAYOUT
   ============================================ */

body.woocommerce-checkout .page-header {
    padding: var(--space-xl) 0 var(--space-lg) !important;
}

body.woocommerce-checkout .page-hero {
    height: 220px !important;
}

body.woocommerce-checkout .ammouri-page-wrapper {
    padding-top: 0 !important;
}

body.woocommerce-checkout .page-content {
    padding: var(--space-xl) 0 var(--space-2xl) !important;
}

body.woocommerce-checkout .page-content>.container {
    max-width: 1140px !important;
}

body.woocommerce-checkout .woocommerce {
    color: var(--text-primary);
}

/* Keep notices clean and integrated without adding clutter. */
body.woocommerce-checkout .woocommerce-notices-wrapper .woocommerce-message,
body.woocommerce-checkout .woocommerce-notices-wrapper .woocommerce-info,
body.woocommerce-checkout .woocommerce-notices-wrapper .woocommerce-error {
    margin: 0 0 16px;
    border: 1px solid var(--border-light);
    background: #fff;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    padding: 12px 14px;
}

body.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: min-content 1fr;
    gap: 0 34px;
    align-items: start;
}

body.woocommerce-checkout form.checkout #customer_details {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    width: 100%;
}

/* Stack col-1/col-2 vertically, no float layout */
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide the empty shipping-fields wrapper (shipping address fields were removed in functions.php) */
body.woocommerce-checkout .woocommerce-shipping-fields:empty,
body.woocommerce-checkout .woocommerce-shipping-fields {
    display: none !important;
}

/* Hide "Informations complémentaires" — the section has no form fields and wastes space */
body.woocommerce-checkout .woocommerce-additional-fields {
    display: none !important;
}

body.woocommerce-checkout form.checkout #order_review_heading {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin: 0;
    padding: 22px 22px 16px;
    background: #fbf8f2;
    border: 1px solid #e6dcc9;
    border-bottom: none;
    box-sizing: border-box;
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 0.9vw + 0.9rem, 1.55rem);
    font-weight: var(--fw-semibold);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-primary);
}

body.woocommerce-checkout form.checkout #order_review {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    position: sticky;
    top: 88px;
    margin: 0;
    background: #fbf8f2;
    border: 1px solid #e6dcc9;
    border-top: 1px solid #eadfcd;
    padding: 0 22px 24px;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce-billing-fields {
    background: #fff;
    border: 1px solid #efe7d8;
    padding: 24px 28px 28px;
}

body.woocommerce-checkout .woocommerce-billing-fields>h3,
body.woocommerce-checkout .woocommerce-additional-fields>h3 {
    margin: 0 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #efe7d8;
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 0.9vw + 0.9rem, 1.55rem);
    font-weight: var(--fw-semibold);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-primary);
}

body.woocommerce-checkout .woocommerce form .form-row {
    margin: 0 0 18px;
    padding: 0;
}

body.woocommerce-checkout .woocommerce form .form-row label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: var(--fw-semibold);
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

body.woocommerce-checkout .woocommerce form .form-row input.input-text,
body.woocommerce-checkout .woocommerce form .form-row textarea,
body.woocommerce-checkout .woocommerce form .form-row select,
body.woocommerce-checkout .select2-container .select2-selection--single {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d9cfbd;
    background: #fff;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.3;
    padding: 0 12px;
    border-radius: 0;
    box-shadow: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

body.woocommerce-checkout .woocommerce form .form-row textarea {
    min-height: 120px;
    padding: 12px;
}

body.woocommerce-checkout .woocommerce form .form-row input.input-text:focus,
body.woocommerce-checkout .woocommerce form .form-row textarea:focus,
body.woocommerce-checkout .woocommerce form .form-row select:focus,
body.woocommerce-checkout .select2-container--focus .select2-selection,
body.woocommerce-checkout .select2-container--open .select2-selection {
    outline: none;
    border-color: #b89a5c;
    box-shadow: 0 0 0 1px rgba(184, 154, 92, 0.2);
}

body.woocommerce-checkout .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
}

body.woocommerce-checkout .select2-container .select2-selection__rendered {
    padding: 0 !important;
    color: var(--text-primary);
    line-height: 1.3 !important;
}

body.woocommerce-checkout .select2-container .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

/* --- Order review table --- */
body.woocommerce-checkout #order_review table.shop_table {
    border: 0;
    border-collapse: collapse;
    width: 100%;
    margin: 0 0 6px;
    background: transparent;
    table-layout: fixed;
}

/* Column widths: product name gets more space, price column stays compact */
body.woocommerce-checkout #order_review table.shop_table thead th:first-child,
body.woocommerce-checkout #order_review table.shop_table tbody td:first-child,
body.woocommerce-checkout #order_review table.shop_table tfoot th:first-child {
    width: 62%;
}

body.woocommerce-checkout #order_review table.shop_table thead th:last-child,
body.woocommerce-checkout #order_review table.shop_table tbody td:last-child,
body.woocommerce-checkout #order_review table.shop_table tfoot td:last-child {
    width: 38%;
    text-align: right;
}

body.woocommerce-checkout #order_review table.shop_table thead th {
    border: 0;
    border-bottom: 1px solid #d4c9b4;
    padding: 10px 0 12px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    vertical-align: bottom;
}

/* Product rows */
body.woocommerce-checkout #order_review table.shop_table tbody td {
    border: 0;
    border-bottom: 1px solid #efe7d8;
    padding: 14px 0;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Product name cell: prevent wrapping chaos */
body.woocommerce-checkout #order_review table.shop_table tbody td.product-name {
    padding-right: 12px;
    word-break: break-word;
}

/* Quantity multiplier: subtle styling */
body.woocommerce-checkout #order_review table.shop_table tbody td.product-name .product-quantity {
    font-weight: var(--fw-semibold);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Price column in product rows */
body.woocommerce-checkout #order_review table.shop_table tbody td.product-total {
    font-weight: var(--fw-medium);
    white-space: nowrap;
}

/* Footer rows: subtotal, shipping, total */
body.woocommerce-checkout #order_review table.shop_table tfoot th,
body.woocommerce-checkout #order_review table.shop_table tfoot td {
    border: 0;
    border-bottom: 1px solid #efe7d8;
    padding: 13px 0;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: var(--text-primary);
    vertical-align: middle;
}

body.woocommerce-checkout #order_review table.shop_table tfoot th {
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    text-align: left;
}

body.woocommerce-checkout #order_review table.shop_table tfoot td {
    font-weight: var(--fw-medium);
    text-align: right;
    white-space: nowrap;
}

/* Shipping row: keep the value tidy on one line */
body.woocommerce-checkout #order_review table.shop_table tfoot .woocommerce-shipping-totals td {
    padding-right: 0;
}

/* Total row: visually distinct */
body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th,
body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td {
    border-bottom: 0;
    border-top: 2px solid #d4c9b4;
    padding: 18px 0 4px;
    font-size: clamp(1.05rem, 0.5vw + 0.9rem, 1.25rem);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th {
    color: var(--text-primary);
}

/* Shipping method list */
body.woocommerce-checkout #order_review .woocommerce-shipping-totals ul,
body.woocommerce-checkout #order_review .woocommerce-shipping-methods {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.woocommerce-checkout #order_review .woocommerce-shipping-methods li {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.4;
}

body.woocommerce-checkout #order_review .woocommerce-shipping-methods li label {
    margin: 0;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-primary);
}

body.woocommerce-checkout #order_review .woocommerce-shipping-methods li input[type="radio"] {
    margin-right: 6px;
}

/* --- Payment section --- */
body.woocommerce-checkout #payment {
    margin-top: 20px;
    border: 1px solid #e6dcc9;
    background: #fff;
    overflow: hidden;
}

body.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #efe7d8;
    padding: 18px 22px;
    margin: 0;
    list-style: none;
}

body.woocommerce-checkout #payment ul.payment_methods li {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
}

body.woocommerce-checkout #payment ul.payment_methods li label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0;
    text-transform: none;
}

body.woocommerce-checkout #payment div.payment_box {
    margin: 12px 0 0;
    padding: 14px 18px;
    background: #f9f6ef;
    border: 1px solid #efe7d8;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    line-height: 1.65;
}

body.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #f9f6ef;
}

body.woocommerce-checkout #payment .place-order {
    padding: 18px 22px 22px;
}

body.woocommerce-checkout #payment .place-order .woocommerce-privacy-policy-text {
    margin-bottom: 16px;
    font-size: var(--fs-xs);
    line-height: 1.7;
    color: var(--text-secondary);
}

body.woocommerce-checkout #payment .place-order .woocommerce-privacy-policy-text a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.woocommerce-checkout #payment #place_order {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px !important;
    font-family: var(--font-body);
    font-size: var(--fs-sm) !important;
    font-weight: var(--fw-bold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 0 !important;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

/* Keep hidden required country field non-visible in the minimal flow. */
body.woocommerce-checkout .woocommerce form .form-row.form-row-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    body.woocommerce-checkout form.checkout {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 0 26px;
    }
}

@media (max-width: 900px) {
    body.woocommerce-checkout form.checkout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 24px;
    }

    body.woocommerce-checkout form.checkout #customer_details,
    body.woocommerce-checkout form.checkout #order_review_heading,
    body.woocommerce-checkout form.checkout #order_review {
        grid-column: 1;
        grid-row: auto;
    }

    body.woocommerce-checkout form.checkout #order_review_heading {
        padding: 18px 20px 14px;
        border-bottom: 1px solid #eadfcd;
    }

    body.woocommerce-checkout form.checkout #order_review {
        position: static;
    }
}

@media (max-width: 640px) {
    body.woocommerce-checkout .page-content {
        padding: var(--space-xl) 0 var(--space-2xl) !important;
    }

    body.woocommerce-checkout .woocommerce-billing-fields {
        padding: 20px 16px;
    }

    body.woocommerce-checkout form.checkout #order_review {
        padding: 16px;
    }

    body.woocommerce-checkout .woocommerce form .form-row label {
        font-size: 10px;
    }

    body.woocommerce-checkout .woocommerce form .form-row input.input-text,
    body.woocommerce-checkout .woocommerce form .form-row textarea,
    body.woocommerce-checkout .woocommerce form .form-row select,
    body.woocommerce-checkout .select2-container .select2-selection--single {
        min-height: 50px;
        font-size: var(--fs-sm);
    }
}

/* ============================================
   RTL CHECKOUT LAYOUT (ARABIC)
   ============================================ */

/* --- Overall grid: flip column order so form is right, summary left --- */
body.rtl.woocommerce-checkout form.checkout,
html[lang^="ar"] body.woocommerce-checkout form.checkout {
    direction: rtl;
}

/* --- Heading alignment --- */
body.rtl.woocommerce-checkout form.checkout #order_review_heading,
html[lang^="ar"] body.woocommerce-checkout form.checkout #order_review_heading {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

body.rtl.woocommerce-checkout .woocommerce-billing-fields > h3,
html[lang^="ar"] body.woocommerce-checkout .woocommerce-billing-fields > h3 {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

/* --- Form labels RTL --- */
body.rtl.woocommerce-checkout .woocommerce form .form-row label,
html[lang^="ar"] body.woocommerce-checkout .woocommerce form .form-row label {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    letter-spacing: 0.3px;
}

/* --- Form inputs RTL --- */
body.rtl.woocommerce-checkout .woocommerce form .form-row input.input-text,
body.rtl.woocommerce-checkout .woocommerce form .form-row textarea,
body.rtl.woocommerce-checkout .woocommerce form .form-row select,
html[lang^="ar"] body.woocommerce-checkout .woocommerce form .form-row input.input-text,
html[lang^="ar"] body.woocommerce-checkout .woocommerce form .form-row textarea,
html[lang^="ar"] body.woocommerce-checkout .woocommerce form .form-row select {
    text-align: right;
    direction: rtl;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

/* --- Order review table: flip column alignment --- */
body.rtl.woocommerce-checkout #order_review table.shop_table thead th:first-child,
body.rtl.woocommerce-checkout #order_review table.shop_table tbody td:first-child,
body.rtl.woocommerce-checkout #order_review table.shop_table tfoot th:first-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table thead th:first-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tbody td:first-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot th:first-child {
    text-align: right;
}

body.rtl.woocommerce-checkout #order_review table.shop_table thead th:last-child,
body.rtl.woocommerce-checkout #order_review table.shop_table tbody td:last-child,
body.rtl.woocommerce-checkout #order_review table.shop_table tfoot td:last-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table thead th:last-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tbody td:last-child,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot td:last-child {
    text-align: left;
}

/* Table header: Arabic font */
body.rtl.woocommerce-checkout #order_review table.shop_table thead th,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table thead th {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    letter-spacing: 0.3px;
}

/* Product name cells: Arabic font + right alignment */
body.rtl.woocommerce-checkout #order_review table.shop_table tbody td.product-name,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tbody td.product-name {
    text-align: right;
    padding-right: 0;
    padding-left: 12px;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

/* Product total cells: left-align for RTL */
body.rtl.woocommerce-checkout #order_review table.shop_table tbody td.product-total,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tbody td.product-total {
    text-align: left;
}

/* Footer rows: label right, value left */
body.rtl.woocommerce-checkout #order_review table.shop_table tfoot th,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot th {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

body.rtl.woocommerce-checkout #order_review table.shop_table tfoot td,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot td {
    text-align: left;
}

/* Total row: ensure proper separation */
body.rtl.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th,
body.rtl.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total th,
html[lang^="ar"] body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total td {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

/* Shipping method labels: Arabic font + right-align */
body.rtl.woocommerce-checkout #order_review .woocommerce-shipping-methods li label,
html[lang^="ar"] body.woocommerce-checkout #order_review .woocommerce-shipping-methods li label {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    text-align: right;
}

body.rtl.woocommerce-checkout #order_review .woocommerce-shipping-methods li input[type="radio"],
html[lang^="ar"] body.woocommerce-checkout #order_review .woocommerce-shipping-methods li input[type="radio"] {
    margin-right: 0;
    margin-left: 6px;
}

/* --- Payment section RTL --- */
body.rtl.woocommerce-checkout #payment ul.payment_methods,
html[lang^="ar"] body.woocommerce-checkout #payment ul.payment_methods {
    text-align: right;
}

body.rtl.woocommerce-checkout #payment ul.payment_methods li,
body.rtl.woocommerce-checkout #payment ul.payment_methods li label,
html[lang^="ar"] body.woocommerce-checkout #payment ul.payment_methods li,
html[lang^="ar"] body.woocommerce-checkout #payment ul.payment_methods li label {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    text-align: right;
}

body.rtl.woocommerce-checkout #payment div.payment_box,
html[lang^="ar"] body.woocommerce-checkout #payment div.payment_box {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
}

/* Privacy text RTL */
body.rtl.woocommerce-checkout #payment .place-order .woocommerce-privacy-policy-text,
html[lang^="ar"] body.woocommerce-checkout #payment .place-order .woocommerce-privacy-policy-text {
    text-align: right;
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    line-height: 1.85;
}

/* COMMANDER / confirm button: full-width + Arabic font */
body.rtl.woocommerce-checkout #payment #place_order,
html[lang^="ar"] body.woocommerce-checkout #payment #place_order {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif !important;
    letter-spacing: 0.5px;
}

/* ============================================
   WOOCOMMERCE ARABIC TYPOGRAPHY (AR ONLY)
   ============================================ */

html[lang^="ar"] .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.rtl .woocommerce ul.products li.product .woocommerce-loop-product__title,
html[lang^="ar"] .woocommerce ul.products li.product .price,
body.rtl .woocommerce ul.products li.product .price,
html[lang^="ar"] .woocommerce ul.products li.product .price .woocommerce-Price-amount,
body.rtl .woocommerce ul.products li.product .price .woocommerce-Price-amount,
html[lang^="ar"] .woocommerce ul.products li.product .button,
body.rtl .woocommerce ul.products li.product .button,
html[lang^="ar"] .woocommerce a.button,
body.rtl .woocommerce a.button,
html[lang^="ar"] .woocommerce button.button,
body.rtl .woocommerce button.button {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif !important;
}

html[lang^="ar"] .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.rtl .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: calc(var(--fs-md) * 1.08);
    line-height: 1.45;
    letter-spacing: 0.2px;
}

html[lang^="ar"] .woocommerce ul.products li.product .price,
body.rtl .woocommerce ul.products li.product .price,
html[lang^="ar"] .woocommerce ul.products li.product .price .woocommerce-Price-amount,
body.rtl .woocommerce ul.products li.product .price .woocommerce-Price-amount {
    font-size: calc(var(--fs-base) * 1.1);
    font-weight: var(--fw-medium);
}

html[lang^="ar"] .woocommerce ul.products li.product .button,
body.rtl .woocommerce ul.products li.product .button,
html[lang^="ar"] .woocommerce a.button,
body.rtl .woocommerce a.button,
html[lang^="ar"] .woocommerce button.button,
body.rtl .woocommerce button.button {
    font-size: calc(var(--fs-xs) * 1.12) !important;
    letter-spacing: 0.25px;
}