/* ========================================
   CART PAGE STYLES
   ======================================== */

/* ========================================
   Cart Section
   ======================================== */
.cart-section {
    padding: 40px 0 60px;
    background: linear-gradient(135deg, #f8faf7 0%, #ffffff 100%);
    min-height: 100vh;
}

.cart-section .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

/* WooCommerce Notices */
.cart-section .woocommerce-notices-wrapper {
    margin-bottom: 24px;
}

.cart-section .woocommerce-message,
.cart-section .woocommerce-info,
.cart-section .woocommerce-error,
.cart-section .woocommerce-notice {
    padding: 16px 24px;
    border-radius: var(--radius-md, 12px);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    list-style: none;
}

.cart-section .woocommerce-message {
    background: rgba(122, 172, 50, 0.1);
    border-left: 4px solid var(--primary-green);
    color: #3d5e1a;
}

.cart-section .woocommerce-info,
.cart-section .woocommerce-notice {
    background: rgba(36, 115, 144, 0.1);
    border-left: 4px solid #247390;
    color: #1a4d5e;
}

.cart-section .woocommerce-error {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.page-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    text-align: left;
    color: var(--text-primary);
}

.page-title .highlight {
    color: var(--primary-green);
}

/* ========================================
   Cart Layout
   ======================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 48px;
    margin-top: 0;
}

/* ========================================
   Cart Main Area
   ======================================== */
.cart-main {
    background: transparent;
    border-radius: var(--radius-lg);
    padding: 0;
}

/* ========================================
   Cart Header
   ======================================== */
.cart-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1.5fr 1fr 80px;
    gap: 32px;
    padding: 20px 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.cart-header > span,
.cart-header-product,
.cart-header-price,
.cart-header-quantity,
.cart-header-total,
.cart-header-remove {
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

/* ========================================
   Cart Items
   ======================================== */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1.5fr 1fr 80px;
    gap: 32px;
    align-items: center;
    padding: 32px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 32px rgba(122, 172, 50, 0.15);
    transform: translateY(-4px);
}

/* Product Info */
.cart-item-product {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cart-item-product img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-family: var(--font-accent);
    font-size: 19px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.cart-item-name:hover {
    color: var(--primary-green);
}

.cart-item-meta {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Price */
.cart-item-price {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Quantity Selector */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn .svg-icon {
    width: 18px;
    height: 18px;
}

.qty-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-minus {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.qty-plus {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
}

.qty-input {
    width: 70px;
    height: 44px;
    border: 2px solid var(--border-color);
    text-align: center;
    font-family: var(--font-accent);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    -moz-appearance: textfield;
    background: var(--white);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-green);
    position: relative;
    z-index: 1;
}

/* Total */
.cart-item-total {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--primary-green);
    font-weight: 700;
}

/* Remove Button */
.cart-item-remove {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.cart-item-remove .svg-icon {
    width: 24px;
    height: 24px;
}

.cart-item-remove:hover {
    background: #dc3545;
    color: var(--white);
    border-color: #dc3545;
    transform: rotate(90deg);
}

/* ========================================
   Cart Actions
   ======================================== */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-accent);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn .svg-icon {
    width: 20px;
    height: 20px;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: rgba(122, 172, 50, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, #8db741 100%);
    color: var(--white);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(122, 172, 50, 0.3);
}

.btn-block {
    width: 100%;
}

/* ========================================
   Coupon Section
   ======================================== */
.cart-coupon {
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.coupon-title {
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-title .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--primary-green);
}

.svg-icon {
    fill: currentColor;
}

.coupon-form {
    display: flex;
    gap: 12px;
}

.coupon-input {
    flex: 1;
    height: 56px;
    padding: 0 24px;
    border: 3px solid var(--primary-green);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    background: var(--white);
}

.coupon-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(122, 172, 50, 0.15);
}

.coupon-input::placeholder {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   Cart Sidebar
   ======================================== */
.cart-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cart Summary */
.cart-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 140px;
}

.summary-title {
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
}

.summary-row span {
    font-family: var(--font-primary);
    color: var(--text-secondary);
}

.summary-row strong {
    font-family: var(--font-accent);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-divider {
    height: 2px;
    background: var(--border-color);
    margin: 24px 0;
}

.summary-total {
    padding: 28px 0 0;
    border-top: 3px solid var(--primary-green);
    margin-top: 24px;
}

.summary-total span {
    font-family: var(--font-accent);
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
}

.summary-total strong {
    font-family: var(--font-display);
    font-size: 38px;
    color: var(--primary-green);
    font-weight: 700;
}

.btn-checkout {
    margin-top: 28px;
    font-size: 17px;
    padding: 20px 32px;
}

/* Cart Features */
.cart-features {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-feature .svg-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-green);
    flex-shrink: 0;
}

.cart-feature strong {
    display: block;
    font-family: var(--font-accent);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-feature p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Continue Shopping Banner */
.continue-shopping-banner {
    background: linear-gradient(135deg, var(--primary-green) 0%, #8db741 100%);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.continue-shopping-banner h4 {
    font-family: var(--font-accent);
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.continue-shopping-banner p {
    font-family: var(--font-primary);
    font-size: 14px;
    margin: 0 0 24px 0;
    opacity: 0.95;
}

.continue-shopping-banner .btn {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--white);
}

.continue-shopping-banner .btn:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* ========================================
   Empty Cart State
   ======================================== */
.empty-cart {
    text-align: center;
    padding: 80px 40px;
}

.empty-cart .svg-icon {
    width: 120px;
    height: 120px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.empty-cart h2 {
    font-family: var(--font-accent);
    font-size: 32px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.empty-cart p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets */
@media (max-width: 1200px) {
    .cart-section .container,
    .breadcrumb-section .container {
        max-width: 100%;
        padding: 0 40px;
    }

    .cart-layout {
        grid-template-columns: 1fr 400px;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static;
    }

    .cart-summary {
        position: static;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .breadcrumb-section {
        padding: 80px 0 0;
    }

    .cart-section {
        padding: 16px 0 60px;
    }

    .cart-section .container,
    .breadcrumb-section .container {
        padding: 0 14px;
    }

    .page-title {
        font-size: 22px !important;
        text-align: center;
        margin-bottom: 16px !important;
    }

    .cart-header {
        display: none;
    }

    /* Two-row cart item:
         row 1 = product (image + name as flex)
         row 2 = qty (left) + total (right)
       Remove button is absolute top-right of card. */
    .cart-item {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "product product"
            "qty     total" !important;
        column-gap: 12px;
        row-gap: 12px;
        padding: 14px 14px 12px !important;
        position: relative;
        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 14px;
        margin-bottom: 10px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
        align-items: center;
    }

    /* Product cell: image + info as flex */
    .cart-item-product {
        grid-area: product;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 12px;
        padding: 0 36px 0 0 !important; /* room for absolute × */
        min-width: 0;
    }

    .cart-item-product > a {
        display: block;
        flex: 0 0 auto;
        line-height: 0;
    }

    .cart-item-product img {
        width: 64px !important;
        height: 64px !important;
        object-fit: contain;
        border-radius: 8px;
        background: #fafafa;
        padding: 4px;
        margin: 0 !important;
        display: block;
    }

    .cart-item-info {
        flex: 1 1 auto;
        min-width: 0;
        align-self: center;
    }

    .cart-item-name,
    .cart-item-name a {
        font-size: 14px !important;
        font-weight: 600;
        line-height: 1.3;
        margin: 0 0 4px 0 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-transform: none;
        word-break: normal;
        color: var(--dark);
    }

    .cart-item-meta {
        font-size: 11px !important;
        color: #888;
        margin: 0 !important;
    }

    /* Hide standalone price on mobile (total is shown instead) */
    .cart-item-price {
        display: none !important;
    }

    .cart-item-price::before {
        content: '';
    }

    /* Quantity selector — bottom left of card */
    .cart-item-quantity {
        grid-area: qty;
        justify-content: flex-start !important;
        align-self: center;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
    }

    .cart-item-quantity::before {
        display: none;
    }

    .cart-item-quantity .quantity-selector {
        display: inline-flex;
        align-items: center;
        background: #f5f7f0;
        border: 1px solid #e6ebe0;
        border-radius: 8px;
        padding: 0;
        gap: 0;
        height: 32px;
    }

    .cart-item-quantity .qty-btn {
        width: 30px;
        height: 30px;
        border: 0;
        background: transparent;
        color: var(--primary-green);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        padding: 0;
    }

    .cart-item-quantity .qty-input,
    .cart-item-quantity input.qty {
        width: 32px !important;
        height: 30px !important;
        border: 0 !important;
        background: transparent;
        text-align: center;
        font-weight: 700;
        font-size: 13px;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Item total — large prominent price, right-aligned */
    .cart-item-total {
        grid-area: total;
        justify-self: flex-end;
        align-self: center;
        font-size: 16px !important;
        font-weight: 800;
        color: var(--primary-green);
        text-align: right;
        white-space: nowrap;
    }

    .cart-item-total::before {
        content: '';
        display: none;
    }

    /* Remove × button — absolute top-right corner of the card */
    .cart-item-remove-wrap {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 26px !important;
        height: 26px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 2;
        grid-area: unset;
    }

    .cart-item-remove,
    .cart-item-remove-wrap > a,
    .cart-item-remove-wrap .remove {
        position: static !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 26px !important;
        height: 26px !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #f5f5f5 !important;
        color: #888 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .cart-item-remove:hover,
    .cart-item-remove-wrap > a:hover {
        background: #fee !important;
        color: #c33 !important;
    }

    .cart-item-remove .svg-icon,
    .cart-item-remove-wrap > a .svg-icon {
        width: 12px !important;
        height: 12px !important;
    }

    .cart-actions {
        flex-direction: column;
        gap: 10px !important;
        padding: 14px !important;
        margin-top: 4px !important;
    }

    .cart-actions .btn {
        width: 100%;
    }

    .coupon-form {
        flex-direction: column;
    }

    .cart-summary {
        padding: 18px !important;
        border-radius: 12px;
        margin-top: 16px;
    }

    .summary-title {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    .summary-row {
        font-size: 13px;
        padding: 8px 0 !important;
    }

    .summary-total strong {
        font-size: 22px !important;
    }

    .btn-checkout {
        font-size: 14px;
        padding: 14px !important;
    }
}

/* Mobile Portrait — under 420px tighter spacing */
@media (max-width: 420px) {
    .page-title {
        font-size: 20px !important;
    }

    .cart-item {
        padding: 12px !important;
        row-gap: 10px;
    }

    .cart-item-product {
        gap: 10px;
        padding-right: 32px !important;
    }

    .cart-item-product img {
        width: 60px !important;
        height: 60px !important;
    }

    .cart-item-name {
        font-size: 13px !important;
        -webkit-line-clamp: 2 !important;
    }

    .cart-item-total {
        font-size: 15px !important;
    }
}

/* ========================================
   WooCommerce Quantity Input Override
   ======================================== */
.woocommerce-cart .quantity {
    display: flex;
    align-items: center;
}

.woocommerce-cart .quantity .qty {
    width: 70px;
    height: 44px;
    border: 2px solid var(--border-color, #e8e8e8);
    border-radius: var(--radius-sm, 8px);
    text-align: center;
    font-family: var(--font-accent);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    -moz-appearance: textfield;
}

.woocommerce-cart .quantity .qty::-webkit-outer-spin-button,
.woocommerce-cart .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce-cart .quantity .qty:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Remove Link Override */
.woocommerce-cart .cart-item-remove-wrap {
    display: flex;
    justify-content: flex-end;
}

.woocommerce-cart a.cart-item-remove,
.woocommerce-cart a.remove {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #e8e8e8);
    background: var(--white, #fff);
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0;
}

.woocommerce-cart a.cart-item-remove .svg-icon,
.woocommerce-cart a.remove .svg-icon {
    width: 24px;
    height: 24px;
}

.woocommerce-cart a.cart-item-remove:hover,
.woocommerce-cart a.remove:hover {
    background: #dc3545;
    color: var(--white);
    border-color: #dc3545;
    transform: rotate(90deg);
}

/* Empty Cart Page */
.cart-empty-page {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty-content {
    max-width: 500px;
    margin: 0 auto 60px;
}

.cart-empty-icon {
    margin-bottom: 32px;
}

.cart-empty-icon .svg-icon {
    width: 120px;
    height: 120px;
    color: #ccc;
}

.cart-empty-page h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cart-empty-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.cart-empty-page .btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

.cart-empty-recommendations {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.cart-empty-recommendations h3 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: var(--text-primary);
}

/* Hide default WooCommerce elements we don't need */
.woocommerce-cart .shop_table,
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: none !important;
}

/* ========================================
   Continue Shopping Button (Centered)
   ======================================== */
.cart-continue-shopping {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

.cart-continue-shopping .btn-continue {
    padding: 18px 48px;
    font-size: 16px;
}

/* ========================================
   Remove Item Modal
   ======================================== */
.cart-remove-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.cart-remove-modal.active {
    display: flex;
}

.cart-remove-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: cartOverlayFadeIn 0.2s ease-out forwards;
}

@keyframes cartOverlayFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.cart-remove-modal .modal-content {
    position: relative;
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: cartModalFadeIn 0.25s ease-out forwards;
}

@keyframes cartModalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cart-remove-modal .modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.cart-remove-modal .modal-icon .svg-icon {
    width: 40px;
    height: 40px;
    color: #dc3545;
}

.cart-remove-modal h3 {
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cart-remove-modal p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.cart-remove-modal .modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.cart-remove-modal .modal-actions .btn {
    min-width: 140px;
    padding: 14px 28px;
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3);
}


/* =====================================================================
   FINAL MOBILE CART LAYOUT — clean rebuild, highest cascade priority
   Two-row card: row 1 = image + name (× absolute corner)
                 row 2 = qty (left) + total (right)
   ===================================================================== */
@media (max-width: 768px) {
    .cart-item.woocommerce-cart-form__cart-item,
    .cart-item {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "product product"
            "qty     total" !important;
        column-gap: 12px !important;
        row-gap: 12px !important;
        padding: 14px 14px 12px !important;
        position: relative !important;
        background: #fff !important;
        border: 1px solid #f0f0f0 !important;
        border-radius: 14px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
        align-items: center !important;
    }

    .cart-item > .cart-item-product {
        grid-area: product !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 0 36px 0 0 !important;
        margin: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .cart-item-product > a {
        display: block !important;
        flex: 0 0 auto !important;
        line-height: 0 !important;
        margin: 0 !important;
    }

    .cart-item-product > a > img,
    .cart-item-product img {
        width: 64px !important;
        height: 64px !important;
        max-width: 64px !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        background: #fafafa !important;
        padding: 4px !important;
        margin: 0 !important;
        display: block !important;
    }

    .cart-item-product > .cart-item-info {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        align-self: center !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .cart-item-info > a.cart-item-name,
    .cart-item-info .cart-item-name,
    .cart-item-name {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin: 0 0 2px 0 !important;
        text-transform: none !important;
        word-break: normal !important;
        color: var(--dark) !important;
        text-decoration: none !important;
    }

    .cart-item-meta {
        margin: 0 !important;
        font-size: 11px !important;
        color: #999 !important;
    }

    /* Hide standalone price column on mobile */
    .cart-item > .cart-item-price {
        display: none !important;
    }

    /* Quantity (row 2 left) */
    .cart-item > .cart-item-quantity {
        grid-area: qty !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    .cart-item-quantity::before {
        display: none !important;
        content: '' !important;
    }

    .cart-item-quantity .quantity-selector {
        display: inline-flex !important;
        align-items: center !important;
        background: #f5f7f0 !important;
        border: 1px solid #e6ebe0 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        gap: 0 !important;
        height: 32px !important;
    }

    .cart-item-quantity .qty-btn {
        width: 30px !important;
        height: 30px !important;
        border: 0 !important;
        background: transparent !important;
        color: var(--primary-green) !important;
        cursor: pointer !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        padding: 0 !important;
    }

    .cart-item-quantity .qty-btn .svg-icon {
        width: 14px !important;
        height: 14px !important;
    }

    .cart-item-quantity .qty-input,
    .cart-item-quantity input.qty,
    .cart-item-quantity input[type="number"] {
        width: 36px !important;
        height: 30px !important;
        border: 0 !important;
        background: transparent !important;
        text-align: center !important;
        font-weight: 700 !important;
        font-size: 13px !important;
        padding: 0 !important;
        box-shadow: none !important;
        appearance: textfield !important;
        -moz-appearance: textfield !important;
    }

    /* Total (row 2 right) */
    .cart-item > .cart-item-total {
        grid-area: total !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        color: var(--primary-green) !important;
        text-align: right !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cart-item-total::before {
        display: none !important;
        content: '' !important;
    }

    /* × button absolute top-right corner of card */
    .cart-item > .cart-item-remove-wrap {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 2 !important;
        grid-area: unset !important;
        background: transparent !important;
    }

    .cart-item-remove-wrap > a,
    .cart-item-remove-wrap > a.cart-item-remove,
    .cart-item-remove,
    a.cart-item-remove {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #f5f5f5 !important;
        color: #888 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        border: 0 !important;
        box-shadow: none !important;
        position: static !important;
    }

    .cart-item-remove-wrap > a:hover,
    .cart-item-remove:hover {
        background: #fee !important;
        color: #c33 !important;
    }

    .cart-item-remove .svg-icon,
    .cart-item-remove-wrap > a .svg-icon {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 420px) {
    .cart-item-product img {
        width: 60px !important;
        height: 60px !important;
    }

    .cart-item-name {
        font-size: 13px !important;
    }
}

/* =====================================================================
   Free-shipping progress bar (cart + checkout)
   ===================================================================== */
.maver-shipping-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 0 0 20px;
    background: linear-gradient(135deg, #f6fbed 0%, #ffffff 100%);
    border: 1px solid rgba(124, 172, 50, 0.25);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(124, 172, 50, 0.08);
}

.maver-shipping-bar__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(124, 172, 50, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.maver-shipping-bar__icon .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--primary-green, #7CAC32);
}

.maver-shipping-bar__body {
    flex: 1;
    min-width: 0;
}

.maver-shipping-bar__text {
    font-size: 14px;
    color: var(--dark, #1f2937);
    margin-bottom: 8px;
    line-height: 1.4;
}

.maver-shipping-bar__text strong {
    color: var(--primary-green, #7CAC32);
    font-weight: 700;
}

.maver-shipping-bar__progress {
    height: 6px;
    background: rgba(124, 172, 50, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.maver-shipping-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green, #7CAC32) 0%, #97c34d 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.maver-shipping-bar--unlocked {
    background: linear-gradient(135deg, #eaf6d6 0%, #ffffff 100%);
    border-color: rgba(124, 172, 50, 0.4);
}

.maver-shipping-bar--unlocked .maver-shipping-bar__icon {
    background: var(--primary-green, #7CAC32);
}

.maver-shipping-bar--unlocked .maver-shipping-bar__icon .svg-icon {
    color: #fff;
}

.maver-shipping-bar--unlocked .maver-shipping-bar__body strong {
    display: block;
    font-size: 15px;
    color: var(--primary-green, #7CAC32);
    font-weight: 700;
    margin-bottom: 2px;
}

.maver-shipping-bar--unlocked .maver-shipping-bar__body span {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

@media (max-width: 768px) {
    .maver-shipping-bar {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 12px;
    }
    .maver-shipping-bar__icon {
        width: 36px;
        height: 36px;
    }
    .maver-shipping-bar__icon .svg-icon {
        width: 18px;
        height: 18px;
    }
    .maver-shipping-bar__text {
        font-size: 13px;
    }
}
