/* ==========================================================================
   1. ФИКС МИНИАТЮР НА СТРАНИЦЕ ТОВАРА
   ========================================================================== */
.hikashop_small_image_div {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.hikashop_small_image_div a {
    display: inline-block !important;
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 auto !important;
}

.hikashop_small_image_div img.hikashop_child_image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 !important;
}

/* ==========================================================================
   2. СБРОС ДВОЙНЫХ ВНУТРЕННИХ РАМОК В КАТАЛОГЕ
   ========================================================================== */
div.hikashop_products_listing .hikashop_product,
div.hikashop_products_listing .hikashop_product *,
div.hikashop_products_listing .thumbnail,
div.hikashop_products_listing .card,
div.hikashop_products_listing [class*="span"] {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ==========================================================================
   3. КАРТОЧКА С ТОЧЕЧНОЙ РАМКОЙ И ЖЕСТКОЙ FLEX-СТРУКТУРОЙ
   ========================================================================== */
div.hikashop_products_listing .hikashop_subcontainer,
div.hikashop_products_listing .hikashop_subcontainer_border {
    border: 1px dotted #cccccc !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    position: relative !important;
    overflow: hidden !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

div.hikashop_products_listing .hikashop_subcontainer:hover,
div.hikashop_products_listing .hikashop_subcontainer_border:hover {
    border-color: rgb(26, 45, 60) !important;
    box-shadow: 0 4px 12px rgba(26, 45, 60, 0.12) !important;
}

/* ==========================================================================
   4. ИЗОБРАЖЕНИЕ
   ========================================================================== */
.hikashop_product_image {
    text-align: center !important;
    margin-bottom: 8px !important;
}

/* ==========================================================================
   5. НАЗВАНИЕ ТОВАРА
   ========================================================================== */
.hikashop_product_name {
    margin: 4px 0 6px 0 !important;
    display: block !important;
    text-align: left !important;
  /*  min-height: 2.6em !important; */
/*    line-height: 1.3em !important; */
}

.hikashop_product_name a {
    text-decoration: underline !important;
    font-weight: 600 !important;
    color: rgb(25, 90, 130) !important;
    transition: color 0.15s ease !important;
    display: inline-block !important;
}

.hikashop_product_name a:hover {
    color: rgb(40, 115, 155) !important;
}

/* ==========================================================================
   6. ЦЕНА И НАЛИЧИЕ (В ОДНУ СТРОКУ СЛЕВА)
   ========================================================================== */
.price_and_stock_row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 4px 0 8px 0 !important;
    width: 100% !important;
}

.hikashop_product_price_wrapper,
.hikashop_product_stock_wrapper {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.hikashop_product_price {
    font-weight: 400 !important;
    color: rgb(23, 23, 23) !important;
}

.hikashop_product_stock_count {
    font-size: 0.88em !important;
    margin: 0 !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
}

.hikashop_product_stock_count.in_stock,
.hikashop_product_stock_count:not(.no_stock):not(.on_order) {
    color: #2e7d32 !important;
}

.hikashop_product_stock_count.on_order {
    color: #d97706 !important;
}

.hikashop_product_stock_count.no_stock,
.hikashop_product_no_stock {
    color: #c62828 !important;
}

/* ==========================================================================
   7. ОПИСАНИЕ ТОВАРА (РАСТЯГИВАЕТСЯ И ВЫТАЛКИВАЕТ ФОРМУ ВНИЗ)
   ========================================================================== */
.product_desc_text,
div.hikashop_subcontainer .hikashop_product_description,
div.hikashop_subcontainer .product_minicard_text {
    font-size: 0.9em !important;
    color: #495057 !important;
    text-align: left !important;
    margin-bottom: 12px !important;
    line-height: 1.35 !important;
    min-height: 2.7em !important;
    flex-grow: 1 !important; /* Забирает пространство и давит вниз */
}

/* ==========================================================================
   8. ФОРМА ПОКУПКИ (ПРИЖИМ К НИЗУ + ФИКС РАЗМЕРА ИНПУТА)
   ========================================================================== */
div.hikashop_subcontainer .hikashop_product_bottom,
div.hikashop_subcontainer .add_to_cart_listing,
div.hikashop_subcontainer form,
div.hikashop_subcontainer form.form-inline,
div.hikashop_subcontainer [id*="hikashop_product_form_"] {
    margin-top: auto !important; /* Намертво к нижнему краю */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
}

div.hikashop_subcontainer form {
    padding-top: 10px !important;
}

/* Сброс колонок Bootstrap, чтобы инпут не сжимался в 0 */
div.hikashop_subcontainer form .hikashop_product_quantity_field,
div.hikashop_subcontainer form .hikashop_quantity_form,
div.hikashop_subcontainer form [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
}

/* ЖЕСТКИЙ ФИКС ИНПУТА (Ширина 60px) */
div.hikashop_subcontainer form input.form-control,
div.hikashop_subcontainer form input.hikashop_product_quantity_field {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 36px !important;
    padding: 2px 4px !important;
    text-align: center !important;
    margin: 0 !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    flex: 0 0 60px !important; /* Не даем флексу сжимать инпут */
    font-weight: 600 !important;
    color: rgb(23, 23, 23) !important;
    box-sizing: border-box !important;
}

div.hikashop_subcontainer form input.form-control:focus {
    border-color: rgb(25, 90, 130) !important;
    outline: none !important;
}

/* КНОПКА «В КОРЗИНУ» */
div.hikashop_subcontainer form a.hikacart,
div.hikashop_subcontainer form .btn {
    height: 36px !important;
    line-height: 24px !important;
    padding: 5px 14px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgb(25, 90, 130) !important;
    border: 1px solid rgb(25, 90, 130) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
}

div.hikashop_subcontainer form a.hikacart:hover,
div.hikashop_subcontainer form .btn:hover {
    background-color: rgb(40, 115, 155) !important;
    border-color: rgb(40, 115, 155) !important;
    color: #ffffff !important;
}