/* ========================================
   CART PAGE
   Scoped to .cart-page only
   ======================================== */

.cart-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.cart-page .hoot-cart-page {
    width: 100%;
    padding: 16px 0 64px;
}

.woocommerce-cart .hoot-page-section {
    padding: 28px 0 40px;
}

.woocommerce-cart .hoot-page-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
}

.woocommerce-cart .hoot-page-title {
    font-size: clamp(2rem, 4vw, 2.85rem);
    line-height: 1.02;
}

.cart-page .hoot-cart-page.is-updating {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity var(--hoot-transition);
}

.cart-page .cart-empty {
    min-height: 48vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 72px 24px;
    background: var(--hoot-card);
    border: 1px solid var(--hoot-border);
    border-radius: 20px;
}

.cart-page .cart-empty svg {
    color: var(--hoot-muted-fg);
    margin-bottom: 8px;
}

.cart-page .cart-empty h2 {
    font-family: var(--hoot-font-heading);
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.cart-page .cart-empty p {
    max-width: 520px;
    color: var(--hoot-muted-fg);
}

.cart-page .return-to-shop,
.woocommerce-cart .woocommerce .return-to-shop {
    margin-top: 18px;
}

.woocommerce-cart .wc-empty-cart-message {
    margin-bottom: 14px;
}

.woocommerce-cart .woocommerce .cart-empty.woocommerce-info,
.cart-page .cart-empty {
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(245,242,238,0.72) 0%, rgba(250,248,245,0.96) 100%);
}

.cart-page .return-to-shop .button,
.cart-page .return-to-shop .wc-backward,
.woocommerce-cart .woocommerce .return-to-shop .button,
.woocommerce-cart .woocommerce .return-to-shop .wc-backward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--hoot-primary) !important;
    border-radius: 12px;
    background: var(--hoot-primary) !important;
    color: var(--hoot-primary-fg) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: none !important;
}

.cart-page .return-to-shop .button:hover,
.cart-page .return-to-shop .wc-backward:hover,
.woocommerce-cart .woocommerce .return-to-shop .button:hover,
.woocommerce-cart .woocommerce .return-to-shop .wc-backward:hover {
    border-color: var(--hoot-primary-light) !important;
    background: var(--hoot-primary-light) !important;
    color: var(--hoot-primary-fg) !important;
}

.cart-page .woocommerce-cart-form {
    display: block;
    width: 100%;
}

.cart-page .cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 400px);
    gap: 36px;
    align-items: start;
}

.cart-page .cart-items {
    min-width: 0;
}

.cart-page .cart-item {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--hoot-border);
}

.cart-page .cart-item:first-child {
    padding-top: 0;
}

.cart-page .cart-item-image {
    width: 124px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: var(--hoot-card);
}

.cart-page .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-page .cart-item-details {
    min-width: 0;
}

.cart-page .cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.cart-page .cart-item-title {
    margin: 0 0 8px;
    font-family: var(--hoot-font-heading);
    font-size: 1.85rem;
    line-height: 1.1;
}

.cart-page .cart-item-title a {
    text-decoration: none;
}

.cart-page .cart-item-title a:hover {
    color: var(--hoot-accent);
}

.cart-page .cart-item-price {
    white-space: nowrap;
    font-family: var(--hoot-font-price);
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-page .cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.cart-page .cart-item-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.cart-page .cart-item-qty {
    display: flex;
    align-items: center;
}

.cart-page .cart-item-qty .quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--hoot-border);
    border-radius: 12px;
    background: #fff;
}

.cart-page .cart-item-qty label {
    display: none;
}

.cart-page .cart-item-qty input.qty {
    width: 64px;
    min-height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hoot-fg);
    font: inherit;
    text-align: center;
}

.cart-page .cart-item-qty input.qty:focus {
    outline: none;
}

.cart-page .qty-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--hoot-border);
    border-radius: 12px;
    background: #fff;
}

.cart-page .cart-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(192, 115, 80, 0.28);
    border-radius: 12px;
    color: var(--hoot-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.cart-page .cart-remove-btn:hover {
    background: rgba(192, 115, 80, 0.08);
}

.cart-page .cart-item-wishlist .woosw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--hoot-border);
    border-radius: 12px;
    background: rgba(250, 248, 245, 0.72);
    color: var(--hoot-fg);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.cart-page .cart-item-wishlist .woosw-btn:hover,
.cart-page .cart-item-wishlist .woosw-btn.woosw-added {
    border-color: var(--hoot-primary);
    color: var(--hoot-primary);
    background: rgba(107, 91, 78, 0.08);
}

.cart-page .cart-item-wishlist .woosw-btn .woosw-btn-icon {
    margin-right: 6px;
}

.cart-page .wc-item-meta {
    margin-top: 8px;
    color: var(--hoot-muted-fg);
    font-size: 13px;
}

.cart-page .wc-item-meta dt,
.cart-page .wc-item-meta dd {
    display: inline;
}

.cart-page .wc-item-meta dd {
    margin-right: 10px;
}

.cart-page .cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    flex-wrap: wrap;
}

.cart-page .cart-actions .btn {
    min-height: 50px;
    padding-inline: 24px;
}

.cart-page .cart-auto-update-note {
    color: var(--hoot-muted-fg);
    font-size: 13px;
}

.cart-page .cart-summary {
    position: sticky;
    top: calc(var(--hoot-header-height) + 20px);
    padding: 28px;
    border: 1px solid var(--hoot-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #f7f3ee 0%, #fbf8f4 100%);
}

.cart-page .cart-summary h3 {
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hoot-border);
    font-family: var(--hoot-font-heading);
    font-size: 2rem;
    line-height: 1.1;
}

.cart-page .summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 14px;
}

.cart-page .summary-row > span:last-child {
    text-align: right;
}

.cart-page .summary-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--hoot-border);
}

.cart-page .total-row {
    align-items: center;
    font-family: var(--hoot-font-price);
    font-size: 1.65rem;
    font-weight: 600;
}

.cart-page .coupon-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 20px 0;
}

.cart-page .coupon-input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--hoot-border);
    border-radius: 12px;
    background: #fff;
    color: var(--hoot-fg);
    font: inherit;
}

.cart-page .coupon-input:focus {
    outline: none;
    border-color: var(--hoot-primary);
    box-shadow: 0 0 0 3px rgba(107, 91, 78, 0.12);
}

.cart-page .coupon-btn {
    min-width: 110px;
    min-height: 48px;
}

.cart-page .checkout-btn-wrap {
    margin: 20px 0 16px;
}

.cart-page .checkout-btn-wrap .checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 14px 24px;
    border-radius: 14px;
    border: 0 !important;
    background: var(--hoot-primary) !important;
    color: var(--hoot-primary-fg) !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: none !important;
}

.cart-page .checkout-btn-wrap .checkout-button:hover {
    background: var(--hoot-primary-light) !important;
}

.cart-page .hoot-trust-badges {
    margin-top: 18px;
}

@media (max-width: 1024px) {
    .cart-page {
        width: 100%;
        padding: 0;
    }

    .cart-page .cart-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(300px, 360px);
        gap: 28px;
    }

    .cart-page .cart-item {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 18px;
    }

    .cart-page .cart-item-image {
        width: 108px;
    }

    .cart-page .cart-item-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .cart-page {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .cart-page .hoot-cart-page {
        padding: 12px 0 48px;
    }

    .woocommerce-cart .hoot-page-section {
        padding: 20px 0 28px;
    }

    .woocommerce-cart .hoot-page-header {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .cart-page .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-page .cart-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
        padding: 20px 0;
    }

    .cart-page .cart-item-image {
        width: 88px;
        border-radius: 14px;
    }

    .cart-page .cart-item-top,
    .cart-page .cart-item-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-page .cart-item-title {
        font-size: 1.35rem;
    }

    .cart-page .cart-item-price {
        font-size: 1.3rem;
    }

    .cart-page .cart-item-qty,
    .cart-page .cart-remove-btn,
    .cart-page .cart-actions .btn,
    .cart-page .coupon-btn {
        width: 100%;
    }

    .cart-page .cart-item-qty .quantity,
    .cart-page .coupon-section {
        width: 100%;
    }

    .cart-page .cart-actions {
        align-items: stretch;
    }

    .cart-page .cart-summary {
        position: static;
        top: auto;
        padding: 24px 18px;
    }

    .cart-page .coupon-section {
        grid-template-columns: 1fr;
    }
}
