/**
 * Cart Page Styles - Trendyol Style
 *
 * Redesigned cart page with vendor grouping layout.
 *
 * @package Haliysa
 * @since 3.1.0
 * @updated 2025-12-23 - Trendyol-style redesign
 */

/* ==========================================================================
   V2 Container Fallback (legacy .container markup)
   ========================================================================== */

.woocommerce-cart .container,
.woocommerce-order-pay .container,
.woocommerce-order-received .container,
.woocommerce-checkout .container {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .woocommerce-cart .container,
    .woocommerce-order-pay .container,
    .woocommerce-order-received .container,
    .woocommerce-checkout .container {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

@media (min-width: 1024px) {
    .woocommerce-cart .container,
    .woocommerce-order-pay .container,
    .woocommerce-order-received .container,
    .woocommerce-checkout .container {
        padding-left: 10rem;
        padding-right: 10rem;
    }
}

/* ==========================================================================
   Hide Default Page Title on Cart Page
   ========================================================================== */

.woocommerce-cart .entry-header,
.woocommerce-cart .page-title,
.woocommerce-cart article > header {
    display: none !important;
}

/* ==========================================================================
   Cart Page Layout
   ========================================================================== */

.haliysa-cart-page {
    background-color: #f3f5f6;
    border-radius: 16px;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 30px;
    padding-bottom: 30px;
}

/* Cart Page Title */
.haliysa-cart-title {
    margin-bottom: 24px;
}

.haliysa-cart-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: #041e42;
    margin: 0;
    padding: 0;
}

.haliysa-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   Vendor Group Card
   ========================================================================== */

.haliysa-vendor-group {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Vendor Header */
.vendor-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #d1d1d1;
}

.vendor-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vendor-checkbox {
    width: 22px;
    height: 22px;
    background: #27374D;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}

.vendor-label {
    color: #666;
    font-size: 14px;
}

.vendor-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.vendor-name:hover {
    color: #27374D;
}

.vendor-arrow {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

/* ==========================================================================
   Product Row
   ========================================================================== */

.vendor-products {
    padding: 0;
}

.cart-product-row {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.cart-product-row:last-child {
    border-bottom: none;
}



/* Product Checkbox */
.product-checkbox {
    flex-shrink: 0;
}

.checkbox-icon {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-icon.checked {
    background: #27374D;
    border-color: #27374D;
    color: #fff;
}

/* Product Image */
.product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.product-image a {
    display: block;
}

/* Product Info */
.product-info {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.product-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 4px;
}

.product-title:hover {
    color: #27374D;
}

.product-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.variation-item {
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Quantity Controls */
.product-quantity {
    flex-shrink: 0;
    align-self: center;
}

.haliysa-qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.haliysa-qty-minus,
.haliysa-qty-plus {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.haliysa-qty-minus:hover,
.haliysa-qty-plus:hover {
    background: #f5f5f5;
    color: #27374D;
}

.haliysa-qty-minus:active,
.haliysa-qty-plus:active {
    background: #eee;
}

.haliysa-qty-input {
    width: 36px;
    height: 32px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #fff;
}

.haliysa-qty-input:focus {
    outline: none;
}

/* Product Price */
.product-price {
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
    align-self: center;
}

.cart-item-total {
    font-size: 15px;
    font-weight: 700;
    color: #27374D;
}

.cart-item-total .woocommerce-Price-currencySymbol {
    font-weight: 600;
}

/* Remove Button */
.product-remove {
    flex-shrink: 0;
    align-self: flex-start;
}

.haliysa-remove-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #bbb;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.haliysa-remove-item:hover {
    background: #fff0f0;
    color: #e74c3c;
}

.haliysa-remove-item i {
    font-size: 16px;
}

.haliysa-remove-item span {
    display: none;
}

/* ==========================================================================
   Cart Summary Sidebar
   ========================================================================== */

.haliysa-cart-summary {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    color: #041e42;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}


.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.summary-row .row-label {
    font-size: 14px;
    color: #666;
}

.summary-row .row-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.summary-row.total-row {
    border-top: 1px solid #f0f0f0;
}

.summary-row.total-row .row-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.summary-row.total-row .total-value {
    font-size: 22px;
    font-weight: 700;
    color: #27374D;
}

.coupon-row .coupon-value {
    color: #27ae60;
}

/* Coupon Section */
.coupon-section {
    border-top: 1px solid #f0f0f0;
}

.coupon-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0;
    border: none;
    background: transparent;
    color: #27374D;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.coupon-toggle:hover {
    color: #1a2636;
}

.coupon-toggle i {
    font-size: 12px;
    width: 20px;
    height: 20px;
    border: 1px solid currentColor;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-form-wrapper {
    padding-top: 12px;
}

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

.coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.coupon-input:focus {
    outline: none;
    border-color: #27374D;
}

.coupon-apply-btn {
    padding: 10px 20px;
    background: #27374D;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.coupon-apply-btn:hover {
    background: #1a2636;
}

.coupon-messages {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.coupon-messages.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}

.coupon-messages.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

/* Checkout Button */
.checkout-button-wrapper {
       text-align: right;
}

.checkout-button-wrapper .wc-proceed-to-checkout {
    padding: 0;
    margin: 0;
}

.checkout-button-wrapper .wc-proceed-to-checkout .checkout-button,
.haliysa-cart-page .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #27374D;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.checkout-button-wrapper .wc-proceed-to-checkout .checkout-button:hover,
.haliysa-cart-page .wc-proceed-to-checkout .checkout-button:hover {
    background: #1a2636;
    color: #fff;
}

/* Continue Shopping */
.continue-shopping {
    margin-top: 16px;
    text-align: center;
}

.continue-shopping a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.continue-shopping a:hover {
    color: #27374D;
}

.continue-shopping i {
    font-size: 12px;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.cart-product-row.cart-updating {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (max-width: 991px) {
    .haliysa-cart-summary {
        position: static;
        margin-top: 24px;
    }

    .cart-product-row {
        flex-wrap: wrap;
    }

    .product-info {
        flex-basis: calc(100% - 150px);
    }

    .product-quantity,
    .product-price,
    .product-remove {
        margin-top: 12px;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 767px) {
    

    .cart-product-row {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }

    .product-checkbox {
        position: absolute;
        top: 16px;
        left: 16px;
    }

    .cart-product-row {
        position: relative;
        padding-left: 50px;
    }

    .product-image {
        width: 70px;
        height: 70px;
    }

    .product-image img {
        width: 70px;
        height: 70px;
    }

    .product-info {
        flex: 1;
        min-width: 0;
    }

    .product-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .product-quantity {
        order: 1;
    }

    .product-price {
        order: 2;
        min-width: auto;
    }

    .product-remove {
        order: 3;
        position: absolute;
        top: 16px;
        right: 12px;
    }

    .product-remove .haliysa-remove-item {
        padding: 6px;
    }

    .product-remove .haliysa-remove-item span {
        display: none;
    }

    .haliysa-qty-wrapper {
        border-radius: 6px;
    }

    .haliysa-qty-minus,
    .haliysa-qty-plus {
        width: 32px;
        height: 32px;
    }

    .haliysa-qty-input {
        width: 36px;
        height: 32px;
        font-size: 14px;
    }

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

    /* Summary */
    .haliysa-cart-summary {
        padding: 20px;
        margin-top: 20px;
    }

    .summary-title {
        font-size: 18px;
    }

    .summary-row.total-row .total-value {
        font-size: 20px;
    }

    .checkout-button-wrapper .wc-proceed-to-checkout .checkout-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ==========================================================================
   Additional WooCommerce Overrides
   ========================================================================== */

/* WC notices styling in cart */
.haliysa-cart-page .woocommerce-error,
.haliysa-cart-page .woocommerce-info,
.haliysa-cart-page .woocommerce-message {
    margin-bottom: 20px;
    border-radius: 8px;
}

/* ==========================================================================
   Coupon Section in Sidebar (matches checkout)
   ========================================================================== */

.haliysa-cart-summary .haliysa-coupon-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-toggle:hover {
    background: #f0f0f0;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-icon {
    width: 24px;
    height: 24px;
    background: #27374D;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.2s;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-form-wrapper {
    padding: 0 16px 16px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-input-group {
    display: flex;
    gap: 8px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-input-group input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-input-group input:focus {
    border-color: #27374D;
    outline: none;
    box-shadow: 0 0 0 2px rgba(39, 55, 77, 0.1);
}

.haliysa-cart-summary .haliysa-coupon-section .apply-coupon-btn {
    height: 42px;
    padding: 0 18px;
    background: #27374D;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.haliysa-cart-summary .haliysa-coupon-section .apply-coupon-btn:hover {
    background: #1a2636;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-messages {
    margin-top: 8px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-error {
    color: #e74c3c;
    font-size: 13px;
}

.haliysa-cart-summary .haliysa-coupon-section .coupon-success {
    color: #27ae60;
    font-size: 13px;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 991px) {
    .haliysa-cart-page {
        padding: 20px 10px;
    }

    .haliysa-cart-summary {
        position: relative;
        top: 0;
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .haliysa-cart-page {
        padding: 15px 10px;
    }

    /* Cart Title */
    .haliysa-cart-title h1 {
        font-size: 20px;
    }

    /* Vendor Header */
    .vendor-header {
        padding: 12px 14px;
    }

    .vendor-checkbox {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .vendor-name {
        font-size: 13px;
    }

    /* Product Row - Restructure for Mobile */
    .cart-product-row {
        flex-wrap: wrap;
        padding: 14px;
        gap: 10px;
        position: relative;
    }

    /* First row: checkbox + image + info */
    .product-checkbox {
        position: absolute;
        top: 14px;
        left: 14px;
        z-index: 2;
    }

    .checkbox-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    /* Product Image - left side */
    .product-image {
        width: 70px;
        height: 70px;
        margin-left: 30px;
    }

    .product-image img {
        width: 70px;
        height: 70px;
        object-fit: cover;
    }

    /* Product Info - next to image */
    .product-info {
        flex: 1;
        min-width: calc(100% - 120px);
    }

    .product-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
        margin-bottom: 6px;
    }

    .product-variations {
        margin-top: 6px;
    }

    .variation-item {
        font-size: 12px;
        padding: 2px 6px;
    }

    /* Second row: quantity + price + remove */
    .product-quantity {
        order: 10;
        
        margin-top: 8px;
    }

    .haliysa-qty-wrapper {
        transform: scale(0.9);
        transform-origin: left center;
    }

    .haliysa-qty-minus,
    .haliysa-qty-plus {
        width: 30px;
        height: 30px;
    }

    .haliysa-qty-input {
        width: 34px;
        height: 30px;
        font-size: 13px;
    }

    /* Price - right side of quantity */
    .product-price {
        order: 11;
        margin-left: auto;
        margin-top: 8px;
        min-width: auto;
    }

    .cart-item-total {
        font-size: 14px;
    }

    /* Remove Button */
    .product-remove {
        position: absolute;
        top: 14px;
        right: 14px;
    }

    .haliysa-remove-item {
        width: 28px;
        height: 28px;
    }

    .haliysa-remove-item i {
        font-size: 14px;
    }

    /* Cart Summary */
    .haliysa-cart-summary {
        padding: 16px;
        margin-top: 16px;
    }

    .summary-title {
        font-size: 18px;
        padding-bottom: 12px;
    }

    .summary-row {
        padding: 10px 0;
    }

    .summary-label {
        font-size: 13px;
    }

    .summary-value {
        font-size: 13px;
    }

    .summary-total .summary-value {
        font-size: 18px;
    }

    /* Free Shipping Badge */
    .haliysa-free-shipping-badge {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Coupon Section */
    .haliysa-cart-summary .haliysa-coupon-section .coupon-toggle {
        padding: 12px 14px;
    }

    .haliysa-cart-summary .haliysa-coupon-section .coupon-input-group {
        flex-direction: column;
    }

    .haliysa-cart-summary .haliysa-coupon-section .apply-coupon-btn {
        width: 100%;
    }

    /* Checkout Button */
    .checkout-button-wrapper {
        margin-top: 16px;
    }

    .checkout-button-wrapper .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .cart-product-row {
        padding: 12px;
    }

    .product-image {
        width: 60px;
        height: 60px;
        margin-left: 28px;
    }

    .product-image img {
        width: 60px;
        height: 60px;
    }

    .product-info {
        min-width: calc(100% - 100px);
    }

    .product-title {
        font-size: 13px;
    }

    .variation-item {
        font-size: 11px;
    }

    .product-quantity {
        margin-left: 28px;
    }

    .haliysa-qty-wrapper {
        transform: scale(0.85);
    }

    .cart-item-total {
        font-size: 13px;
    }
}

/* ==========================================================================
   Cart V3 (sepet.html alignment)
   ========================================================================== */

.haliysa-cart-page.haliysa-cart-v3 {
    background: #f7f7f7;
    border-radius: 0;
    padding: 32px 0;
}

.haliysa-cart-page.haliysa-cart-v3 .container {
    max-width: 1440px;
}

.haliysa-cart-v3 .section {
    margin-top: 0;
}

.haliysa-cart-v3 .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.haliysa-cart-v3 .section-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    color: #0f172a;
    font-weight: 700;
}

.haliysa-cart-v3 .section-sub {
    margin-top: 6px;
    font-size: 14px;
    color: #64748b;
}

.haliysa-cart-v3 .btn {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.haliysa-cart-v3 .btn-outline {
    color: #334155;
    background: #fff;
}

.haliysa-cart-v3 .btn-outline:hover {
    color: #27374d;
    border-color: #27374d;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #bbf7d0;
    background: #ecfdf3;
    box-shadow: none;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice.is-progress {
    border-color: #a7f3d0;
    background: #ecfdf3;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice.is-success {
    border-color: #86efac;
    background: #dcfce7;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice strong {
    display: block;
    font-size: 14px;
    color: #166534;
    line-height: 1.35;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #166534;
}

.haliysa-cart-v3 .cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.haliysa-cart-v3 .cart-list {
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.haliysa-cart-v3 .haliysa-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.haliysa-cart-v3 .haliysa-vendor-group {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
}

.haliysa-cart-v3 .vendor-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 14px;
}

.haliysa-cart-v3 .vendor-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 10px;
    background: #27374d;
}

.haliysa-cart-v3 .vendor-label,
.haliysa-cart-v3 .vendor-name {
    font-size: 13px;
}

.haliysa-cart-v3 .cart-product-row.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px 14px;
    padding: 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    align-items: start;
}

.haliysa-cart-v3 .vendor-products .cart-product-row:last-child {
    border-bottom: 0;
}

.haliysa-cart-v3 .product-checkbox {
    display: none;
}

.haliysa-cart-v3 .product-image {
    width: 96px;
    height: 96px;
    grid-column: 1;
}

.haliysa-cart-v3 .product-image img {
    width: 96px;
    height: 96px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.haliysa-cart-v3 .product-info {
    grid-column: 2;
    min-width: 0;
    padding-top: 0;
}

.haliysa-cart-v3 .product-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
    -webkit-line-clamp: 2;
}

.haliysa-cart-v3 .product-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.haliysa-cart-v3 .variation-item {
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px 8px;
}

.haliysa-cart-v3 .product-quantity {
    grid-column: 2;
    align-self: end;
}

.haliysa-cart-v3 .haliysa-qty-wrapper.qty-line {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    background: #fff;
}

.haliysa-cart-v3 .haliysa-qty-minus,
.haliysa-cart-v3 .haliysa-qty-plus {
    width: 32px;
    height: 32px;
    border: 0;
    background: #fff;
    color: #334155;
}

.haliysa-cart-v3 .haliysa-qty-input {
    width: 38px;
    height: 32px;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.haliysa-cart-v3 .product-price {
    grid-column: 3;
    grid-row: 1;
    min-width: 120px;
    text-align: right;
    align-self: start;
}

.haliysa-cart-v3 .cart-item-total {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 700;
    color: #1f2d40;
}

.haliysa-cart-v3 .cart-item-total .woocommerce-Price-currencySymbol {
    font-weight: 700;
}

.haliysa-cart-v3 .product-remove {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    justify-self: end;
    position: static;
}

.haliysa-cart-v3 .haliysa-remove-item {
    width: auto;
    height: auto;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #334155;
    background: #fff;
    font-size: 12px;
    gap: 6px;
}

.haliysa-cart-v3 .haliysa-remove-item:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff;
}

.haliysa-cart-v3 .haliysa-remove-item span {
    display: inline;
    font-weight: 600;
}

.haliysa-cart-v3 .summary-card.haliysa-cart-summary {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 130px;
}

.haliysa-cart-v3 .summary-title {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    font-size: 24px;
    color: #0f172a;
}

.haliysa-cart-v3 .summary-row {
    margin: 10px 0;
    padding: 0;
    border: 0;
    font-size: 14px;
}

.haliysa-cart-v3 .summary-row .row-label {
    color: #475569;
    font-size: 14px;
}

.haliysa-cart-v3 .summary-row .row-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.haliysa-cart-v3 .summary-row.total-row {
    border-top: 1px solid #e5e7eb;
    margin-top: 14px;
    padding-top: 14px;
}

.haliysa-cart-v3 .summary-row.total-row .row-label {
    font-size: 22px;
    color: #1f2d40;
    font-weight: 700;
}

.haliysa-cart-v3 .summary-row.total-row .total-value {
    font-size: 22px;
    color: #1f2d40;
    font-weight: 700;
}

.haliysa-cart-v3 .haliysa-coupon-section {
    margin-top: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.haliysa-cart-v3 .checkout-button-wrapper {
    margin-top: 12px;
}

.haliysa-cart-v3 .checkout-button-wrapper .wc-proceed-to-checkout .checkout-button {
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    background: #27374d;
}

.haliysa-cart-v3 .checkout-button-wrapper .wc-proceed-to-checkout .checkout-button:hover {
    background: #1f2d40;
}

.haliysa-cart-v3 .continue-shopping {
    display: none;
}

@media (max-width: 1199px) {
    .haliysa-cart-v3 .section-title {
        font-size: 28px;
    }

    .haliysa-cart-v3 .cart-item-total {
        font-size: 24px;
    }
}

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

    .haliysa-cart-v3 .summary-card.haliysa-cart-summary {
        position: static;
    }
}

@media (max-width: 767px) {
    .haliysa-cart-page.haliysa-cart-v3 {
        padding: 20px 0;
    }

    .haliysa-cart-v3 .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .haliysa-cart-v3 .section-title {
        font-size: 24px;
    }

    .haliysa-cart-v3 .cart-product-row.cart-item {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 12px;
    }

    .haliysa-cart-v3 .product-image {
        width: 78px;
        height: 78px;
    }

    .haliysa-cart-v3 .product-image img {
        width: 78px;
        height: 78px;
    }

    .haliysa-cart-v3 .product-price {
        grid-column: 2;
        grid-row: auto;
        text-align: left;
        min-width: 0;
    }

    .haliysa-cart-v3 .cart-item-total {
        font-size: 22px;
    }

    .haliysa-cart-v3 .product-remove {
        grid-column: 2;
        grid-row: auto;
        justify-self: start;
    }

    .haliysa-cart-v3 .summary-row.total-row .row-label,
    .haliysa-cart-v3 .summary-row.total-row .total-value {
        font-size: 19px;
    }
}

/* ==========================================================================
   Final Cart V3 Alignment (yeni/sepet.html)
   ========================================================================== */
.haliysa-cart-page.haliysa-cart-v3 {
    background: #f7f7f7;
    border-radius: 0;
    padding: 32px 0;
}

.haliysa-cart-v3 .section {
    margin-top: 0;
}

.haliysa-cart-v3 .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.haliysa-cart-v3 .section-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.15;
    font-weight: 700;
    color: #111827;
}

.haliysa-cart-v3 .section-sub {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.haliysa-cart-v3 .btn {
    border: 1px solid #526d82;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.haliysa-cart-v3 .btn-outline {
    background: #fff;
    color: #1f2d40;
}

.haliysa-cart-v3 .btn-outline:hover {
    color: #27374d;
    border-color: #27374d;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
    background: #ecfdf3;
    box-shadow: none;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice strong {
    display: block;
    color: #166534;
    font-size: 14px;
    line-height: 1.35;
}

.haliysa-cart-v3 .haliysa-cart-shipping-notice span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #166534;
}

.haliysa-cart-v3 .cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    margin-top: 20px;
    align-items: start;
}

.haliysa-cart-v3 .cart-list {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.haliysa-cart-v3 .haliysa-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.haliysa-cart-v3 .haliysa-vendor-group {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.haliysa-cart-v3 .vendor-header {
    display: none;
}

.haliysa-cart-v3 .vendor-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.haliysa-cart-v3 .cart-product-row.cart-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 12px;
    align-items: center;
    background: #fff;
    box-shadow: none;
}

.haliysa-cart-v3 .product-checkbox {
    display: none;
}

.haliysa-cart-v3 .product-image {
    width: 100px;
    height: 100px;
}

.haliysa-cart-v3 .product-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.haliysa-cart-v3 .product-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    color: #111827;
    -webkit-line-clamp: 2;
}

.haliysa-cart-v3 .cart-meta {
    margin-bottom: 9px;
    font-size: 12px;
    color: #6b7280;
}

.haliysa-cart-v3 .product-quantity {
    margin-top: 6px;
}

.haliysa-cart-v3 .haliysa-qty-wrapper.qty-line {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.haliysa-cart-v3 .haliysa-qty-minus,
.haliysa-cart-v3 .haliysa-qty-plus,
.haliysa-cart-v3 .haliysa-qty-input {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    text-align: center;
}

.haliysa-cart-v3 .haliysa-qty-minus,
.haliysa-cart-v3 .haliysa-qty-plus {
    border: 0;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.haliysa-cart-v3 .haliysa-qty-input {
    border: 0;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    background: #fff;
}

.haliysa-cart-v3 .product-price {
    text-align: right;
    min-width: 150px;
}

.haliysa-cart-v3 .old-price {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.haliysa-cart-v3 .cart-item-total.current-price {
    display: block;
    font-size: 20px;
    color: #1f2d40;
    font-weight: 700;
    line-height: 1.1;
}

.haliysa-cart-v3 .product-remove {
    margin-top: 10px;
}

.haliysa-cart-v3 .haliysa-remove-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #526d82;
    border-radius: 10px;
    background: #fff;
    color: #1f2d40;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 9px;
    width: auto;
    height: auto;
}

.haliysa-cart-v3 .haliysa-remove-item i {
    display: none;
}

.haliysa-cart-v3 .haliysa-remove-item span {
    display: inline;
}

.haliysa-cart-v3 .summary-card.haliysa-cart-summary {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 140px;
}

.haliysa-cart-v3 .summary-title {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    font-size: 20px;
    color: #111827;
}

.haliysa-cart-v3 .summary-row,
.haliysa-cart-v3 .summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 14px;
    gap: 10px;
}

.haliysa-cart-v3 .summary-row .row-label,
.haliysa-cart-v3 .summary-row .row-value {
    font-size: 14px;
}

.haliysa-cart-v3 .summary-row .row-label {
    color: #475569;
}

.haliysa-cart-v3 .summary-row .row-value {
    color: #1e293b;
    font-weight: 600;
}

.haliysa-cart-v3 .summary-row .row-value.is-discount,
.haliysa-cart-v3 .summary-row.coupon-row .row-value,
.haliysa-cart-v3 .summary-row.coupon-row .row-value * {
    color: #16a34a;
}

.haliysa-cart-v3 .summary-total,
.haliysa-cart-v3 .summary-row.total-row {
    border-top: 1px solid #e5e7eb;
    margin-top: 14px;
    padding-top: 14px;
}

.haliysa-cart-v3 .summary-row.total-row .row-label,
.haliysa-cart-v3 .summary-row.total-row .total-value {
    font-size: 21px;
    font-weight: 700;
    color: #1f2d40;
}

.haliysa-cart-v3 .coupon-box {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.haliysa-cart-v3 .coupon-box input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    height: 42px;
    padding: 0 10px;
    font-size: 14px;
}

.haliysa-cart-v3 .coupon-box .apply-coupon-btn {
    height: 42px;
    padding: 0 14px;
}

.haliysa-cart-v3 .coupon-messages {
    margin-top: 8px;
    font-size: 12px;
}

.haliysa-cart-v3 .summary-row .row-value ul,
.haliysa-cart-v3 .summary-row .row-value li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.haliysa-cart-v3 .checkout-button-wrapper {
    margin-top: 14px;
}

.haliysa-cart-v3 .checkout-button-wrapper .wc-proceed-to-checkout {
    margin: 0;
    padding: 0;
}

.haliysa-cart-v3 .checkout-button-wrapper .wc-proceed-to-checkout .checkout-button {
    width: 100%;
    border-radius: 12px;
    padding: 14px 18px;
    background: #1f2d40;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: 0;
}

.haliysa-cart-v3 .checkout-button-wrapper .wc-proceed-to-checkout .checkout-button:hover {
    background: #27374d;
    color: #fff;
}

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

    .haliysa-cart-v3 .summary-card.haliysa-cart-summary {
        position: static;
        top: auto;
    }
}

@media (max-width: 767px) {
    .haliysa-cart-page.haliysa-cart-v3 {
        padding: 20px 0;
    }

    .haliysa-cart-v3 .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .haliysa-cart-v3 .cart-product-row.cart-item {
        grid-template-columns: 78px 1fr;
        gap: 10px 12px;
        align-items: start;
    }

    .haliysa-cart-v3 .product-image,
    .haliysa-cart-v3 .product-image img {
        width: 78px;
        height: 78px;
    }

    .haliysa-cart-v3 .product-image {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        margin-left: 0;
    }

    .haliysa-cart-v3 .product-info {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        align-self: start;
    }

    .haliysa-cart-v3 .product-price {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        min-width: 0;
        margin-top: 4px;
        align-self: start;
        justify-self: start;
    }

    .haliysa-cart-v3 .product-remove {
        grid-column: 2;
        grid-row: 3;
        margin-top: 6px;
        justify-self: start;
        align-self: start;
    }

    .haliysa-cart-v3 .cart-item-total.current-price {
        font-size: 22px;
    }
}

.haliysa-cart-v3 .cart-empty-state {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.haliysa-cart-v3 .cart-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #1f2d40;
    font-size: 26px;
}

.haliysa-cart-v3 .cart-empty-state h2 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

.haliysa-cart-v3 .cart-empty-state p {
    margin: 8px auto 0;
    max-width: 50ch;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.haliysa-cart-v3 .cart-empty-cta {
    margin-top: 16px;
    border: 0;
    background: #1f2d40;
    color: #fff;
}

.haliysa-cart-v3 .cart-empty-cta:hover {
    background: #27374d;
    color: #fff;
}

.haliysa-cart-v3 .cart-empty-categories {
    margin-top: 20px;
}

.haliysa-cart-v3 .cart-empty-categories h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1f2937;
}

.haliysa-cart-v3 .cart-empty-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.haliysa-cart-v3 .cart-empty-category-chip {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px;
    background: #fff;
    display: grid;
    gap: 3px;
}

.haliysa-cart-v3 .cart-empty-category-chip .name {
    font-size: 13px;
    color: #111827;
    font-weight: 600;
}

.haliysa-cart-v3 .cart-empty-category-chip .count {
    font-size: 12px;
    color: #6b7280;
}

.haliysa-cart-v3 .cart-empty-category-chip:hover {
    border-color: #526d82;
}

@media (max-width: 767px) {
    .haliysa-cart-v3 .cart-empty-category-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cart V3 Wrapper Normalization (fix nested container alignment)
   ========================================================================== */

.woocommerce-cart main.site-main > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.woocommerce-cart main.site-main > .container > article,
.woocommerce-cart main.site-main > .container > article > .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-cart .haliysa-cart-page.haliysa-cart-v3 > .home-v2-container-xl {
    width: 100%;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 768px) {
    .woocommerce-cart .haliysa-cart-page.haliysa-cart-v3 > .home-v2-container-xl {
        padding-left: 5rem !important;
        padding-right: 5rem !important;
    }
}

@media (min-width: 1024px) {
    .woocommerce-cart .haliysa-cart-page.haliysa-cart-v3 > .home-v2-container-xl {
        padding-left: 10rem !important;
        padding-right: 10rem !important;
    }
}
