/**
 * WooCommerce Theme Styles
 * Custom styles to integrate WooCommerce with Give Me Five theme
 */

/* ==========================================================================
   Global WooCommerce Overrides
   ========================================================================== */

.woocommerce div.product,
.woocommerce #content div.product,
.woocommerce-page div.product,
.woocommerce-page #content div.product {
    margin-bottom: 0;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
}

.woocommerce .woocommerce-message {
    background: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #198754;
}

.woocommerce .woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.woocommerce .woocommerce-info {
    background: #cce5ff;
    color: #004085;
    border-left: 4px solid #007cba;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    background: #007cba;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    font-weight: 600;
    padding: 15px 30px;
    font-size: 18px;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
    background: linear-gradient(135deg, #005a87 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.woocommerce form .form-row {
    margin-bottom: 20px;
}

.woocommerce form .form-row label {
    font-weight: 600;
    color: #333;
    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 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.woocommerce .woocommerce-form-row .required {
    color: #dc3545;
    font-weight: bold;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */

.woocommerce table.shop_table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.woocommerce table.shop_table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-top: none;
}

.woocommerce table.shop_table tbody tr:hover {
    background: #f8f9fa;
}

.woocommerce table.shop_table .product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce table.shop_table .product-name a:hover {
    color: #007cba;
}

.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   Quantity Input Styles
   ========================================================================== */

.woocommerce .quantity {
    position: relative;
    display: inline-block;
}

.woocommerce .quantity input.qty {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.woocommerce .quantity input.qty:focus {
    outline: none;
    border-color: #007cba;
}

/* ==========================================================================
   Payment Methods
   ========================================================================== */

.woocommerce #payment {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.woocommerce #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce #payment ul.payment_methods li {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.woocommerce #payment ul.payment_methods li:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.woocommerce #payment ul.payment_methods li input[type="radio"]:checked + label {
    color: #007cba;
    font-weight: 600;
}

.woocommerce #payment div.payment_box {
    background: #f0f8ff;
    border: 1px solid #007cba;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

/* ==========================================================================
   Checkout Styles
   ========================================================================== */

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
    background: #f8f9fa;
    border-radius: 8px;
    /* padding: 20px; */
}

.woocommerce-checkout .woocommerce-checkout-review-order h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Cart Styles
   ========================================================================== */

.woocommerce-cart .cart-collaterals {
    width: 100%;
}

.woocommerce-cart .cart_totals {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.woocommerce-cart .cart_totals h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td {
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-bottom: none;
    padding-top: 15px;
}

/* ==========================================================================
   Product Elements
   ========================================================================== */

.woocommerce div.product .product_title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 24px;
    font-weight: 700;
    color: #007cba;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 991px) {
    .woocommerce table.shop_table,
    .woocommerce-cart table.cart,
    .woocommerce-checkout-review-order-table {
        font-size: 14px;
    }
    
    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td {
        padding: 10px;
    }
}

@media (max-width: 767px) {
    .woocommerce table.shop_table,
    .woocommerce table.shop_table thead,
    .woocommerce table.shop_table tbody,
    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td,
    .woocommerce table.shop_table tr {
        display: block;
    }
    
    .woocommerce table.shop_table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .woocommerce table.shop_table tr {
        border: 1px solid #e9ecef;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        background: #f8f9fa;
    }
    
    .woocommerce table.shop_table td {
        border: none;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        padding-left: 50%;
        padding-bottom: 10px;
        padding-top: 10px;
    }
    
    .woocommerce table.shop_table td:before {
        content: attr(data-title) ":";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #333;
    }
    
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .woocommerce .quantity input.qty {
        width: 100%;
    }
    
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        float: none;
        width: 100%;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.woocommerce .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.8) !important;
}

.woocommerce .blockUI.blockOverlay:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #007cba;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Cart Icon and Badges
   ========================================================================== */

.woocommerce-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   Error States
   ========================================================================== */

.woocommerce .woocommerce-form-row.woocommerce-invalid input {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.woocommerce .woocommerce-form-row.woocommerce-invalid label {
    color: #dc3545;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .woocommerce-checkout .checkout-place-order-btn,
    .woocommerce .woocommerce-form-login,
    .next-steps-section,
    .additional_resources_wrapper,
    .cart_security_wrapper,
    .checkout_security_wrapper {
        display: none !important;
    }
    
    .order-info-grid,
    .order-details-table {
        border: 1px solid #333 !important;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

.woocommerce a.button:focus,
.woocommerce button.button:focus,
.woocommerce input.button:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.25);
}

.woocommerce .required {
    color: #dc3545;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
} 