/*
 * ============================================================================
 *  WooWidgets – Modern Cart Stylesheet
 *  Matching the Checkout design system with Cyan theme
 * ============================================================================
 */

/* Load Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Override */
table.wc-block-cart-items.wp-block-woocommerce-cart-line-items-block {
    border-collapse: unset !important;
    border-bottom: 0px !important;
}

tr.wc-block-cart-items__header th {
    border-block-start: unset !important;
    border-block-end: unset !important;

}

.wc-block-components-totals-wrapper {
    padding: 0px !important;
}

.wc-block-components-totals-wrapper {
    border-top: 0px !important;
}

.wc-block-cart .wp-block-woocommerce-cart-order-summary-block {
    border-bottom: 0 !important;
    margin-bottom: 0px !important;
}

@media only screen and (min-width: 700px) {
    .wc-block-cart__main .wc-block-cart-items td {
        border-top: 0px !important;
    }

    .wc-block-components-product-badge.wc-block-components-sale-badge {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CART WRAPPER & LAYOUT (Matching Checkout)
   ═══════════════════════════════════════════════════════════════════════════ */

.wp-block-woocommerce-cart,
.wc-block-cart {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #ffffff !important;

    border-radius: 5px !important;
    max-width: 1440px;
    width: 100%;
    margin: 0rem auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    align-items: flex-start !important;
    line-height: 1.6;
}

.wc-block-cart *,
.wc-block-cart *::before,
.wc-block-cart *::after {
    box-sizing: border-box;
}

/* Main Content (Cart Items) */
.wc-block-cart__main,
.wc-block-components-main {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 5px !important;
    padding: 1.5rem 1.5rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

/* Sidebar (Totals) */
.wc-block-cart__sidebar,
.wc-block-components-sidebar {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 5px !important;
    padding: 1rem 1em !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    position: sticky;
    top: 2rem;
    flex: 0 0 400px !important;
    min-width: 350px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CART TABLE
   ═══════════════════════════════════════════════════════════════════════════ */

.wc-block-cart-items,
table.wc-block-cart-items {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* Table Header */
.wc-block-cart-items__header th {
    padding-bottom: 1rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    text-align: left !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #6b7280 !important;
}

th.wc-block-cart-items__header-total {
    text-align: right !important;
    padding-right: 0px !important;
}

/* Table Rows */
.wc-block-cart-items__row {
    border-bottom: 1px solid #f3f4f6 !important;
}

.wc-block-cart-items__row:last-child {
    border-bottom: none !important;
}

.wc-block-cart-items__row td {
    padding: 0.5rem 0 !important;
    vertical-align: top !important;
}

/* Product Image */
.wc-block-cart-item__image {
    width: 100px !important;
    padding-right: 1.5rem !important;
}

.wc-block-cart-item__image img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 5px !important;
    border: 1px solid #e5e7eb !important;
    object-fit: cover !important;
}

/* Product Details */
.wc-block-cart-item__product {
    padding-right: 1rem !important;
}

.wc-block-components-product-name {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    display: block !important;
    margin-bottom: 0.25rem !important;
}

.wc-block-components-product-name:hover {
    color: #4BC2E5 !important;
}

.wc-block-cart-item__prices {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-bottom: 0.75rem !important;
}

/* Hide product description */
.wc-block-components-product-metadata {
    display: none !important;
}

/* Quantity Selector */
.wc-block-cart-item__quantity {
    display: flex !important;
    align-items: start !important;
    gap: 0rem !important;
    margin-top: 0.5rem !important;
}

.wc-block-components-quantity-selector {
    display: inline-flex !important;
    align-items: center !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    height: 36px;
}

.wc-block-components-quantity-selector__input {
    width: 3.5rem !important;
    height: 2.5rem !important;
    border: none !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    color: #111827 !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.wc-block-components-quantity-selector__input:focus {
    outline: none !important;
    box-shadow: unset !important;
}


.wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.wc-block-components-quantity-selector__button {
    width: 2rem !important;
    height: 2.5rem !important;
    border: none !important;
    background: transparent !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wc-block-components-quantity-selector__button:hover:not(:disabled) {
    background: #f3f4f6 !important;
    color: #4BC2E5 !important;
}

.wc-block-components-quantity-selector__button:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* Remove Button */
.wc-block-cart-item__remove-link {
    font-size: 0.8125rem !important;
    color: #ef4444 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.wc-block-cart-item__remove-link:hover {
    text-decoration: underline !important;
    color: #dc2626 !important;
}

/* Row Total */
.wc-block-cart-item__total {
    text-align: right !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR TOTALS
   ═══════════════════════════════════════════════════════════════════════════ */

.wp-block-woocommerce-cart-order-summary-heading-block {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 1.5rem 0 !important;
    padding-bottom: 0rem !important;
    border-bottom: 0px solid #e5e7eb !important;
}

/* Coupon Section */
.wc-block-components-totals-coupon {
    margin-bottom: 1.5rem !important;
    padding-bottom: 0 !important;
    border-bottom: 0px solid #e5e7eb !important;
}

.wc-block-components-panel__button {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #4BC2E5 !important;
    font-weight: 500 !important;
    font-size: 0.9375rem !important;
    cursor: pointer !important;
}

.wc-block-components-panel__button-icon {
    fill: #4BC2E5 !important;
}

/* Coupon Form */
.wc-block-components-totals-coupon__form {
    display: flex !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
}

/* Coupon Input */
.wc-block-components-totals-coupon__input {
    flex: 1 !important;
    position: relative !important;
}

.wc-block-components-totals-coupon__input input {
    width: 100% !important;
    height: 50px !important;
    padding: 0.875rem 1rem !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 5px !important;
    font-size: 0.9375rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #111827 !important;
    background-color: #ffffff !important;
    outline: none !important;
    transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wc-block-components-totals-coupon__input input:hover {
    border-color: #9ca3af !important;
}

.wc-block-components-totals-coupon__input input:focus {
    border-color: #4BC2E5 !important;
    box-shadow: 0 0 0 4px rgba(75, 194, 229, 0.15) !important;
}

/* Coupon Button */
.wc-block-components-totals-coupon__button,
button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button.contained {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 0 1rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    text-decoration: none !important;
    color: #4BC2E5 !important;
    background: transparent !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), background 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* When button is enabled (coupon entered) */
.wc-block-components-totals-coupon__button:not(:disabled),
button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button.contained:not(:disabled) {
    color: #ffffff !important;
    background: linear-gradient(135deg, #4BC2E5, #0891b2) !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(75, 194, 229, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.wc-block-components-totals-coupon__button:not(:disabled):hover {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
    box-shadow: 0 4px 12px rgba(75, 194, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
    color: #ffffff !important;
}

.wc-block-components-totals-coupon__button:not(:disabled):active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(75, 194, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Disabled state (no coupon entered) */
.wc-block-components-totals-coupon__button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Totals Items */
.wc-block-components-totals-item {
    display: flex !important;
    justify-content: space-between !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.wc-block-components-totals-item__label {
    color: #6b7280 !important;
    font-size: 0.9375rem !important;
}

.wc-block-components-totals-item__value {
    font-weight: 600 !important;
    color: #111827 !important;
}

/* Footer Total */
.wc-block-components-totals-footer-item {
    margin-top: 1rem !important;
    padding-top: 0rem !important;
    border-top: 0px solid #e5e7eb !important;
    border-bottom: none !important;
    padding-bottom: 0px !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKOUT BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.wc-block-cart__submit {
    margin-top: 1.5rem !important;
}

.wc-block-cart__submit-button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 1rem 2rem !important;
    border-radius: 5px !important;
    background: linear-gradient(135deg, #4BC2E5, #0891b2) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(75, 194, 229, 0.25) !important;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wc-block-cart__submit-button:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(75, 194, 229, 0.35) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

    .wp-block-woocommerce-cart,
    .wc-block-cart {
        flex-direction: column !important;
    }

    .wc-block-cart__main,
    .wc-block-cart__sidebar {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    .wc-block-cart__sidebar {
        position: static !important;
    }
}

@media (max-width: 768px) {
    .wc-block-cart-item__image img {
        width: 60px !important;
        height: 60px !important;
    }

    .wc-block-cart__main,
    .wc-block-components-main {
        padding: 0rem 1rem !important;
    }

    .wc-block-cart-items__header {
        display: none !important;
    }

    .wc-block-cart-items__row {
        padding: 10px 0px !important;
        gap: 10px;
    }

    .wc-block-cart-items__row td {
        display: block !important;

        padding: 0.5rem 0 !important;
    }

    .wc-block-cart-item__image {
        width: 60px !important;
        text-align: center !important;
        padding: 0 0 1rem 0 !important;
    }

    .wc-block-cart-item__image img {
        margin: 0 auto !important;
    }

    .wc-block-cart-item__product {
        padding-right: 0 !important;
    }

    .wc-block-cart-item__total {
        text-align: left !important;
        padding-top: 1rem !important;
        border-top: 1px solid #f3f4f6 !important;
    }

    table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
    }

    table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-quantity-selector {
        margin-bottom: 0px;
    }

    td.wc-block-cart-item__total {
        display: none !important;
    }
}