/*
 Theme Name:   Hello Elementor Child
 Description:  Child theme for Hello Elementor to customize WooCommerce product archive.
 Author:       Jules
 Template:     hello-elementor
 Version:      1.0.0
*/

/* Reset and Global Styles */
.archive.post-type-archive-product .site-main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Two-column Layout */
.shop-container {
    display: flex;
    gap: 40px;
}

.shop-sidebar {
    flex: 0 0 250px;
}

.shop-content-area {
    flex: 1;
}

/* Sidebar Widgets */
.shop-sidebar .widget {
    margin-bottom: 30px;
}

.shop-sidebar h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
}

.shop-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-sidebar ul li {
    margin-bottom: 10px;
}

.shop-sidebar ul li a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.shop-sidebar ul li a:hover {
    color: #CC3366;
}

/* Top Bar */
.shop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 10px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.shop-top-bar .woocommerce-result-count {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

.shop-top-bar .woocommerce-ordering {
    margin: 0;
}

.shop-top-bar .woocommerce-ordering select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 0.9rem;
}

/* Product Grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.products::before, ul.products::after {
    display: none !important; /* Remove legacy clear-fixes */
}

ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

ul.products li.product img {
    border-radius: 4px;
    margin-bottom: 15px;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

ul.products li.product .price {
    font-size: 1.1rem;
    color: #CC3366;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

ul.products li.product .button {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    transition: background 0.3s;
}

ul.products li.product .button:hover {
    background: #CC3366;
}

/* Custom Cart Icon Button */
.custom-cart-icon-button {
    background-color: #135E4E !important;
    color: #fff !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    transition: background-color 0.3s, transform 0.3s !important;
}

.custom-cart-icon-button:hover {
    background-color: #0e4a3d !important;
    transform: scale(1.1);
}

.custom-cart-icon-button svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

/* Cart and Checkout Beautification */
.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    border-collapse: separate;
}

.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 15px;
    border: none;
}

.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table td {
    padding: 15px;
    border-top: 1px solid #eee;
}

.woocommerce-cart .cart-collaterals,
.woocommerce-checkout #order_review,
.woocommerce-checkout #customer_details {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.woocommerce-cart .cart-collaterals .cart_totals h2,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #customer_details h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #135E4E;
    display: inline-block;
    padding-bottom: 5px;
}

.woocommerce-checkout #payment {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
    background-color: #135E4E !important;
    color: #fff !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    transition: background-color 0.3s !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover {
    background-color: #0e4a3d !important;
}

/* Input Fields Improvement */
.woocommerce-cart input.input-text,
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
}

.woocommerce-checkout .col2-set {
    display: flex;
    gap: 30px;
}

.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    flex: 1;
    max-width: none;
    float: none;
    width: auto;
}

/* Responsive */
@media (max-width: 991px) {
    .shop-container {
        flex-direction: column;
    }
    .shop-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 575px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }
}
