/* ============================================
   Thịnh Theme - Single Product Customization
   ============================================ */

/* 0. BREADCRUMB */
.woocommerce-breadcrumb,
.shop-page-title .breadcrumbs {
    font-size: 0.75rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: #666666 !important;
    padding: 20px 0 !important;
    font-weight: 400 !important;
}

.woocommerce-breadcrumb a,
.shop-page-title .breadcrumbs a {
    color: #666666 !important;
}

.woocommerce-breadcrumb a:hover,
.shop-page-title .breadcrumbs a:hover {
    color: #1A1A1A !important;
}

.woocommerce-breadcrumb .separator {
    margin: 0 8px;
    color: #cccccc !important;
}

.woocommerce-breadcrumb {
    display: block !important;
}

/* 1. PRODUCT TITLE */
.product-info .product-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
    font-weight: 400 !important;
    color: #1A1A1A !important;
    margin-bottom: 12px !important;
    text-transform: none !important;
}

/* 2. PRICE */
.product-info .price-wrapper .price,
.product-page-price .price,
.product-info>.price,
.woocommerce-variation-price .price {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #DC2626 !important;
    margin-bottom: 24px !important;
    position: relative !important;
    padding-bottom: 24px !important;
    display: inline-block;
}

.product-info .price-wrapper .price span.amount,
.product-info .price-wrapper .price ins span.amount,
.product-page-price .price span.amount,
.product-info>.price span.amount,
.woocommerce-variation-price .price span.amount {
    color: #DC2626 !important;
    font-weight: 600 !important;
}

.product-info .price-wrapper .price del,
.product-info .price-wrapper .price del span.amount,
.product-page-price .price del,
.product-page-price .price del span.amount,
.woocommerce-variation-price .price del,
.woocommerce-variation-price .price del span.amount {
    color: #94A3B8 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.product-info .price-wrapper .price::after,
.product-page-price .price::after,
.product-info>.price::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: #D4B86A;
    /* Gold color */
}

/* Fix ký hiệu tiền tệ bị cong lên trên */
.woocommerce-Price-amount .woocommerce-Price-currencySymbol {
    vertical-align: baseline !important;
    font-size: 1em !important;
    margin-left: 2px !important;
}

/* 3. SHORT DESCRIPTION (FEATURES) */
.product-short-description,
.woocommerce-product-details__short-description {
    color: #888888 !important;
    font-size: 0.8rem !important;
    font-weight: 300 !important;
    line-height: 2 !important;
    margin-bottom: 30px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.product-short-description p,
.woocommerce-product-details__short-description p {
    font-weight: 300 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 20px !important;
    color: #888888 !important;
}

.product-short-description ul,
.woocommerce-product-details__short-description ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-top: 20px !important;
}

.product-short-description ul li,
.woocommerce-product-details__short-description ul li {
    position: relative !important;
    padding-left: 16px !important;
    font-size: 0.75rem !important;
    color: #888888 !important;
    margin-bottom: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-weight: 300 !important;
    list-style-type: none !important;
}

.product-short-description ul li::before,
.woocommerce-product-details__short-description ul li::before {
    content: '—' !important;
    position: absolute !important;
    left: 0 !important;
    color: #D4B86A !important;
    font-weight: 300 !important;
}

/* 4. SWATCHES (Size Selector — Custom Buttons) */

/* Ẩn layout bảng mặc định, chỉ giữ nội dung */
table.variations {
    display: block !important;
    border: none !important;
}

table.variations tbody,
table.variations tr {
    display: block !important;
    border: none !important;
}

/* Ẩn label gốc của WooCommerce (đã thay bằng fatraly-size-label) */
table.variations th.label {
    display: none !important;
}

table.variations td.value {
    display: block !important;
    padding: 0 !important;
    border: none !important;
}

/* Size Selector Container */
.fatraly-size-selector {
    margin-bottom: 20px;
}

.woocommerce-variation-price {
    padding: 24px 0 !important;
}

.fatraly-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fatraly-size-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #1A1A1A;
    text-transform: uppercase;
}

/* Swatches Buttons */
.fatraly-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fatraly-swatch-btn {
    min-width: 48px;
    width: auto;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E5E5;
    border-radius: 0;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #1A1A1A;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 12px;
    white-space: nowrap;
}

.fatraly-swatch-btn:hover {
    border-color: #1A1A1A;
}

.fatraly-swatch-btn.active {
    background-color: #1A1A1A;
    color: #ffffff;
    border-color: #1A1A1A;
}

/* Ẩn link "Xóa" mặc định */
table.variations .reset_variations {
    display: none !important;
}

/* 5. ADD TO CART FORM & BUTTONS */
form.cart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px !important;
}

/* Ẩn bộ chọn số lượng để giống hệt bản thiết kế (Mockup không có số lượng) */
form.cart .quantity {
    display: none !important;
}

/* Add to Cart Button */
button.single_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
    padding: 0 20px !important;
    background-color: #1A1A1A !important;
    color: #ffffff !important;
    border: 1px solid #1A1A1A !important;
    border-radius: 0 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

button.single_add_to_cart_button:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Nút Gọi Ngay (Call Now) */
a.single_call_btn {
    display: flex !important;
    width: 100% !important;
    height: 54px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    background-color: transparent !important;
    color: #1A1A1A !important;
    border: 1px solid #1A1A1A !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    box-sizing: border-box !important;
}

a.single_call_btn:hover {
    background-color: #1A1A1A !important;
    color: #ffffff !important;
}

/* Nút Danh sách yêu thích (Nếu có cài plugin YITH Wishlist) */
.yith-wcwl-add-to-wishlist {
    margin-top: 12px !important;
}

.yith-wcwl-add-to-wishlist a {
    display: flex !important;
    width: 100% !important;
    justify-content: center;
    padding: 16px 20px !important;
    background-color: transparent !important;
    color: #1A1A1A !important;
    border: 1px solid #1A1A1A !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
}

.yith-wcwl-add-to-wishlist a:hover {
    background-color: #1A1A1A !important;
    color: #ffffff !important;
}

/* Fix width if variations exist */
.single_variation_wrap {
    width: 100%;
}

.woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

/* 6. ATELIER NOTES */
.atelier-notes {
    padding: 30px;
    border: 1px solid #EEEEEE;
    margin-top: 40px;
    margin-bottom: 40px;
    background-color: #fafafa;
}

.atelier-notes h4 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.atelier-notes blockquote {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-style: italic;
    color: #1A1A1A;
    line-height: 1.7;
    margin-bottom: 20px;
    border-left: none;
    padding: 0;
}

.atelier-notes .note-author {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
}

.atelier-notes .note-icon {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border: 1px solid #EEEEEE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* 7. GALLERY REFINEMENTS */
.product-gallery-slider .flickity-slider>div {
    padding-bottom: 5px;
    /* Giảm khoảng cách ảnh chính với thumbnail */
}

.product-thumbnails {
    margin-left: -2px !important;
    margin-right: -2px !important;
}

.product-thumbnails .col {
    padding-left: 2px !important;
    padding-right: 2px !important;
    padding-bottom: 4px !important;
}

.product-thumbnails a {
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.product-thumbnails a.is-active,
.product-thumbnails a:hover {
    border-color: #D4B86A !important;
    opacity: 1 !important;
}

/* 8. TABS DESCRIPTION (Materials) */
.product-details .nav-tabs,
.woocommerce-tabs ul.tabs {
    display: none !important;
}

.product-details .tab-panels,
.woocommerce-tabs .panel {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding-top: 30px !important;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #666666;
    border: none !important;
}

.woocommerce-tabs {
    border: none !important;
}

.product-details .tab-panels h2,
.woocommerce-tabs .panel h2 {
    font-size: 2rem !important;
    color: #1A1A1A;
    margin-bottom: 20px;
}

.fatraly-prod-section {
    margin-bottom: 32px;
}

.fatraly-prod-section h3,
.fatraly-prod-section h4 {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #1A1A1A !important;
    margin: 24px 0 14px !important;
    letter-spacing: 0.03em;
}

.woocommerce-tabs .panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    border: 1px solid #E5DCD0 !important;
    background: #FFFFFF;
}

.woocommerce-tabs .panel table td,
.woocommerce-tabs .panel table th {
    padding: 12px 16px !important;
    border: 1px solid #E5DCD0 !important;
    color: #333333;
    font-size: 0.88rem;
    vertical-align: middle;
}

.woocommerce-tabs .panel table tr td:first-child {
    font-weight: 500;
    color: #1A1A1A;
    width: 28%;
    background-color: #FAF7F2;
}

/* ============================================
   9. PRODUCT CARDS (SHOP LOOP) — EQUAL HEIGHT & 2-LINE CLAMP
   ============================================ */

/* Equal height grid for product cards */
.products.row,
.row.products {
    display: flex !important;
    flex-wrap: wrap !important;
}

.product-small.col {
    display: flex !important;
}

.product-small.col > .col-inner {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

.product-small.box {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
}

/* Hide default Flatsome image tools */
.product-small .image-tools {
    display: none !important;
}

/* Make product images uniform 3:4 ratio */
.product-small .box-image {
    overflow: hidden !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.product-small .box-image > div {
    width: 100% !important;
}

.product-small .box-image > div > a {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
}

.product-small .box-image img {
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.product-small .box-image:hover img {
    transform: scale(1.05) !important;
}

/* Custom Overlay (Khám phá chi tiết) via CSS Pseudo-elements */
.product-small .box-image>div>a::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-small .box-image>div>a::after {
    content: "Khám phá chi tiết";
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: inline-block;
    background-color: #D4B86A;
    color: #ffffff;
    padding: 10px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 11;
    white-space: nowrap;
    border: 1px solid transparent;
}

.product-small .box-image:hover>div>a::before {
    opacity: 1;
    visibility: visible;
}

.product-small .box-image:hover>div>a::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Hide Category */
.product-small .category {
    display: none !important;
}

/* Text Alignment, Padding & Equal Height Flex Column */
.product-small .box-text {
    text-align: left !important;
    padding: 20px 20px 20px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

.product-small .title-wrapper,
.product-small .price-wrapper {
    text-align: left !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

/* Title Typography — Clamped to 1 line with ellipsis */
.product-small .title-wrapper {
    margin-bottom: 6px !important;
}

.product-small .title-wrapper .product-title {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: #1A1A1A !important;
    margin: 0 !important;
    text-transform: none !important;
    line-height: 1.4 !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 1.4em !important;
    max-height: 1.4em !important;
}

.product-small .title-wrapper .product-title a {
    color: #1A1A1A !important;
    display: inline !important;
}

/* Price Typography */
.product-small .price-wrapper {
    margin-bottom: 8px !important;
    min-height: 1.45em !important;
}

.product-small .price-wrapper .price {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #DC2626 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 1.45 !important;
}

.product-small .price-wrapper .price span.amount,
.product-small .price-wrapper .price ins span.amount {
    color: #DC2626 !important;
    font-weight: 600 !important;
}

.product-small .price-wrapper .price del,
.product-small .price-wrapper .price del span.amount {
    color: #94A3B8 !important;
    font-weight: 400 !important;
    font-size: 0.82rem !important;
    margin-right: 6px !important;
    opacity: 1 !important;
}

.product-small .price-wrapper .price::after {
    display: none !important;
}

/* Subtitle (Excerpt) & Custom Card Subtitle — Clamped to max 2 lines with equal height */
.product-small .box-excerpt,
.product-small .fatraly-card-subtitle {
    font-size: 0.8rem !important;
    color: #888888 !important;
    margin: auto 0 0 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.55 !important;
    text-align: left !important;
    font-weight: 400 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: calc(1.55em * 2) !important;
    max-height: calc(1.55em * 2) !important;
}

/* Responsive Mobile Product Grid (1 or 2 products per row) */
@media (max-width: 768px) {
    body.thinh-mobile-cols-2 .products .product-small.col,
    body.thinh-mobile-cols-2 .product-small.col.has-hover.product {
        flex-basis: 50% !important;
        max-width: 50% !important;
        padding: 0 6px 14px 6px !important;
    }

    body.thinh-mobile-cols-2 .product-small .box-text {
        padding: 12px 10px 14px 10px !important;
    }

    body.thinh-mobile-cols-2 .product-small .title-wrapper {
        margin-bottom: 4px !important;
    }

    body.thinh-mobile-cols-2 .product-small .title-wrapper .product-title {
        font-size: 0.95rem !important;
    }

    body.thinh-mobile-cols-2 .product-small .price-wrapper {
        margin-bottom: 6px !important;
    }

    body.thinh-mobile-cols-2 .product-small .price-wrapper .price {
        font-size: 0.78rem !important;
    }

    body.thinh-mobile-cols-2 .product-small .box-excerpt,
    body.thinh-mobile-cols-2 .product-small .fatraly-card-subtitle {
        font-size: 0.72rem !important;
        line-height: 1.45 !important;
        min-height: calc(1.45em * 2) !important;
        max-height: calc(1.45em * 2) !important;
    }

    body.thinh-mobile-cols-2 .product-small .box-image > div > a::after {
        padding: 7px 12px;
        font-size: 0.62rem;
        bottom: 14px;
        letter-spacing: 0.08em;
    }

    body.thinh-mobile-cols-1 .products .product-small.col,
    body.thinh-mobile-cols-1 .product-small.col.has-hover.product {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   CART PAGE CUSTOMIZATION (Fatraly INVENTORY STYLE)
   ============================================ */

.woocommerce-cart table.inventory-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    margin-bottom: 40px !important;
}

.woocommerce-cart table.inventory-table thead th {
    border-bottom: 2px solid #E0D8CC !important;
    padding-bottom: 15px !important;
    color: #1A1A1A !important;
    font-size: 1rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 100 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.woocommerce-cart table.inventory-table tbody tr {
    border-bottom: 1px solid #EDE8E0 !important;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce-cart table.inventory-table tbody tr:hover {
    background-color: #F0EBE3 !important;
}

.woocommerce-cart table.inventory-table tbody td {
    padding: 20px 12px !important;
    border: none !important;
    vertical-align: middle !important;
}

@media (min-width: 850px) {

    .woocommerce-cart table.inventory-table th.product-price,
    .woocommerce-cart table.inventory-table td.product-price,
    .woocommerce-cart table.inventory-table th.product-quantity,
    .woocommerce-cart table.inventory-table td.product-quantity,
    .woocommerce-cart table.inventory-table th.product-subtotal,
    .woocommerce-cart table.inventory-table td.product-subtotal,
    .woocommerce-cart table.inventory-table th.product-remove,
    .woocommerce-cart table.inventory-table td.product-remove {
        text-align: center !important;
        vertical-align: middle !important;
    }
}

.woocommerce-cart table.inventory-table td.product-quantity .quantity {
    margin: 0 auto !important;
    justify-content: center !important;
}

.woocommerce-cart table.inventory-table tbody tr {
    border-bottom: 1px solid #EDE8E0 !important;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce-cart table.inventory-table tbody tr:hover {
    background-color: #F0EBE3 !important;
}

.woocommerce-cart table.inventory-table td.product-remove a.remove {
    margin: 0 auto !important;
    display: inline-block !important;
    font-size: 1.8rem !important;
    line-height: 1 !important;
    color: #1A1A1A !important;
    text-decoration: none !important;
    font-weight: 300 !important;
}

/* --- MOBILE RESPONSIVE TABLE FIX --- */
@media (max-width: 849px) {

    /* Hide desktop table header completely */
    .woocommerce-cart table.inventory-table thead {
        display: none !important;
    }

    /* Convert rows to vertical blocks */
    .woocommerce-cart table.inventory-table tbody tr {
        display: block !important;
        padding: 15px 0 !important;
        position: relative !important;
    }

    /* Convert cells to flex containers with label on left, value on right */
    .woocommerce-cart table.inventory-table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        text-align: right !important;
        padding: 10px 0 !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* Product info cell should stretch */
    .woocommerce-cart table.inventory-table tbody td.product-name {
        padding-bottom: 15px !important;
        width: 100% !important;
    }

    .woocommerce-cart table.inventory-table tbody td.product-name .product-cell {
        width: 100% !important;
        justify-content: flex-start !important;
        /* Align properly to the left */
        padding-right: 35px !important;
        /* Space for the absolute 'x' */
        box-sizing: border-box !important;
    }

    .woocommerce-cart table.inventory-table tbody td.product-name .product-cell-info {
        text-align: left !important;
        align-items: flex-start !important;
        width: auto !important;
        flex: 1 !important;
    }

    /* Remove button cell should push to the right corner */
    .woocommerce-cart table.inventory-table tbody td.product-remove {
        position: absolute !important;
        top: 15px !important;
        right: 0 !important;
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        justify-content: center !important;
        align-items: flex-start !important;
        border: none !important;
        display: flex !important;
        z-index: 10 !important;
    }

    /* Show the column label using data-title attribute */
    .woocommerce-cart table.inventory-table tbody td::before {
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        content: attr(data-title) !important;
        font-weight: 100 !important;
        color: #1A1A1A !important;
        font-family: 'Montserrat', sans-serif !important;
        text-transform: uppercase !important;
        display: block !important;
    }

    /* Don't show labels for the product name or the remove action */
    .woocommerce-cart table.inventory-table tbody td.product-name::before,
    .woocommerce-cart table.inventory-table tbody td.product-remove::before {
        display: none !important;
    }

    /* Fix the remove 'x' button alignment */
    .woocommerce-cart table.inventory-table td.product-remove a.remove {
        margin: 0 !important;
        text-align: center !important;
        font-size: 1.5rem !important;
        line-height: 1 !important;
        width: 30px !important;
        height: 30px !important;
        display: block !important;
    }

    /* Prevent quantity box from centering on mobile */
    .woocommerce-cart table.inventory-table td.product-quantity .quantity {
        margin: 0 !important;
    }

    /* Fix custom totals/checkout rows so they aren't affected by the flex cell hack */
    .woocommerce-cart table.inventory-table tbody tr.custom-in-table-totals td,
    .woocommerce-cart table.inventory-table tbody tr.custom-in-table-checkout td {
        display: block !important;
        padding: 15px 0 !important;
    }

    .woocommerce-cart table.inventory-table tbody tr.custom-in-table-totals td::before,
    .woocommerce-cart table.inventory-table tbody tr.custom-in-table-checkout td::before {
        display: none !important;
    }
}

/* Product Cell (Combined Thumbnail + Name) */
.product-cell {
    display: flex;
    align-items: center;
    gap: 16px !important;
}

.product-cell-img-wrap {
    width: 56px !important;
    height: 56px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: block !important;
}

.product-cell-img-wrap a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.product-cell-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.product-cell-info {
    display: flex;
    flex-direction: column;
}

.product-cell-name {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    margin-bottom: 2px !important;
}

.product-cell-name a {
    color: #1A1A1A !important;
}

.product-cell-sku {
    font-size: 0.7rem !important;
    color: #8A8A8A !important;
    font-style: italic !important;
}

/* Price & Subtotal */
.product-price,
.product-subtotal {
    font-size: 0.875rem !important;
    color: #1A1A1A !important;
    font-weight: 500 !important;
}

/* Quantity Input Styling */
.woocommerce-cart table.inventory-table .product-quantity .quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #E0D8CC !important;
    width: 100px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: transparent !important;
}

.woocommerce-cart table.inventory-table .product-quantity .quantity input.qty {
    width: 40px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border: none !important;
    text-align: center !important;
    font-size: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #1A1A1A !important;
    -moz-appearance: textfield !important;
    display: block !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
    position: static !important;
    transform: none !important;
    vertical-align: top !important;
}

.woocommerce-cart table.inventory-table td.actions .button.update-cart {
    background: transparent !important;
    border: 1px solid #1A1A1A !important;
    color: #1A1A1A !important;
}

/* ===========================================
   Fatraly CART BUTTONS EQUAL SIZING
   =========================================== */
.woocommerce-cart .fatraly-cart-btn {
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    margin: 0 !important;
    min-width: 270px !important;
    max-width: 270px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.woocommerce-cart .fatraly-gold-btn {
    background: #D4B86A !important;
    border: 1px solid #D4B86A !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

.woocommerce-cart .fatraly-gold-btn:hover {
    background: #FFFFFF !important;
    border-color: #D4B86A !important;
    color: #D4B86A !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.woocommerce-cart .fatraly-outline-btn {
    border: 1px solid #1A1A1A !important;
    background: #FFFFFF !important;
    color: #1A1A1A !important;
    box-shadow: none !important;
}

.woocommerce-cart .fatraly-outline-btn:hover {
    background: #1A1A1A !important;
    border-color: #1A1A1A !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.woocommerce-cart button.fatraly-outline-btn[name="update_cart"] {
    border: 1px solid #1A1A1A !important;
    color: #1A1A1A !important;
    box-shadow: none !important;
}

.woocommerce-cart button.fatraly-outline-btn[name="update_cart"]:hover {
    background: #1A1A1A !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.woocommerce-cart button.fatraly-outline-btn[name="update_cart"]:disabled,
.woocommerce-cart button.fatraly-outline-btn[name="update_cart"][disabled],
.woocommerce-cart button.fatraly-outline-btn[name="update_cart"]:disabled:hover,
.woocommerce-cart button.fatraly-outline-btn[name="update_cart"][disabled]:hover {
    opacity: 1 !important;
    background: #FFFFFF !important;
    border: 1px solid #1A1A1A !important;
    color: #1A1A1A !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.woocommerce-cart .fatraly-dark-btn {
    background: #1A1A1A !important;
    border: 1px solid #1A1A1A !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

.woocommerce-cart .fatraly-dark-btn:hover {
    background: #FFFFFF !important;
    border-color: #1A1A1A !important;
    color: #1A1A1A !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/* Responsive Totals & Action Buttons */
.fatraly-cart-totals-flex {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 60px;
}

.fatraly-cart-actions-flex {
    display: flex;
    gap: 15px;
    place-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 849px) {
    .fatraly-cart-totals-flex {
        justify-content: space-between;
        gap: 15px;
    }

    .fatraly-cart-actions-flex {
        flex-direction: column;
        width: 100%;
        box-sizing: border-box !important;
    }

    .fatraly-cart-actions-flex .fatraly-cart-btn,
    .fatraly-cart-actions-flex .checkout-button,
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        display: block !important;
        box-sizing: border-box !important;
        padding: 15px 10px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.05em !important;
        line-height: 1.4 !important;
    }
}

/* ============================================
   INVENTORY HEADER & SEARCH
   ============================================ */

.fatraly-inventory-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.inventory-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.inventory-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.inventory-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #8A8A8A;
    text-transform: uppercase;
    display: block;
}

.inventory-title {
    font-size: 2.2rem;
    font-weight: 400;
    color: #1A1A1A;
    margin: 0;
    line-height: 1;
}

.inventory-add-btn {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    padding: 12px 24px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border-radius: 2px !important;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease !important;
}

.inventory-add-btn:hover {
    background-color: #B8973B !important;
    color: #FFFFFF !important;
}

.inventory-bottom {
    display: flex;
}

.inventory-search-wrap {
    position: relative;
    width: 100%;
    background-color: #F5F0E8;
    border-radius: 2px;
    display: flex;
    align-items: center;
}

.inventory-search-wrap .search-icon {
    position: absolute;
    left: 15px;
    color: #8A8A8A;
    pointer-events: none;
}

.inventory-search-wrap input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 15px 15px 15px 45px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.8rem !important;
    color: #1A1A1A !important;
    margin: 0 !important;
    height: auto !important;
}

.inventory-search-wrap input::placeholder {
    color: #B5B5B5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.inventory-search-wrap input:focus {
    outline: none !important;
    border: none !important;
    background: white !important;
}

.fatraly-hidden {
    display: none !important;
}

@media (max-width: 849px) {
    .inventory-top {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .inventory-add-btn {
        width: auto;
        justify-content: center;
        padding: 10px 15px !important;
    }

    .inventory-search-wrap {
        width: 100%;
    }

    .inventory-title {
        font-size: 1.8rem;
    }
}

/* ============================================
   CHECKOUT PAGE STYLES
   ============================================ */

.woocommerce-checkout form.checkout {
    font-family: 'Montserrat', sans-serif;
    color: #1A1A1A;
}

.woocommerce-checkout form.checkout h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #1A1A1A;
    text-transform: uppercase;
    margin-bottom: 25px;
    border-bottom: 2px solid #E0D8CC;
    padding-bottom: 15px;
}

.woocommerce-checkout form.checkout label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1A1A1A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    display: block;
}

/* Increase input height and style like cart */
.woocommerce-checkout form.checkout input[type="text"],
.woocommerce-checkout form.checkout input[type="email"],
.woocommerce-checkout form.checkout input[type="tel"],
.woocommerce-checkout form.checkout input[type="password"],
.woocommerce-checkout form.checkout select,
.woocommerce-checkout form.checkout textarea {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: #1A1A1A !important;
    background-color: #FAF7F2 !important;
    border: 1px solid #E0D8CC !important;
    border-radius: 2px !important;
    padding: 0 15px !important;
    height: 48px !important;
    min-height: 48px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout form.checkout textarea {
    padding: 15px !important;
    height: auto !important;
    min-height: 120px !important;
}

.woocommerce-checkout .select2-container .select2-selection--single {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: #1A1A1A !important;
    background-color: #FAF7F2 !important;
    border: 1px solid #E0D8CC !important;
    border-radius: 2px !important;
    padding: 0 15px !important;
    height: 48px !important;
    min-height: 48px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}

/* Select2 dropdown fix for height */
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    padding: 0 !important;
    color: #1A1A1A !important;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    top: 0 !important;
    right: 10px !important;
}

.woocommerce-checkout form.checkout input:focus,
.woocommerce-checkout form.checkout textarea:focus {
    outline: none !important;
    border-color: #B8973B !important;
    box-shadow: inset 0 0 0 1px #B8973B !important;
    background-color: #FFFFFF !important;
}


.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table th,
.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table td {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    color: #1A1A1A !important;
    border-bottom: 1px solid #EDE8E0 !important;
    border-top: none !important;
    padding: 18px 0 !important;
}

.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table thead th {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table tbody td.product-name {
    font-weight: 100 !important;
}

.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table tbody td.product-total {
    font-weight: 400 !important;
    text-align: right !important;
}

.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table tfoot th {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table tfoot td {
    font-weight: 400 !important;
    text-align: right !important;
}

/* Payment Methods */
.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600 !important;
    color: #1A1A1A !important;
    letter-spacing: 0.05em;
}

.woocommerce-checkout #payment div.payment_box {
    background-color: #FFFFFF !important;
    color: #8A8A8A !important;
    font-weight: 100 !important;
    font-size: 0.85rem !important;
    border-radius: 2px !important;
    padding: 20px !important;
    margin-top: 15px !important;
}

.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #FFFFFF !important;
}

form.checkout.woocommerce-checkout .large-5.col .col-inner {
    background: white;
}

/* Place Order Button */
.woocommerce-checkout #place_order {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    padding: 20px !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 20px !important;
}

.woocommerce-checkout #place_order:hover {
    background-color: #B8973B !important;
}

.woocommerce-cart table.inventory-table .product-quantity .quantity input[type="button"] {
    background: transparent !important;
    border: none !important;
    width: 30px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 1.2rem !important;
    color: #1A1A1A !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: block !important;
    text-align: center !important;
    transition: background 0.2s !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
    position: static !important;
    transform: none !important;
    vertical-align: top !important;
}

.woocommerce-cart table.inventory-table .product-quantity .quantity input[type="button"]:hover {
    background: #F0F0F0 !important;
}

/* Actions (Remove Button) */
.woocommerce-cart table.inventory-table .product-remove {
    text-align: right !important;
}

.action-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    color: #8A8A8A !important;
    padding: 4px !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-btn:hover {
    color: #E74C3C !important;
    /* Danger color */
}

/* Cart Totals Sidebar (Now below the table, aligned right) */
.cart-collaterals .cart-sidebar {
    background: #FAF7F2 !important;
    padding: 30px !important;
    border-radius: 0 !important;
    border: 1px solid #EDE8E0 !important;
    max-width: 450px !important;
    margin-left: auto !important;
    /* Align to the right */
}

.cart-sidebar h2,
.cart-sidebar .widget-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid #E0D8CC !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
    color: #1A1A1A !important;
}

.cart-sidebar table {
    border: none !important;
}

.cart-sidebar table th,
.cart-sidebar table td {
    border: none !important;
    border-bottom: 1px solid #EDE8E0 !important;
    padding: 15px 0 !important;
    font-size: 0.875rem !important;
    background: transparent !important;
}

.cart-sidebar table th {
    font-weight: 500 !important;
    color: #8A8A8A !important;
}

.cart-sidebar table td {
    text-align: right !important;
    font-weight: 500 !important;
    color: #1A1A1A !important;
}

.cart-sidebar a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-radius: 0 !important;
    padding: 16px 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    width: 100% !important;
    margin-top: 24px !important;
    display: block !important;
    text-align: center !important;
}

.cart-sidebar a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #3A3A3A !important;
    color: #FFFFFF !important;
}

/* Force everything in the cart to be font-weight: 100 (thin/normal) and font-size: 1rem as requested */
.woocommerce-cart table.inventory-table,
.woocommerce-cart table.inventory-table th,
.woocommerce-cart table.inventory-table td,
.woocommerce-cart table.inventory-table a,
.woocommerce-cart table.inventory-table span.amount,
.woocommerce-cart table.inventory-table bdi,
.woocommerce-cart table.inventory-table strong,
.woocommerce-cart table.inventory-table b,
.woocommerce-cart .custom-in-table-totals td,
.woocommerce-cart .custom-in-table-totals th,
.woocommerce-cart .custom-in-table-totals span.amount,
.woocommerce-cart .custom-in-table-totals bdi,
.woocommerce-cart .custom-in-table-totals strong,
.woocommerce-cart .fatraly-cart-btn,
.woocommerce-cart .button {
    font-weight: 100 !important;
    font-size: 1rem !important;
}