/**
 * WooCommerce Styles for Anambas Theme
 * 
 * Custom WooCommerce styling that integrates with Tailwind CSS
 * This file is enqueued by inc/woocommerce.php
 */

/* Reset and Base Styles */
.woocommerce * {
    box-sizing: border-box;
}

/* Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Product Images */
.woocommerce ul.products li.product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Product Titles */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #184B77;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Product Prices */
.woocommerce ul.products li.product .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2983B9;
    margin-bottom: 1rem;
}

.woocommerce ul.products li.product .price del {
    color: #9ca3af;
    font-weight: 400;
}

/* Add to Cart Buttons */
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: linear-gradient(to right, #184B77, #2983B9);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: linear-gradient(to right, #2983B9, #184B77);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 75, 119, 0.3);
}

/* Cart and Checkout */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .checkout {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce table.cart,
.woocommerce-checkout table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.woocommerce table.cart th,
.woocommerce table.cart td,
.woocommerce-checkout table th,
.woocommerce-checkout table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.woocommerce table.cart th,
.woocommerce-checkout table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #184B77;
}

/* Form Elements */
.woocommerce form .form-row {
    margin-bottom: 1rem;
}

.woocommerce form .form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.woocommerce form .form-row input[type="text"],
.woocommerce form .form-row input[type="email"],
.woocommerce form .form-row input[type="tel"],
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    outline: none;
    border-color: #184B77;
    box-shadow: 0 0 0 3px rgba(24, 75, 119, 0.1);
}

/* Messages and Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.woocommerce-message {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.woocommerce-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.woocommerce-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Single Product Page */
.woocommerce div.product {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce div.product .summary {
    padding: 2rem;
}

.woocommerce div.product .product_title {
    font-size: 2rem;
    font-weight: 700;
    color: #184B77;
    margin-bottom: 1rem;
}

.woocommerce div.product .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2983B9;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .woocommerce div.product .summary {
        padding: 1rem;
    }
    
    .woocommerce div.product .product_title {
        font-size: 1.5rem;
    }
}

/* Hide elements not needed for donation system */
.woocommerce .woocommerce-breadcrumb {
    display: none;
}

.woocommerce .woocommerce-result-count {
    display: none;
}

.woocommerce .woocommerce-ordering {
    display: none;
}

/* Custom donation styling */
.woocommerce.donation-page .cart-collaterals {
    background: linear-gradient(to right, #f8fafc, #e0f2fe);
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid rgba(87, 179, 233, 0.2);
}

.woocommerce.donation-page .cart_totals h2 {
    color: #184B77;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
