/* Product Images Fix - Complete Rewrite */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 0; 
    background-color: #f9fafb;
    height: 480px; /* Increased from 420px to 480px for larger images */
    z-index: 1;
    border-radius: 4px 4px 0 0; /* Subtler radius */
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.product-image,
.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .woocommerce-placeholder {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    position: relative !important;
    z-index: 3 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.5s ease;
    min-height: 100% !important; /* Force height fill */
}

.group:hover .product-image {
    transform: scale(1.08); /* Smoother zoom effect */
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    z-index: 10;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sale-badge {
    background-color: #1a1a1a;
}

.featured-badge {
    background-color: #d4af37;
}

/* Product Info Card */
.product-info {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Ensure price and button are pushed to the bottom */
.product-price {
    color: #374151; /* Darker gray */
    font-weight: 700; /* Bolder price */
    font-size: 1.1rem; /* Larger price */
    margin-bottom: 1.25rem;
    margin-top: auto;
}

.group:hover .product-info {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

.product-title {
    font-weight: 700;
    font-size: 1.125rem; /* Larger title */
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    text-decoration: none;
    color: #111827; /* Darker black */
    transition: color 0.2s;
}

.product-title a:hover {
    color: #000;
}

.product-price {
    color: #374151; /* Darker gray */
    font-weight: 700; /* Bolder price */
    font-size: 1.1rem; /* Larger price */
    margin-bottom: 1.25rem;
}

.product-price ins {
    text-decoration: none;
    font-weight: 700;
    color: #1a1a1a;
}

.product-price del {
    color: #9ca3af;
    font-size: 0.85em;
}

/* Modern Add to Cart Button */
.add-to-cart-btn {
    display: flex; /* Changed from inline-flex to flex */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #1a1a1a;
    color: #fff;
    padding: 0.85rem 1.5rem; /* Increased padding for rectangular look */
    font-size: 0.75rem; /* Slightly smaller text for elegance */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 0; /* Rectangular button */
    border: 1px solid #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    /* max-width removed to fill width like the reference image */
    box-shadow: none; /* Flat look as per reference */
    margin-top: auto; /* Push to bottom naturally */
}

/* Ensure Product Info card aligns content properly */
.product-info {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Ensure price sits just above the button */
.product-price {
    color: #374151; /* Darker gray */
    font-weight: 700; /* Bolder price */
    font-size: 1.1rem; /* Larger price */
    margin-bottom: 1.25rem;
    margin-top: auto; /* Push price down if title is short, but button pushes back */
}

.add-to-cart-btn .cart-icon {
    display: none; /* Hide icon to match reference image */
}

.add-to-cart-btn:hover {
    background-color: #333;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn:hover .cart-icon {
    transform: none;
}

/* Cleanup Legacy & Helper Styles */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* Sidebar Transitions */
.sidebar-cart {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.sidebar-cart.open {
    transform: translateX(0);
}
#mobile-menu-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}
#mobile-menu-sidebar.open {
    transform: translateX(0);
}

/* WooCommerce Layout Overrides - FORCE FIX */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}

@media (min-width: 640px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}
@media (min-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 1280px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.woocommerce ul.products::before, 
.woocommerce ul.products::after {
    display: none !important;
    content: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    border-radius: 8px;
    list-style: none !important;
    list-style-type: none !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
}

/* NUCLEAR OPTION FOR BULLETS */
.woocommerce ul.products li.product::before,
.woocommerce ul.products li.product::after,
.woocommerce ul.products li.product::marker,
ul.products li.product::marker,
li.product::marker {
    display: none !important;
    content: "" !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

/* Fix alignment for grid items */
.product-item {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Product Info Card Alignment */
.product-info {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    transition: all 0.3s ease;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; REMOVED to control spacing manually */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Push button to bottom */
.product-info .add-to-cart-btn {
    margin-top: auto !important;
}

.group:hover .product-info {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Stronger shadow on hover */
    border-color: transparent;
    transform: translateY(-2px); /* Slight lift effect */
}

.product-title {
    font-weight: 700; /* Bolder font */
    font-size: 1.1rem; /* Larger font size */
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #111827; /* Darker black */
}

.product-price {
    color: #374151; /* Darker gray */
    font-weight: 600; /* Bolder price */
    font-size: 1rem;
    margin-bottom: 1.25rem;
}


/* Hide Default WooCommerce Elements we replaced */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .onsale {
    display: none !important;
}

/* Pagination */
.woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    border: none;
    margin: 3rem 0;
    padding: 0;
    gap: 0.5rem;
}
.woocommerce-pagination ul li {
    border: none;
    overflow: hidden;
}
.woocommerce-pagination ul li a, .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: white;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.woocommerce-pagination ul li a:hover, .woocommerce-pagination ul li span.current {
    background-color: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}
