/*
 Theme Name:   Hello Child
 Template:     hello-elementor
 Version:      1.0.0
*/



/* ===================================
   CUSTOM WOOCOMMERCE PRODUCT CARDS
   =================================== */

/* Reset & Base Styles */
.custom-product-card {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    width: 297px !important;
    height: 504px !important;
}

/* Card Inner Wrapper */
.custom-product-card .card-inner {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 504px;
    width: 297px;
    display: flex;
    flex-direction: column;
}

.custom-product-card:hover .card-inner {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #ddd;
}

/* Sale Badge - Top Right */
.custom-product-card .product-sale,
.custom-product-card .onsale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c00 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10;
    border-radius: 2px !important;
    box-shadow: 0 2px 8px rgba(192, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif !important;
    min-height: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* Card Media (Image Container) */
.custom-product-card .card-media {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    height: 297px;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .card-image {
    display: block;
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .card-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card:hover .card-image img {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Card Content (Title & Price) */
.custom-product-card .card-content {
    padding: 30px 20px !important;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #f5f5f5;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 145px;
    margin: 0 !important;
}

.custom-product-card .product-title {
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.custom-product-card .product-title a {
    color: #000 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    font-family: inherit;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .product-title a:hover {
    color: #000 !important;
    text-decoration: none !important;
}

/* Force remove any underlines */
.custom-product-card h2,
.custom-product-card h3,
.custom-product-card h4,
.custom-product-card .woocommerce-loop-product__title {
    text-decoration: none !important;
    border-bottom: none !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
}

.custom-product-card h2 a,
.custom-product-card h3 a,
.custom-product-card h4 a,
.custom-product-card .woocommerce-loop-product__title a {
    text-decoration: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .product-price {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Poppins', sans-serif;
}

.custom-product-card .product-price del {
    color: #999;
    font-weight: 400;
    margin: 0 10px 0 0 !important;
    padding: 0 !important;
    font-size: 18px;
    font-family: inherit;
    text-decoration: line-through;
}

.custom-product-card .product-price ins {
    text-decoration: none !important;
    color: #c00;
    font-family: inherit;
    font-weight: 700;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .product-price .woocommerce-Price-amount {
    font-weight: 700;
    font-family: inherit;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-product-card .product-price .amount {
    color: #c00;
    font-weight: 700;
    margin: 0 !important;
    padding: 0 !important;
}

/* Add to Cart Button - Slides from Below */
.custom-product-card .button,
.custom-product-card .add-to-cart-button,
.custom-product-card .add_to_cart_button,
.custom-product-card .product_type_simple,
.custom-product-card .product_type_variable,
.custom-product-card .added_to_cart {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 0 8px 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer;
    z-index: 1;
    text-align: center;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    line-height: 1.4 !important;
    font-family: 'Poppins', sans-serif !important;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease !important;
    opacity: 1;
    text-decoration: none !important;
}

.custom-product-card .button:hover,
.custom-product-card .add_to_cart_button:hover {
    background: #333 !important;
    color: #fff !important;
    transform: translateY(0) !important;
    text-decoration: none !important;
}

/* Hover Effect - Everything Slides Up & Button Slides Up from Below */
.custom-product-card:hover .card-media {
    transform: translateY(-62px);
}

.custom-product-card:hover .card-content {
    transform: translateY(-62px);
}

.custom-product-card:hover .button,
.custom-product-card:hover .add_to_cart_button,
.custom-product-card:hover .product_type_simple,
.custom-product-card:hover .product_type_variable {
    transform: translateY(0) !important;
}

/* Loading State */
.custom-product-card .button.loading,
.custom-product-card .add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.custom-product-card .button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Added to Cart Message */
.custom-product-card .added_to_cart {
    background: #46b450 !important;
    transform: translateY(0) !important;
    position: relative !important;
    margin-top: 10px !important;
}

/* View Cart link that appears after adding */
.custom-product-card .added_to_cart.wc-forward {
    display: none !important;
}

/* REMOVE ALL LEFT MARGINS AND PADDINGS FROM PRODUCT GRID */
.products,
.woocommerce .products,
ul.products {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center !important;
    list-style: none;
}

.products .custom-product-card {
    flex: 0 0 297px;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix for grid layouts */
.products.columns-2 .custom-product-card,
.products.columns-3 .custom-product-card,
.products.columns-4 .custom-product-card,
.products.columns-5 .custom-product-card {
    float: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any theme-specific left margins/paddings */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-product-card {
        width: 100% !important;
        height: auto !important;
        max-width: 297px;
        margin: 0 auto !important;
    }
    
    .custom-product-card .card-inner {
        width: 100%;
        height: auto;
        min-height: 504px;
    }
    
    .custom-product-card .product-title {
        font-size: 18px;
        min-height: 44px;
    }
    
    .custom-product-card .product-price {
        font-size: 18px;
    }
    
    .custom-product-card .card-content {
        padding: 25px 15px !important;
        min-height: 130px;
    }
    
    .products,
    .woocommerce .products,
    ul.products {
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .custom-product-card .card-media {
        height: 250px;
    }
}