/**
 * Growzy WooCommerce Custom Styles
 * Cart, Checkout, and Account pages
 */

/* General WooCommerce Styling */
.woocommerce {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.woocommerce h1,
.woocommerce h2,
.woocommerce h3 {
    color: #1e293b;
    font-weight: 700;
}

/* Cart Page */
.woocommerce-cart .woocommerce {
    background: transparent;
    padding: 2rem 1.5rem;
    border-radius: 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce table.shop_table {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.woocommerce table.shop_table th {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    padding: 16px;
    border: none;
}

.woocommerce table.shop_table td {
    background: white;
    padding: 20px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.woocommerce table.shop_table tbody tr:hover td {
    background: #f8fafc;
}

.woocommerce .product-thumbnail img {
    border-radius: 8px;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.woocommerce .product-name a {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce .product-name a:hover {
    color: #6366f1;
}

.woocommerce .product-price,
.woocommerce .product-subtotal {
    font-weight: 700;
    color: #6366f1;
}

/* Quantity Input */
.woocommerce .quantity .qty {
    width: 60px;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.woocommerce .quantity .qty:focus {
    border-color: #6366f1;
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Remove Button */
.woocommerce a.remove {
    color: #ef4444 !important;
    font-size: 20px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    line-height: 30px;
    border-radius: 50%;
    background: #fef2f2;
    display: inline-block;
    text-align: center;
}

.woocommerce a.remove:hover {
    background: #ef4444;
    color: white !important;
}

/* Cart Totals */
.woocommerce .cart_totals {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.woocommerce .cart_totals h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.woocommerce .cart_totals table {
    border: none;
}

.woocommerce .cart_totals table th,
.woocommerce .cart_totals table td {
    padding: 12px 0;
    border: none;
}

.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
    padding-top: 16px;
    border-top: 2px solid #f1f5f9;
}

/* Buttons */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.woocommerce .button.alt,
.woocommerce button.button.alt {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Checkout Page */
.woocommerce-checkout .woocommerce {
    background: transparent;
    padding: 2rem 1.5rem;
    border-radius: 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce form.checkout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    padding: 0;
    margin: 0;
}

@media (max-width: 968px) {
    .woocommerce form.checkout {
        grid-template-columns: 1fr;
    }
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

/* Form Fields */
.woocommerce form .form-row {
    margin-bottom: 16px;
}

.woocommerce form .form-row label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #6366f1;
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Order Review */
#order_review_heading {
    font-size: 20px;
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.woocommerce-checkout-review-order-table {
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

/* Payment Methods */
.woocommerce-checkout-payment {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_method {
    margin-bottom: 12px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s;
}

.wc_payment_method:hover {
    border-color: #6366f1;
}

.wc_payment_method label {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc_payment_method .payment_box {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
}

/* Place Order Button */
#place_order {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    margin-top: 20px;
}

/* Thank You Page */
.woocommerce-order-received .woocommerce {
    text-align: center;
    padding: 40px;
}

.woocommerce-thankyou-order-received {
    font-size: 24px;
    color: #10b981;
    margin-bottom: 30px;
}

.woocommerce-order-overview {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.woocommerce-order-overview li {
    text-align: center;
}

.woocommerce-order-overview li strong {
    display: block;
    font-size: 18px;
    color: #6366f1;
    margin-top: 4px;
}

/* My Account Page */
.woocommerce-account .woocommerce {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
    }
}

.woocommerce-MyAccount-navigation {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 4px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.woocommerce-MyAccount-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Notices */
.woocommerce-message,
.woocommerce-info {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: white;
}

.woocommerce-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty::before {
    content: '🛒';
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
}

.return-to-shop .button {
    margin-top: 20px;
}

/* Coupon Form */
.woocommerce .coupon {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.woocommerce .coupon input.input-text {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
}

.woocommerce .coupon .button {
    white-space: nowrap;
}

/* Update Cart Button */
.woocommerce button[name="update_cart"] {
    background: #f1f5f9;
    color: #374151;
}

.woocommerce button[name="update_cart"]:hover {
    background: #e2e8f0;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce table.shop_table {
        display: block;
    }
    
    .woocommerce table.shop_table thead {
        display: none;
    }
    
    .woocommerce table.shop_table tbody tr {
        display: block;
        margin-bottom: 20px;
        background: white;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    .woocommerce table.shop_table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .woocommerce table.shop_table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #64748b;
    }
}
