/*
 Theme Name:  Divi Child Theme Site-project
 Theme URI:    https://site-project.bg/
 Description:  Child Theme for Divi
 Author:       Krisko
 Author URI:   https://site-project.bg/
 Template:     Divi
 Version:      1.0.0
*/

/*****Add any custom CSS below this line*****/


/*мобилно сутройство */

/* 2 Columns Mobile */
@media all and (max-width: 767px) {
    html .et-db .two-col-mob .et_pb_column {
        width:47.25% !important;
    }
    
html .et-db .two-col-mob .et_pb_column:nth-last-child(-n+2) {
        margin-bottom:0;
    }
    html .et-db .two-col-mob .et_pb_column:not(:nth-child(2n)) {
            margin-right:5.5% !important;
    }
}


/* 2 Columns Tablet */
@media all and (min-width: 768px) and (max-width: 980px) {
    html .et-db .two-col-tab .et_pb_column {
        width:47.25% !important;
    }
.two-col-tab .et_pb_column:nth-last-child(-n+2) {
        margin-bottom:0;
    }
    html .et-db .two-col-tab .et_pb_column:not(:nth-child(2n)) {
        margin-right:5.5% !important;
    }
}

/*изображение в кошницата*/
.et_pb_wc_cart_products table.cart img {
   
    width: 120px;
}


/*показване на снимки на продуктите на мобилно устройтво*/
@media (max-width: 980px) {
    .woocommerce table.cart .product-thumbnail, .woocommerce-page table.cart .product-thumbnail {
    display: block;
    text-align: left !important;
}
.woocommerce-page table.shop_table_responsive tr td.product-thumbnail::before {
    display: none;
}
}

 /*широчина на падащо  меню*/

 #top-menu li li a {
	padding: 8px 10px;
	width: 100% !important;
}




/* Поправка за банера "Разпродажба", който се показва над менюто */
#mega-menu-primary-menu {
    z-index: 999999 !important; /* По-висок z-index, за да гарантираме, че менюто остава отгоре */
    position: relative;
}

/* Коригиране на z-index на банера, за да бъде по-нисък от менюто */
.woocommerce span.onsale, 
.woocommerce-page span.onsale {
    z-index: 10 !important; /* По-нисък z-index от менюто */
}

/* Допълнителна настройка за родителския контейнер на банера */
.woocommerce .products .product, 
.woocommerce-page .products .product {
    position: relative;
    z-index: 1;
}

/*стила на  скритите линкове*/
span.clever-link {
	
	cursor: pointer; 
/* друго стилизиране на връзки, съответстващо на дизайна на сайта */
}


/*телефонен номер в продуктите под бутона бърза поръчка */

/* Стил за телефонния номер след бутона "БЪРЗА ПОРЪЧКА" */
.product-phone-number {
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #4bae32;
    
}

.product-phone-number .phone-link {
    text-decoration: none;
    color: #4bae32;
    transition: color 0.3s ease;
}

.product-phone-number .phone-link:hover {
    color: #3a8a27;
}

/* Адаптивен дизайн за мобилни устройства */
@media (max-width: 768px) {
    .product-phone-number {
        font-size: 16px;
        margin-top: 8px;
        margin-bottom: 8px;
    }
}

/*сил за показване на постовете в сайта*/

/* Grid layout for posts in category */
@media only screen and (min-width: 981px) {
  .category #left-area {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .category #left-area article {
    margin-bottom: 0;
    padding-bottom: 30px;
  }
  
  .category #left-area .pagination {
    grid-column: 1 / -1;
  }
}

/* Optional: Adjust image heights to be consistent */
.category #left-area .entry-featured-image-url img {
    height: 300px;
    object-fit: cover;
    width: 100%;
}

/* Style featured image in single post to match other images */
.single-post .et_featured_image {
    width: 100%;
    max-width: 480px; /* Намален размер, за да съответства на другите */
    margin: 0 auto 30px;
    display: block;
}

.single-post .et_featured_image img {
    width: 100%;
    height: 300px; /* Същата височина като grid изображенията */
    object-fit: cover;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .single-post .et_featured_image {
        max-width: 100%;
    }
    
    .single-post .et_featured_image img {
        height: 250px; /* По-малка височина за мобилни */
    }
}

/* Style Set Featured Image to be smaller and better proportioned */
.post-thumbnail img,
.et_featured_image img,
.et_post_meta_wrapper img {
    max-width: 400px !important; /* Намален размер */
    height: auto !important;
    display: block;
    margin: 0 auto 20px;
}

/* Ensure container doesn't force larger size */
.et_post_meta_wrapper,
.post-thumbnail,
.et_featured_image {
    text-align: center;
    max-width: 100%;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .post-thumbnail img,
    .et_featured_image img,
    .et_post_meta_wrapper img {
        max-width: 100% !important;
    }
} 

/* Reduce article title size */
.et_pb_post .entry-title,
.et_pb_post h2.entry-title,
.et_pb_post .entry-title a {
    font-size: 20px !important;
    line-height: 1.3 !important;
    padding-bottom: 10px;
}