/* ================================================
   WOOCOMMERCE BLOCKS - MOBILE-ONLY OVERRIDES
   Only applies to screens 767px and below
   Desktop/Tablet layouts remain unchanged
   ================================================ */

/* ================================================
   MOBILE STYLES ONLY (max-width: 767px)
   ================================================ */
@media (max-width: 767px) {

    /* CSS Variables for Mobile */
    :root {
        --hm-mobile-padding: 16px;
        --hm-card-radius: 14px;
        --hm-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        --hm-section-spacing: 24px;
        --hm-primary: #10b981;
        --hm-primary-dark: #059669;
        --hm-text: #1f2937;
        --hm-text-light: #6b7280;
        --hm-border: #e5e7eb;
        --hm-bg-light: #f8fafc;
        --hm-bg-highlight: #f0fdf4;
    }

    /* ================================================
       CART PAGE - MOBILE
       ================================================ */

    /* Main Container - Never touch edges */
    .woocommerce-cart .wp-block-woocommerce-cart,
    .wc-block-cart {
        padding: 20px 16px 40px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Page Title */
    .woocommerce-cart .entry-title,
    .woocommerce-cart h1.wp-block-post-title {
        text-align: center !important;
        font-size: 24px !important;
        font-weight: 700 !important;
        color: var(--hm-text) !important;
        margin: 0 0 20px 0 !important;
        padding: 0 16px 14px !important;
        border-bottom: 3px solid var(--hm-primary) !important;
    }

    /* Cart Items Container */
    .wc-block-cart__main,
    .wc-block-cart .wp-block-woocommerce-cart-items-block {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Individual Cart Item - Compact Horizontal Card */
    .wc-block-cart-items__row {
        background: #ffffff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        border: 1px solid #e5e7eb !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        position: relative !important;
    }

    .wc-block-cart-items__row:last-child {
        margin-bottom: 0 !important;
    }

    /* Product Image - Left Side */
    .wc-block-cart-item__image {
        width: 80px !important;
        min-width: 80px !important;
        flex-shrink: 0 !important;
    }

    .wc-block-cart-item__image img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    }

    /* Product Details - Right Side */
    .wc-block-cart-item__product {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    /* Product Name */
    .wc-block-cart-item__product .wc-block-components-product-name {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        text-decoration: none !important;
        line-height: 1.4 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* HIDE Long Product Description */
    .wc-block-cart-item__product .wc-block-components-product-metadata,
    .wc-block-cart-item__product .wc-block-components-product-details,
    .wc-block-cart-item__product p:not(.wc-block-components-product-name),
    .wc-block-cart-item__product .wc-block-components-product-metadata__description {
        display: none !important;
    }

    /* Product Price */
    .wc-block-cart-item__product .wc-block-components-product-price {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #10b981 !important;
    }

    .wc-block-cart-item__product .wc-block-components-product-price del {
        color: #9ca3af !important;
        font-size: 13px !important;
        font-weight: 400 !important;
    }

    .wc-block-cart-item__product .wc-block-components-product-price ins {
        text-decoration: none !important;
    }

    /* Quantity Controls */
    .wc-block-cart-item__quantity {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin-top: 8px !important;
    }

    .wc-block-components-quantity-selector {
        display: inline-flex !important;
        align-items: center !important;
        background: #f8fafc !important;
        border-radius: 8px !important;
        border: 1px solid #e5e7eb !important;
        overflow: hidden !important;
    }

    .wc-block-components-quantity-selector__button {
        width: 32px !important;
        height: 36px !important;
        background: transparent !important;
        border: none !important;
        color: #1f2937 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .wc-block-components-quantity-selector__input {
        width: 40px !important;
        height: 36px !important;
        border: none !important;
        background: #fff !important;
        text-align: center !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        -moz-appearance: textfield !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;
    }

    /* Remove Item Link */
    .wc-block-cart-item__remove-link {
        font-size: 13px !important;
        color: #ef4444 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }

    /* Item Total */
    .wc-block-cart-item__total {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        padding-top: 12px !important;
        margin-top: 8px !important;
        border-top: 1px dashed #e5e7eb !important;
    }

    .wc-block-cart-item__total .wc-block-components-product-price {
        font-size: 17px !important;
        font-weight: 700 !important;
        color: #10b981 !important;
    }

    /* ================================================
       CART SIDEBAR - Coupon & Totals
       ================================================ */

    .wc-block-cart__sidebar,
    .wc-block-cart .wp-block-woocommerce-cart-totals-block {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin-top: 24px !important;
    }

    /* Coupon Section Card */
    .wc-block-components-totals-coupon {
        background: #ffffff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        border: 1px solid #e5e7eb !important;
    }

    .wc-block-components-totals-coupon__button {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    .wc-block-components-totals-coupon__content {
        margin-top: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .wc-block-components-totals-coupon__content input {
        height: 48px !important;
        padding: 0 16px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        font-size: 14px !important;
        width: 100% !important;
    }

    .wc-block-components-totals-coupon__content input:focus {
        border-color: #10b981 !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    }

    .wc-block-components-totals-coupon .wc-block-components-button {
        height: 48px !important;
        background: #1f2937 !important;
        color: #fff !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        width: 100% !important;
        border: none !important;
    }

    /* Order Total - Highlighted Card */
    .wc-block-components-totals-wrapper {
        background: #f0fdf4 !important;
        border-radius: 14px !important;
        padding: 20px !important;
        border: 1px solid #bbf7d0 !important;
    }

    .wc-block-components-totals-item {
        padding: 12px 0 !important;
        border-bottom: 1px dashed #bbf7d0 !important;
    }

    .wc-block-components-totals-item:last-child {
        border-bottom: none !important;
    }

    .wc-block-components-totals-item__label {
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #6b7280 !important;
    }

    .wc-block-components-totals-item__value {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    /* Total Amount - Larger */
    .wc-block-components-totals-footer-item {
        padding-top: 16px !important;
        margin-top: 8px !important;
    }

    .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
    }

    .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
        font-size: 24px !important;
        font-weight: 800 !important;
        color: #10b981 !important;
    }

    /* Proceed to Checkout Button */
    .wc-block-cart__submit-container {
        margin-top: 24px !important;
    }

    .wc-block-cart__submit-button {
        width: 100% !important;
        height: 56px !important;
        background: linear-gradient(135deg, #10b981, #059669) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 14px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    }

    /* ================================================
       CHECKOUT PAGE - MOBILE
       ================================================ */

    /* Main Container */
    .woocommerce-checkout .wp-block-woocommerce-checkout,
    .wc-block-checkout {
        padding: 20px 16px 40px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Page Title */
    .woocommerce-checkout .entry-title,
    .woocommerce-checkout h1.wp-block-post-title {
        text-align: center !important;
        font-size: 24px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin: 0 0 20px 0 !important;
        padding: 0 16px 14px !important;
        border-bottom: 3px solid #10b981 !important;
    }

    /* Checkout Main - Centered */
    .wc-block-checkout__main,
    .wc-block-checkout .wc-block-components-main {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Each Section as Card */
    .wc-block-components-checkout-step {
        background: #ffffff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 20px 16px !important;
        margin-bottom: 24px !important;
        border: 1px solid #e5e7eb !important;
    }

    .wc-block-components-checkout-step:last-child {
        margin-bottom: 0 !important;
    }

    /* Section Headings */
    .wc-block-components-checkout-step__heading {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    /* Form Labels - Left Padding */
    .wc-block-components-text-input label,
    .wc-block-checkout label,
    .wc-block-components-combobox label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        margin-bottom: 6px !important;
        padding-left: 3px !important;
        display: block !important;
    }

    /* Input Fields - Larger Height */
    .wc-block-components-text-input input,
    .wc-block-components-text-input textarea,
    .wc-block-components-combobox input,
    .wc-block-checkout input[type="text"],
    .wc-block-checkout input[type="email"],
    .wc-block-checkout input[type="tel"],
    .wc-block-checkout select {
        height: 48px !important;
        padding: 0 14px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        font-size: 15px !important;
        color: #1f2937 !important;
        background: #fff !important;
        width: 100% !important;
    }

    .wc-block-components-text-input input:focus,
    .wc-block-checkout input:focus,
    .wc-block-checkout select:focus {
        border-color: #10b981 !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12) !important;
    }

    /* Form Row Spacing */
    .wc-block-components-text-input,
    .wc-block-components-combobox {
        margin-bottom: 16px !important;
    }

    /* Select Dropdowns */
    .wc-block-components-combobox .wc-block-components-combobox__control {
        height: 48px !important;
        border-radius: 10px !important;
    }

    /* Checkbox Styling */
    .wc-block-components-checkbox__input,
    .wc-block-checkout input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        border-radius: 5px !important;
        border: 2px solid #e5e7eb !important;
    }

    /* ================================================
       CHECKOUT ORDER SUMMARY SIDEBAR
       ================================================ */

    .wc-block-checkout__sidebar,
    .wc-block-checkout .wc-block-components-sidebar {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin-top: 24px !important;
    }

    /* Order Summary Card */
    .wc-block-components-order-summary {
        background: #ffffff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 16px !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 16px !important;
    }

    .wc-block-components-order-summary__button {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        padding: 0 !important;
    }

    /* Order Summary Items - Compact */
    .wc-block-components-order-summary-item {
        display: flex !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .wc-block-components-order-summary-item:last-child {
        border-bottom: none !important;
    }

    /* Product Image */
    .wc-block-components-order-summary-item__image {
        width: 50px !important;
        min-width: 50px !important;
        height: 50px !important;
    }

    .wc-block-components-order-summary-item__image img {
        width: 50px !important;
        height: 50px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    /* Product Details */
    .wc-block-components-order-summary-item__description {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .wc-block-components-order-summary-item__description .wc-block-components-product-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* HIDE Description in Order Summary */
    .wc-block-components-order-summary-item__description .wc-block-components-product-metadata,
    .wc-block-components-order-summary-item__description p {
        display: none !important;
    }

    /* Quantity Badge */
    .wc-block-components-order-summary-item__quantity {
        font-size: 12px !important;
        color: #6b7280 !important;
        margin-top: 4px !important;
    }

    /* Item Price */
    .wc-block-components-order-summary-item__total-price {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #10b981 !important;
        white-space: nowrap !important;
    }

    /* Checkout Totals */
    .wc-block-checkout .wc-block-components-totals-wrapper {
        background: #f0fdf4 !important;
        border-radius: 14px !important;
        padding: 16px !important;
        border: 1px solid #bbf7d0 !important;
        margin-bottom: 16px !important;
    }

    .wc-block-checkout .wc-block-components-totals-item {
        padding: 10px 0 !important;
    }

    /* Payment Options */
    .wc-block-components-radio-control__option {
        padding: 14px !important;
        background: #f8fafc !important;
        border-radius: 10px !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 10px !important;
    }

    .wc-block-components-radio-control__option.wc-block-components-radio-control__option--checked {
        border-color: #10b981 !important;
        background: #f0fdf4 !important;
    }

    .wc-block-components-radio-control__label {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    /* Payment Error Alert */
    .wc-block-components-notice-banner.is-error {
        background: #fef2f2 !important;
        border: 1px solid #fecaca !important;
        border-radius: 10px !important;
        padding: 14px !important;
        margin-bottom: 16px !important;
    }

    /* Place Order Button */
    .wc-block-checkout__actions {
        margin-top: 24px !important;
    }

    .wc-block-components-checkout-place-order-button {
        width: 100% !important;
        height: 56px !important;
        background: linear-gradient(135deg, #10b981, #059669) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 14px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    }

    /* Terms & Conditions */
    .wc-block-checkout__terms {
        font-size: 12px !important;
        color: #6b7280 !important;
        text-align: center !important;
        margin-top: 12px !important;
    }

    .wc-block-checkout__terms a {
        color: #10b981 !important;
    }

    /* Return to Cart */
    .wc-block-components-checkout-return-to-cart-button {
        display: block !important;
        text-align: center !important;
        margin-top: 16px !important;
        font-size: 14px !important;
        color: #6b7280 !important;
        text-decoration: none !important;
    }

    /* Empty Cart State */
    .wc-block-cart--is-empty {
        text-align: center !important;
        padding: 60px 20px !important;
    }

    .wc-block-cart--is-empty .wc-block-cart__empty-cart__title {
        font-size: 22px !important;
        color: #1f2937 !important;
        margin-bottom: 12px !important;
    }

    .wc-block-cart--is-empty p {
        color: #6b7280 !important;
        margin-bottom: 24px !important;
    }

    .wc-block-cart--is-empty .wc-block-components-button {
        background: #10b981 !important;
        color: #fff !important;
        padding: 14px 28px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        border: none !important;
    }

    /* Validation Errors */
    .wc-block-components-validation-error {
        color: #ef4444 !important;
        font-size: 12px !important;
        margin-top: 4px !important;
        padding-left: 3px !important;
    }

    /* Coupon Applied */
    .wc-block-components-chip {
        background: #f0fdf4 !important;
        border: 1px solid #bbf7d0 !important;
        border-radius: 20px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
        color: #059669 !important;
    }

} /* END Mobile Media Query */
