/*
 * Estilos personalizados para la página de tienda de WooCommerce - L'oricay Theme
 */

.loricay-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.woocommerce-products-header__title {
    display: none;
}

.woocommerce-breadcrumb {
    display: none;
}

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

.woocommerce-ordering {
    display: none;
}

ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0 auto; /* Center the grid */
    justify-content: center;
    max-width: 1200px; /* Add a max-width to prevent overly wide grids */
}

ul.products::before,
ul.products::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Responsive styles for mobile devices */
@media (max-width: 768px) {
    .loricay-shop-container {
        padding: 10px; /* Reduce padding on mobile */
    }

    ul.products {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 20px; /* Adjust gap for single column */
        padding: 0; /* Remove padding to prevent overflow */
        margin: 0 auto; /* Center the grid */
        max-width: 100%; /* Use full width on mobile */
        width: 100%; /* Explicitly set width */
    }
    
    ul.products li.product {
        width: 100% !important;
        max-width: 340px !important; /* Adjust max-width for single column */
        min-width: 0 !important; /* Prevent grid item overflow */
        border-radius: 8px !important; /* Slightly smaller border radius */
        margin: 0 auto !important; /* Center card in grid cell */
    }
    
    ul.products li.product h2.woocommerce-loop-product__title {
        font-size: 0.5em !important; /* Smaller font size for mobile */
        padding: 12px 10px 6px !important; /* Reduce side padding */
    }
    
    ul.products li.product .attachment-woocommerce_thumbnail {
        height: 150px; /* Reduce image height on mobile */
        width: 100%; /* Ensure image takes full width */
        object-fit: cover; /* Maintain aspect ratio */
    }
    
    ul.products li.product .price {
        justify-content: flex-start !important; /* Align to left like h2 */
        text-align: left !important; /* Fallback alignment */
        font-size: 1.2em !important; /* Adjust font size */
        padding: 12px 10px 6px 30px !important; /* Increase left padding */
        margin: 0 !important; /* Match h2 margin */
    }
    
    ul.products li.product .button,
    ul.products li.product .added_to_cart.wc-forward {
        width: calc(100% - 20px); /* Adjust button width for mobile */
        margin: 6px 10px 12px; /* Reduce side margins */
        padding: 8px; /* Reduce padding on mobile */
        font-size: 0.9em; /* Smaller font size for mobile */
    }
}

ul.products li.product {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-self: center;
    width: 300px;
    max-width: 300px;
    min-width: 300px;
}

ul.products li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

ul.products li.product .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

ul.products li.product .attachment-woocommerce_thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

ul.products li.product h2.woocommerce-loop-product__title {
    font-family: 'Cinzel', serif !important;
    font-size: 1.5em !important;
    padding: 20px 22px 10px !important;
    margin: 0 !important;
    text-align: left !important;
    color: #336633 !important;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

ul.products li.product .price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-size: 1.96em; /* Increased by 40% (1.4em * 1.4) */
    font-weight: bold;
    padding: 0 20px 10px;
    color: #000000; /* Changed to black */
}

ul.products li.product .price .woocommerce-Price-amount.amount {
    font-size: 1.2em; /* Make the amount slightly larger */
    font-weight: bold; /* Ensure it's bold */
    color: #000000; /* Force black color */
}

ul.products li.product .price .woocommerce-Price-amount.amount .woocommerce-Price-currencySymbol {
    color: #000000; /* Force black color for currency symbol */
}

ul.products li.product .price::after {
    content: " *IVA INCLUÍDO";
    color: #000000; /* Changed to black */
    font-size: 0.5em;
    font-weight: normal;
    margin-left: 10px;
}

ul.products li.product .price .woocommerce-Price-amount::after {
    content: " COP";
    font-size: 0.6em;
    font-weight: 500;
    margin-left: 0.25em;
}

ul.products li.product .price del {
    color: #999;
    font-weight: normal;
    font-size: 0.8em;
}

ul.products li.product .price ins {
    background: none;
    font-weight: bold;
    color: #2a522a;
}

ul.products li.product .button {
    display: block;
    width: calc(100% - 40px);
    margin: 10px 20px 20px;
    text-align: center;
    background-color: #2a522a;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-end;
}

ul.products li.product .button:hover {
    background-color: #357632;
    color: white;
}

ul.products li.product .added_to_cart.wc-forward {
    display: block;
    width: calc(100% - 40px);
    margin: 10px auto 20px;
    text-align: center;
    background-color: transparent;
    color: #336633 !important;
    border: 2px solid #336633;
    font-size: 1.2em;
    font-family: 'Cinzel', serif;
    padding: 10px 22px;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

ul.products li.product .added_to_cart.wc-forward:hover {
    background-color: #e0ffe0;
    color: #2a522a !important;
    border-color: #2a522a;
}

.woocommerce-pagination {
    margin-top: 30px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.woocommerce-pagination ul li {
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    background: white;
    border: 1px solid #ddd;
    border-left-width: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.woocommerce-pagination ul li:first-child a,
.woocommerce-pagination ul li:first-child span {
    border-left-width: 1px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.woocommerce-pagination ul li:last-child a,
.woocommerce-pagination ul li:last-child span {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li .current {
    background-color: #2a522a;
    color: white;
}