/**
 * Quero Tudo Natural - Modern Cart Styles
 * Design moderno e limpo para pagina do carrinho
 * @package QueroTudoNatural
 */

/* ==========================================================================
   CART PAGE LAYOUT
   ========================================================================== */
.qtn-cart-page {
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

.qtn-cart-page .max-w-5xl {
    max-width: 1400px;
}

/* Page Header */
.qtn-cart-page .mb-10.text-center h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.qtn-cart-page .mb-10.text-center p {
    font-size: 0.9375rem;
    color: #6b7280;
}

/* ==========================================================================
   MAIN GRID - Two Columns Layout
   ========================================================================== */
.qtn-cart-page .lg\:grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .qtn-cart-page .lg\:grid {
        grid-template-columns: 1fr 400px;
        gap: 2rem;
        align-items: start;
    }
}

.qtn-cart-page .lg\:col-span-2 {
    grid-column: 1;
}

/* ==========================================================================
   CART FORM CONTAINER
   ========================================================================== */
.qtn-cart-page .woocommerce-cart-form {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.qtn-cart-page .divide-y {
    border-bottom: none;
}

/* ==========================================================================
   INDIVIDUAL CART ITEM
   ========================================================================== */
.qtn-cart-page .cart-item {
    padding: 1.5rem !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.qtn-cart-page .cart-item:last-child {
    border-bottom: none;
}

.qtn-cart-page .cart-item:hover {
    background-color: #fafafa;
}

.qtn-cart-page .cart-item .flex.gap-4 {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Product Image */
.qtn-cart-page .cart-item .flex-shrink-0 a {
    display: block;
}

.qtn-cart-page .cart-item img {
    width: 90px !important;
    height: 90px !important;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    transition: transform 0.2s ease;
}

.qtn-cart-page .cart-item img:hover {
    transform: scale(1.03);
}

@media (min-width: 640px) {
    .qtn-cart-page .cart-item img {
        width: 100px !important;
        height: 100px !important;
    }
}

/* Product Details */
.qtn-cart-page .cart-item .flex-1 {
    min-width: 0;
    flex: 1;
}

/* Product Name */
.qtn-cart-page .cart-item a.text-sm,
.qtn-cart-page .cart-item a.text-base,
.qtn-cart-page .cart-item span.text-sm,
.qtn-cart-page .cart-item span.text-base {
    font-size: 0.9375rem !important;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none;
    display: block;
    transition: color 0.15s ease;
}

.qtn-cart-page .cart-item a.text-sm:hover,
.qtn-cart-page .cart-item a.text-base:hover {
    color: #2d5a27;
}

/* Variation Data */
.qtn-cart-page .cart-item .text-xs.text-gray-500 {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Unit Price */
.qtn-cart-page .cart-item .mt-1.text-sm.text-gray-500 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

/* Subtotal Desktop */
.qtn-cart-page .cart-item .hidden.sm\:block .text-sm.font-medium {
    font-size: 1.125rem !important;
    font-weight: 700;
    color: #2d5a27;
}

/* Subtotal Mobile */
.qtn-cart-page .cart-item .sm\:hidden.text-right .text-sm.font-medium {
    font-size: 1rem !important;
    font-weight: 700;
    color: #2d5a27;
}

/* ==========================================================================
   QUANTITY CONTROLS
   ========================================================================== */
.qtn-cart-page .cart-item .mt-4.flex {
    margin-top: 1rem;
}

.qtn-cart-page .quantity-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.qtn-cart-page .quantity-wrapper:focus-within {
    border-color: #2d5a27;
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.1);
}

.qtn-cart-page .quantity .qty {
    width: 48px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    -moz-appearance: textfield;
}

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

.qtn-cart-page .quantity .qty:focus {
    outline: none;
}

/* Plus/Minus buttons */
.qtn-cart-page .quantity-wrapper button,
.qtn-cart-page .quantity-wrapper .qty-btn,
.qtn-cart-page .quantity button {
    width: 34px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    border: none;
    color: #6b7280;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.qtn-cart-page .quantity-wrapper button:hover,
.qtn-cart-page .quantity-wrapper .qty-btn:hover,
.qtn-cart-page .quantity button:hover {
    background-color: #f3f4f6;
    color: #1a1a1a;
}

/* Remove Button */
.qtn-cart-page .cart-item a[href*="remove"] {
    font-size: 0.8125rem;
    color: #9ca3af;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.qtn-cart-page .cart-item a[href*="remove"]:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* ==========================================================================
   COUPON & ACTIONS SECTION
   ========================================================================== */
.qtn-cart-page .mt-6.pt-6.border-t {
    margin-top: 0 !important;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #fafafa;
}

.qtn-cart-page .coupon {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.qtn-cart-page .coupon input[type="text"] {
    flex: 1;
    min-width: 130px;
    max-width: 180px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    color: #1a1a1a;
    transition: all 0.15s ease;
}

.qtn-cart-page .coupon input[type="text"]:focus {
    outline: none;
    border-color: #2d5a27;
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.1);
}

.qtn-cart-page .coupon input[type="text"]::placeholder {
    color: #9ca3af;
}

.qtn-cart-page .coupon button {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d5a27;
    background-color: #fff;
    border: 1.5px solid #2d5a27;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.qtn-cart-page .coupon button:hover {
    background-color: #2d5a27;
    color: #fff;
}

/* Update Cart Button */
.qtn-cart-page button[name="update_cart"] {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.qtn-cart-page button[name="update_cart"]:hover {
    color: #1a1a1a;
}

.qtn-cart-page button[name="update_cart"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Continue Shopping Link */
.qtn-cart-page .mt-8 a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease;
}

.qtn-cart-page .mt-8 a:hover {
    color: #2d5a27;
}

/* ==========================================================================
   CART TOTALS SIDEBAR (Right Column)
   ========================================================================== */
.qtn-cart-page .cart-collaterals {
    margin-top: 0;
}

.qtn-cart-page .lg\:mt-0 {
    margin-top: 0;
}

.qtn-cart-page .cart_totals {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .qtn-cart-page .cart_totals {
        position: sticky;
        top: 100px;
    }
}

/* Summary Header */
.qtn-cart-page .cart_totals .bg-gray-50 {
    background-color: #fff;
    border-radius: 0;
    padding: 0;
}

.qtn-cart-page .cart_totals h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    padding: 1.25rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Totals Content */
.qtn-cart-page .cart_totals .space-y-4 {
    padding: 1.25rem 1.5rem;
}

/* Individual Total Rows */
.qtn-cart-page .cart_totals .flex.justify-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
}

.qtn-cart-page .cart_totals .text-gray-600 {
    font-size: 0.9375rem;
    color: #6b7280;
}

.qtn-cart-page .cart_totals .text-neutral {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
}

/* Coupon Applied */
.qtn-cart-page .cart_totals .text-green-600 {
    color: #059669 !important;
}

/* ==========================================================================
   SHIPPING SECTION - COMPLETELY REDESIGNED
   ========================================================================== */
.qtn-cart-page .cart_totals .pt-4.border-t {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

/* Hide default WooCommerce shipping table */
.qtn-cart-page .woocommerce-shipping-totals {
    display: none !important;
}

/* Our Custom Shipping Section */
.qtn-shipping-section {
    margin-top: 0.5rem;
}

/* Shipping Methods List */
.qtn-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qtn-shipping-method {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background-color: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.qtn-shipping-method:hover {
    border-color: #d1d5db;
    background-color: #f5f5f5;
}

.qtn-shipping-method.selected,
.qtn-shipping-method:has(input:checked) {
    border-color: #2d5a27;
    background-color: #f0fdf4;
}

.qtn-shipping-method input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-right: 0.75rem;
    accent-color: #2d5a27;
    cursor: pointer;
    flex-shrink: 0;
}

/* Single shipping method visual indicator */
.qtn-radio-visual {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    border-radius: 50%;
    background-color: #2d5a27;
    position: relative;
    flex-shrink: 0;
}

.qtn-radio-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
}

.qtn-shipping-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    cursor: pointer;
    margin: 0;
    gap: 0.75rem;
}

.qtn-shipping-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.qtn-shipping-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #2d5a27;
    white-space: nowrap;
}

.qtn-free-shipping {
    color: #059669;
    font-weight: 600;
}

/* Shipping Destination */
.qtn-shipping-destination {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.875rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 10px;
    border-left: 3px solid #8bc34a;
}

.qtn-shipping-destination .qtn-icon {
    width: 18px;
    height: 18px;
    color: #2d5a27;
    flex-shrink: 0;
    margin-top: 1px;
}

.qtn-destination-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.qtn-destination-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.qtn-destination-address {
    font-size: 0.8125rem;
    color: #15803d;
    line-height: 1.4;
    word-break: break-word;
}

/* Shipping Calculator Link */
.qtn-shipping-calculator {
    margin-top: 0.625rem;
}

.qtn-shipping-calculator .shipping-calculator-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2d5a27;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.qtn-shipping-calculator .shipping-calculator-button:hover {
    color: #1e3d1a;
}

/* Shipping Calculator Form */
.qtn-shipping-calculator .shipping-calculator-form {
    margin-top: 0.75rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.qtn-shipping-calculator .shipping-calculator-form p {
    margin: 0 0 0.625rem;
}

.qtn-shipping-calculator .shipping-calculator-form p:last-of-type {
    margin-bottom: 0;
}

.qtn-shipping-calculator input[type="text"],
.qtn-shipping-calculator select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.15s ease;
}

.qtn-shipping-calculator input:focus,
.qtn-shipping-calculator select:focus {
    outline: none;
    border-color: #2d5a27;
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.1);
}

.qtn-shipping-calculator button[type="submit"] {
    width: 100%;
    padding: 0.625rem 1rem;
    margin-top: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background-color: #2d5a27;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.qtn-shipping-calculator button[type="submit"]:hover {
    background-color: #1e3d1a;
}

/* Shipping Notices */
.qtn-shipping-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #fef3c7;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #92400e;
}

.qtn-shipping-notice .qtn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.qtn-shipping-error {
    padding: 0.75rem;
    background-color: #fef2f2;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #991b1b;
}

/* ==========================================================================
   PIX DISCOUNT & TOTAL
   ========================================================================== */
.qtn-cart-page .pix-discount-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}

.qtn-cart-page .pix-discount-notice svg {
    color: #16a34a;
    flex-shrink: 0;
}

.qtn-cart-page .pix-discount-notice span {
    font-size: 0.875rem;
    color: #166534;
}

.qtn-cart-page .pix-discount-notice .text-sm.font-bold {
    font-weight: 700;
}

/* Total Row */
.qtn-cart-page .cart_totals .pt-4.border-t-2 {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb !important;
}

.qtn-cart-page .cart_totals .text-base.font-semibold {
    font-size: 1rem !important;
    font-weight: 600;
}

.qtn-cart-page .cart_totals .text-xl.font-bold {
    font-size: 1.375rem !important;
    font-weight: 700;
    color: #2d5a27 !important;
}

/* ==========================================================================
   CHECKOUT BUTTON
   ========================================================================== */
.qtn-cart-page .wc-proceed-to-checkout {
    padding: 0 1.5rem 1.5rem;
}

.qtn-cart-page .wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #2d5a27 0%, #1e3d1a 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px rgba(45, 90, 39, 0.3);
}

.qtn-cart-page .wc-proceed-to-checkout a.checkout-button:hover {
    background: linear-gradient(135deg, #1e3d1a 0%, #2d5a27 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.4);
}

.qtn-cart-page .wc-proceed-to-checkout a.checkout-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   SECURITY BADGES
   ========================================================================== */
.qtn-cart-page .security-badges {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.qtn-cart-page .security-badges span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.qtn-cart-page .security-badges svg {
    width: 14px;
    height: 14px;
    color: #9ca3af;
}

/* ==========================================================================
   WOOCOMMERCE NOTICES
   ========================================================================== */
.qtn-cart-page .woocommerce-message {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #166534;
    font-size: 0.9375rem;
}

.qtn-cart-page .woocommerce-error {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-size: 0.9375rem;
    list-style: none;
}

.qtn-cart-page .woocommerce-info {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e40af;
    font-size: 0.9375rem;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
.qtn-cart-page .blockUI.blockOverlay {
    background-color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.qtn-cart-page .blockUI.blockMsg {
    border: none !important;
    background: transparent !important;
}

@keyframes qtn-spinner {
    to { transform: rotate(360deg); }
}

.qtn-cart-page .blockUI.blockMsg::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto;
    border: 3px solid #e5e7eb;
    border-top-color: #2d5a27;
    border-radius: 50%;
    animation: qtn-spinner 0.7s linear infinite;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1023px) {
    .qtn-cart-page .lg\:mt-0 {
        margin-top: 1.5rem;
    }
}

@media (max-width: 639px) {
    .qtn-cart-page {
        padding: 1.25rem 0 3rem;
    }

    .qtn-cart-page .max-w-5xl {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .qtn-cart-page .mb-10.text-center h1 {
        font-size: 1.5rem;
    }

    .qtn-cart-page .cart-item {
        padding: 1.25rem !important;
    }

    .qtn-cart-page .cart-item img {
        width: 75px !important;
        height: 75px !important;
    }

    .qtn-cart-page .mt-6.pt-6.border-t {
        padding: 1rem;
    }

    .qtn-cart-page .coupon {
        flex-direction: column;
        width: 100%;
    }

    .qtn-cart-page .coupon input[type="text"] {
        max-width: 100%;
    }

    .qtn-cart-page .coupon button {
        width: 100%;
    }

    .qtn-cart-page .wc-proceed-to-checkout {
        padding: 0 1.25rem 1.25rem;
    }

    .qtn-cart-page .wc-proceed-to-checkout a.checkout-button {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .qtn-cart-page .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   CROSS-SELLS
   ========================================================================== */
.qtn-cart-page .cross-sells {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.qtn-cart-page .cross-sells h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.25rem;
}

.qtn-cart-page .cross-sells ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .qtn-cart-page .cross-sells ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .qtn-cart-page .cross-sells ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   EMPTY CART
   ========================================================================== */
.qtn-cart-page .woocommerce-cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.qtn-cart-page .cart-empty {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.qtn-cart-page .return-to-shop a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background-color: #2d5a27;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.qtn-cart-page .return-to-shop a:hover {
    background-color: #1e3d1a;
}
