/* Beef Sires Categories Page Styles */

.beef-sires-categories-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.beef-sires-categories-content {
    width: 100%;
}

.beef-sires-categories-title {
    text-align: center;
    font-size: 2.25rem; /* 36px based on 16px base */
    color: #003c71;
    margin-bottom: 40px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Grid Layout - Match Divi BodyCommerce styling */
.et_pb_row_bodycommerce.products {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Specific styling for beef sires category items */
.beef-sires-categories-content ul.et_pb_row_bodycommerce.products.bc_product_grid.bc_product_3.bc_pro_tab_2.bc_pro_mob_1 li.et_pb_db_cat_column.product {
    width: 28%;
    margin: 0 2.5% 30px 2.5%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Fallback for general category items */
.et_pb_db_cat_column.product {
    width: 28%;
    margin: 0 2.5% 30px 2.5%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.et_pb_db_cat_column.product a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    flex: 1;
}

/* Category Title */
.cat_title {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
}

/* Image Container */
.et_portfolio_image {
    display: block;
    position: relative;
    height: 250px;
    overflow: hidden;
    flex: 1;
}

.et_portfolio_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Additional styling for WooCommerce product images */
.woocommerce ul.products li.product a img {
    height: 100%;
}

.et_pb_db_cat_column.product:hover .et_portfolio_image img {
    transform: scale(1.05);
}

/* Overlay */
.et_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( 135deg, rgba(22, 65, 112, 0.2) 0%, rgba(22, 65, 112, 0.1) );
    transition: opacity 0.3s ease;
}

.et_pb_db_cat_column.product:hover .et_overlay {
    opacity: 0.8;
}

/* Category Description */
.cat_desc {
    padding: 20px;
    background: white;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat_desc p {
    margin: 0;
    color: #666;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .beef-sires-categories-content ul.et_pb_row_bodycommerce.products.bc_product_grid.bc_product_3.bc_pro_tab_2.bc_pro_mob_1 li.et_pb_db_cat_column.product,
    .et_pb_db_cat_column.product {
        width: 45%;
        margin: 0 2.5% 30px 2.5%;
    }

    .beef-sires-categories-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .cat_title {
        font-size: 22px;
    }

    .et_portfolio_image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .beef-sires-categories-container {
        padding: 30px 15px;
    }

    .beef-sires-categories-content ul.et_pb_row_bodycommerce.products.bc_product_grid.bc_product_3.bc_pro_tab_2.bc_pro_mob_1 li.et_pb_db_cat_column.product,
    .et_pb_db_cat_column.product {
        width: 95%;
        margin: 0 2.5% 30px 2.5%;
    }

    .beef-sires-categories-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .cat_title {
        font-size: 20px;
        top: 15px;
        left: 15px;
        right: 15px;
    }

    .et_portfolio_image {
        height: 200px;
    }

    .cat_desc {
        padding: 15px;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .beef-sires-categories-container {
        padding: 20px 10px;
    }

    .beef-sires-categories-content ul.et_pb_row_bodycommerce.products.bc_product_grid.bc_product_3.bc_pro_tab_2.bc_pro_mob_1 li.et_pb_db_cat_column.product,
    .et_pb_db_cat_column.product {
        width: 95%;
        margin: 0 2.5% 20px 2.5%;
    }

    .beef-sires-categories-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cat_title {
        font-size: 18px;
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .et_portfolio_image {
        height: 180px;
    }
}

/* Ensure full width layout */
.page-template-page-beef-sires #primary.content-area,
.page-template-page-beef-sires .content-area {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.page-template-page-beef-sires #main.site-main,
.page-template-page-beef-sires .site-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide default page elements */
.page-template-page-beef-sires .entry-header,
.page-template-page-beef-sires .entry-title {
    display: none;
}
