.site-header .woocommerce-cart-form {
    margin-bottom: 2rem;
}

.site-header .woocommerce-cart-form__cart-item {
    display: flex;
    padding: 1.5rem;
    border-bottom: 1px solid var(--fernand-border-color);
    gap: 2rem;
}

.site-header .product-thumbnail {
    flex: 0 0 120px;
}

.site-header .product-thumbnail img {
    width: 100%;
    height: auto;
}

.site-header .product-details {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.site-header .product-name {
    flex: 1;
    min-width: 200px;
}

.site-header .product-name a {
    color: var(--fernand-text-color);
    text-decoration: none;
    font-weight: 500;
}

.site-header .product-price {
    flex: 0 0 100px;
    text-align: right;
}

.site-header .product-quantity {
    flex: 0 0 120px;
}

.site-header .product-quantity .quantity {
    display: flex;
    align-items: center;
}

.site-header .product-quantity input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--fernand-border-color);
    background: transparent;
    color: var(--fernand-text-color);
}

.site-header .product-remove {
    flex: 0 0 auto;
}

.site-header .product-remove .remove {
    color: var(--fernand-text-color);
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
}

.site-header .actions {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-header .coupon {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.site-header .coupon input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--fernand-border-color);
    background: transparent;
    color: var(--fernand-text-color);
}

.site-header .button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--fernand-border-color);
    color: var(--category-color, var(--fernand-bg-color));
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.site-header .cart-collaterals {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--fernand-border-color);
}

.site-header .cart_totals {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.site-header .cart_totals h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.site-header .cart_totals table {
    width: 100%;
    margin-bottom: 1rem;
}

.site-header .cart_totals th {
    text-align: left;
    padding: 0.5rem 0;
}

.site-header .cart_totals td {
    text-align: right;
    padding: 0.5rem 0;
}

.site-header .cart_totals .order-total th,
.site-header .cart_totals .order-total td {
    font-weight: 600;
    font-size: 1.1rem;
}

.site-header .wc-proceed-to-checkout {
    text-align: right;
}

.site-header .wc-proceed-to-checkout .checkout-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--fernand-text-color);
    color: var(--fernand-bg-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header .woocommerce-cart-form__cart-item {
        flex-direction: column;
        gap: 1rem;
    }

    .site-header .product-thumbnail {
        flex: 0 0 auto;
        max-width: 200px;
        margin: 0 auto;
    }

    .site-header .product-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header .product-price,
    .site-header .product-quantity {
        flex: 0 0 auto;
    }

    .site-header .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .site-header .coupon {
        flex-direction: column;
        align-items: stretch;
    }
}

.site-header .cart-header {
    margin-bottom: 2rem;
    text-align: center;
}

.site-header .cart-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--fernand-text-color);
} 

.cart-container.page-checkout .woocommerce {
    font-size: 90%;
}


/* Fernand Cart Styles - Extracted from Flatsome
-------------------------------------------------------------- */

/* ==========================================================================
   SHOP TABLE STYLES
   ========================================================================== */

/* Basic shop table styles */
.shop_table {
    border-color: #ececec;
    border-spacing: 0;
    margin-bottom: 1em;
    width: 100%;
}

/* List items within shop table */
.checkout ul li,
.shop_table ul li {
    list-style: none;
    margin: 0;
}

/* Quantity within shop table */
.shop_table .quantity {
    margin: 0;
}

/* Product thumbnail cell */
td.product-thumbnail {
    max-width: 90px;
    min-width: 60px;
    width: 90px;
}

td.product-thumbnail img {
    display: inline-block;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}

/* Product remove cell */
.shop_table .product-remove {
    padding: 0;
    width: 20px;
}

/* Table footer headers */
.shop_table tfoot th {
    font-size: 85%;
    letter-spacing: 0;
    text-transform: inherit;
}

/* Right-aligned cells */
.cart_totals tbody tr td,
.shop_table tfoot tr td,
.shop_table thead tr th:last-of-type,
.shop_table tr td:last-of-type,
td.product-total {
    text-align: right;
}

/* Order total and header borders */
.shop_table .order-total td,
.shop_table .order-total th,
.shop_table thead th {
    border-width: 3px;
}

/* Last header cell */
.shop_table th:last-child {
    border-right: 0;
}

/* Cart item cells */
.shop_table .cart_item td {
    padding-bottom: 15px;
    padding-top: 15px;
}

/* Actions section */
.shop_table .actions {
    border: 0;
    padding: 15px 0 10px;
}

/* Submit column */
.shop_table .submit-col {
    padding-left: 30px;
}

/* ==========================================================================
   RESPONSIVE SHOP TABLE STYLES
   ========================================================================== */

/* Tablet and smaller screens */
@media (max-width: 849px) {
    .shop_table {
        font-size: 0.9em;
    }
    
    .shop_table tr.shipping th {
        width: 50%;
    }
    
    .shop_table .product-name {
        min-width: 80px;
    }
    
    .shop_table .product-remove {
        position: relative;
        width: 0;
    }
    
    .shop_table .product-remove a {
        font-size: 18px !important;
        height: 24px;
        left: 0;
        line-height: 18px !important;
        position: absolute;
        top: 10px;
        width: 24px;
    }
    
    .shop_table .mobile-product-price {
        margin: 0.5em 0;
    }
}

/* Mobile screens */
@media (max-width: 549px) {
    .shop_table .product-price,
    .shop_table .product-subtotal {
        display: none;
    }
    
    .product-quantity {
        text-align: right;
    }
    
    .cross-sells {
        overflow: hidden;
    }
}

/* ==========================================================================
   CART TOTALS STYLES
   ========================================================================== */

/* Cart totals table body headers */
.cart_totals tbody th {
    font-size: 0.9em;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: inherit;
}

/* Hide cart totals heading */
.cart_totals > h2 {
    display: none;
}

/* Cart totals button */
.cart_totals .button {
    display: block;
    margin-right: 0;
    min-width: 100%;
}

/* Cart totals product name header */
.cart_totals th.product-name {
    border-width: 3px;
}

/* Proceed to checkout section */
.cart_totals .wc-proceed-to-checkout {
    margin: 1.5em 0;
}

/* ==========================================================================
   SHIPPING TABLE STYLES
   ========================================================================== */

/* Shipping table container */
.shipping__table {
    margin: 0;
}

/* Shipping inner container */
.shipping__inner {
    border: 0;
    font-size: 1em;
    padding: 0;
}

/* Shipping list */
.shipping__list {
    margin-bottom: 0;
}

/* Shipping list items */
.shipping__list_item {
    align-items: center;
    display: flex;
    min-height: 2em;
}

/* Shipping list labels */
.shipping__list_label {
    flex: 1;
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
    padding: 0.5em 0;
}

/* Boxed shipping style */
.shipping.shipping--boxed .shipping__list {
    padding: 0;
}

.shipping.shipping--boxed .shipping__list_item {
    background-color: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-bottom: 5px;
    min-height: 2.4em;
    padding: 0.3em 0.6em;
}

/* Multiple shipping table */
.shipping__table--multiple {
    display: block;
    text-align: left;
}

.shipping__table--multiple tbody,
.shipping__table--multiple td,
.shipping__table--multiple th,
.shipping__table--multiple tr {
    display: block;
    padding-left: 0;
    text-align: left;
}

.shipping__table--multiple th {
    border: 0;
}

.shipping__table--multiple .shipping__list {
    padding: 0 0.2em;
}

.shipping__table--multiple .shipping__list_label,
.shipping__table--multiple .woocommerce-shipping-calculator,
.shipping__table--multiple .woocommerce-shipping-destination {
    text-align: left;
}

/* Shipping row interactions */
tr.shipping input:checked + label,
tr.shipping input:hover + label,
tr.shipping label:hover {
    opacity: 1;
}

tr.shipping input:checked + label {
    font-weight: 700;
}

tr.shipping input {
    margin-bottom: 0;
    margin-top: -2px;
}

tr.shipping span.amount {
    margin-left: 0.2em;
}

/* ==========================================================================
   SHIPPING CALCULATOR STYLES
   ========================================================================== */

/* Shipping calculator */
.woocommerce-shipping-calculator {
    margin-bottom: 0;
    margin-top: 0.5em;
}

.shipping-calculator-button,
.woocommerce-shipping-destination {
    font-size: 0.9em;
}

.shipping-calculator-form {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 5px;
    margin-top: 5px;
    padding: 15px 15px 10px;
}

/* ==========================================================================
   CART DISCOUNT STYLES
   ========================================================================== */

/* Cart discount styling */
.cart-discount {
    background-color: rgba(var(--fs-color-success), 0.2);
    font-size: 0.85em;
}

.cart-discount td,
.cart-discount th {
    padding: 10px 5px;
}

/* ==========================================================================
   CART SIDEBAR STYLES
   ========================================================================== */

/* Cart sidebar widget title */
.cart-sidebar .widget-title {
    border-bottom: 3px solid #ececec;
    font-size: 0.95em;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

/* Shopping cart widget buttons */
.widget_shopping_cart .woocommerce-mini-cart__buttons .button {
    margin: 0.5em 0 0;
    width: 100%;
}

/* Empty cart item */
.widget_shopping_cart li.empty {
    margin: 0;
    min-height: 0;
    padding: 0 10px !important;
    text-align: center;
}

/* Cart total in widget */
.widget_shopping_cart p.total {
    border-bottom: 2px solid #ececec;
    border-top: 1px solid #ececec;
    margin-bottom: 0.5em;
    padding: 10px 0;
    text-align: center;
}

/* Dark theme support for cart widget */
.dark .widget_shopping_cart p.total {
    border-color: hsla(0, 0%, 100%, 0.2);
}

/* ==========================================================================
   NAVIGATION DROPDOWN CART STYLES
   ========================================================================== */

/* Product list in nav dropdown */
.nav-dropdown .product_list_widget {
    -webkit-overflow-scrolling: touch;
    max-height: 500px;
    max-height: 50vh;
    overflow-y: auto;
}

/* Mini cart item variations */
.woocommerce-mini-cart-item .variation {
    margin-bottom: 10px;
}

.woocommerce-mini-cart-item .ux-mini-cart-qty {
    margin-right: -30px;
    margin-top: 3px;
}

/* Mini cart total */
.woocommerce-mini-cart__total {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

/* Mini cart in nav dropdown */
.nav-dropdown ul.woocommerce-mini-cart {
    margin-bottom: 10px;
}

/* ==========================================================================
   CART POPUP STYLES
   ========================================================================== */

/* Cart popup inner container */
.cart-popup-inner {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.cart-popup-inner > :last-child {
    margin-bottom: 30px;
}

.cart-popup-inner .widget_shopping_cart {
    margin-bottom: 0;
}

.cart-popup-inner .widget_shopping_cart,
.cart-popup-inner .widget_shopping_cart_content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.cart-popup-inner .widget_shopping_cart_content .price-wrapper {
    font-size: 0.85em;
    opacity: 0.6;
}

.cart-popup-inner .woocommerce-mini-cart {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-bottom: 30px;
}

.cart-popup-inner .woocommerce-mini-cart__buttons:last-child {
    margin-bottom: 0;
}

/* Sticky cart popup for tall screens */
@media (min-height: 500px) {
    .cart-popup-inner--sticky {
        min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    }
    
    .cart-popup-inner--sticky .ux-mini-cart-footer {
        background-color: #fff;
        border-top: 1px solid #f1f1f1;
        bottom: 0;
        position: sticky;
    }
    
    .cart-popup-inner--sticky .ux-mini-cart-footer .woocommerce-mini-cart__total:first-child {
        border-top: 0;
    }
}

/* ==========================================================================
   MINI CART FOOTER STYLES
   ========================================================================== */

/* Mini cart footer free shipping */
.ux-mini-cart-footer .ux-free-shipping {
    margin-bottom: 20px;
    margin-top: 5px;
}

/* Off-canvas cart footer */
.off-canvas-cart .ux-mini-cart-footer {
    margin-left: -30px;
    margin-right: -30px;
    padding: 10px 30px 30px;
}

/* Mini cart quantity */
.ux-mini-cart-qty {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: space-between;
}

.ux-mini-cart-qty .quantity {
    margin: 0 !important;
}

/* ==========================================================================
   MINI CART CROSS SELLS STYLES
   ========================================================================== */

/* Mini cart cross sells */
.ux-mini-cart-cross-sells {
    margin-bottom: 30px;
    margin-top: auto;
}

.nav-dropdown .ux-mini-cart-cross-sells {
    display: none;
}

.ux-mini-cart-cross-sells__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item {
    background-color: rgba(0, 0, 0, 0.05);
    border: 0;
    margin-bottom: 0;
    padding-left: 85px;
    padding-right: 10px !important;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item img {
    left: 10px;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .product-title {
    font-size: 0.9em;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .price-wrapper {
    opacity: 1;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .price-wrapper .price {
    margin-bottom: 0.5em;
    margin-top: 0.5em;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .price-wrapper .star-rating ~ .price {
    margin-top: 0;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item a:not(.remove, .button) {
    display: inline;
}

.ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item:last-child {
    margin-bottom: 0;
}

.ux-mini-cart-cross-sells__list .button.add_to_cart_button {
    align-items: center;
    display: inline-flex;
    float: right;
    font-size: 0.7em;
    gap: 5px;
    justify-content: center;
    line-height: 1;
    margin: 0 0 8px 8px;
    padding: 3px 8px;
}

/* ==========================================================================
   EMPTY CART STYLES
   ========================================================================== */

/* Empty mini cart */
.ux-mini-cart-empty {
    gap: 30px;
    padding: 15px 0;
}

.ux-mini-cart-empty .woocommerce-mini-cart__empty-message {
    margin-bottom: 0;
}

a.icon-circle:hover,
a.remove:hover,
a:hover {
    color: var(--fs-experimental-link-color-hover);
}

a.icon-remove,
a.remove {
    border: 2px solid;
    border-radius: 100%;
    color: #ccc;
    display: block;
    font-size: 15px !important;
    font-weight: 700;
    height: 24px;
    line-height: 19px !important;
    text-align: center;
    width: 24px;
}
