/*
Theme Name: Megalitiy Child
Theme URI: https://megalitiy.ru/
Author: Megalitiy
Author URI: https://megalitiy.ru/
Description: Дочерняя тема для интернет-магазина Megalitiy на основе Astra
Template: astra
Version: 1.0.0
Text Domain: megalitiy-child
*/

/* === ТЁМНЫЙ ФОН === */
body {
    background-color: #121212 !important;
    color: #e0e0e0;
}

.site-content, 
.site-main {
    background-color: #121212 !important;
}

/* === ШАПКА === */
.ast-primary-header-bar {
    background-color: #0a0a0a !important;
    border-bottom: 1px solid #2c2c2c !important;
}

.ast-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* === ЛЕВАЯ КОЛОНКА — ЛОГОТИП И НАЗВАНИЕ === */
.site-header-primary-section-left {
    display: flex !important;
    align-items: center !important;
}

.site-branding {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
}

.custom-logo {
    max-height: 45px !important;
    width: auto !important;
    border-radius: 8px !important;
}

.site-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    background: #1a1a1a !important;
    border: 1px solid #ffffff !important;
    border-radius: 12px !important;
    padding: 6px 18px !important;
    display: inline-block !important;
}

.site-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.site-title a:hover {
    color: #ffc107 !important;
}

.site-description {
    display: none !important;
}

/* === ПРАВАЯ КОЛОНКА — МЕНЮ === */
.site-header-primary-section-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.main-header-menu {
    display: flex !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.main-header-menu .menu-item {
    margin: 0 !important;
}

.main-header-menu .menu-item .menu-link {
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 20px !important;
    border-radius: 12px !important;
    border: 1px solid #ffffff !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.main-header-menu .menu-item .menu-link:hover {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid #ffc107 !important;
}

.main-header-menu .current-menu-item .menu-link {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

.main-header-menu .current-menu-item .menu-link:hover {
    border: 1px solid #ffc107 !important;
}

/* === КАРТОЧКИ ТОВАРОВ === */
.woocommerce ul.products li.product {
    background-color: #1e1e1e;
    border: 1px solid #333333 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    transition: border-color 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.woocommerce ul.products li.product:hover {
    border-color: #ffc107 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

.astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.woocommerce ul.products li.product .price {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #dddddd !important;
    margin-top: auto !important;
    margin-bottom: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #333333 !important;
	border-bottom: 1px solid #333333 !important;
    text-align: center !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background-color: #2a2a2a !important;
    border: 1px solid #555555 !important;
    color: #dddddd !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
    background-color: #3a3a3a !important;
    border-color: #888888 !important;
    color: #ffffff !important;
}

.woocommerce ul.products li.product .ast-on-card-button,
.woocommerce ul.products li.product .ast-quick-view-trigger,
.astra-shop-thumbnail-wrap .ast-on-card-button {
    display: none !important;
}

/* === НОВИНКИ В МАГАЗИНЕ === */
.wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(220px, 1fr)) !important;
    gap: 25px !important;
    align-items: stretch !important;
}

.wc-block-grid__product {
    background: #1e1e1e !important;
    border: 1px solid #333333 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    transition: border-color 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.wc-block-grid__product:hover {
    border-color: #ffc107 !important;
}

.wc-block-grid__product-title {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    margin-bottom: 10px !important;
}

.wc-block-grid__product-title:hover,
.wc-block-grid__product-link,
.wc-block-grid__product-link:hover {
    text-decoration: none !important;
}

.wc-block-grid__product-price {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #ffc107 !important;
    text-align: center !important;
    margin: 15px auto !important;
    padding: 8px 0 !important;
    border-top: 1px solid #333333 !important;
    border-bottom: 1px solid #333333 !important;
    width: 100% !important;
    margin-bottom: 10px !important;
}

.wc-block-grid__product-add-to-cart {
    margin-top: auto !important;
    display: block !important;
    width: 100% !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link {
    background: #2a2a2a !important;
    border: 1px solid #555555 !important;
    color: #dddddd !important;
    border-radius: 25px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
    background: #3a3a3a !important;
    border-color: #888888 !important;
    color: #ffffff !important;
}

/* === ФОТО === */
.woocommerce ul.products li.product a img,
.wc-block-grid__product-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: #1e1e1e !important;
}

/* === СОРТИРОВКА === */
.woocommerce-ordering {
    margin-bottom: 20px !important;
}

.woocommerce-ordering select.orderby {
    background: #1a1a1a !important;
    border: 1px solid #444444 !important;
    border-radius: 30px !important;
    color: #cccccc !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 10px 35px 10px 20px !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 14px !important;
}

.woocommerce-ordering select.orderby option {
    background: #1a1a1a !important;
    color: #cccccc !important;
}

.woocommerce-ordering select.orderby option:checked,
.woocommerce-ordering select.orderby option:selected,
.woocommerce-ordering select.orderby option:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

.woocommerce-ordering select.orderby:hover {
    border-color: #ffc107 !important;
    color: #ffffff !important;
}

.woocommerce-ordering select.orderby:focus {
    outline: none !important;
    border-color: #ffc107 !important;
    color: #ffffff !important;
}

/* === СТРАНИЦА АККАУНТА === */
.woocommerce-account .woocommerce {
    background: #1e1e1e !important;
    padding: 30px !important;
    border-radius: 16px !important;
    border: 1px solid #333 !important;
}

.woocommerce-account h2,
.woocommerce-account h3,
.woocommerce-account header h2 {
    color: #ffffff !important;
    font-size: 22px !important;
    margin-bottom: 20px !important;
}

/* === ИНФОРМАЦИОННЫЕ СООБЩЕНИЯ === */
.woocommerce-info,
.woocommerce-message {
    background: #1e1e1e !important;
    border: 1px solid #2c2c2c !important;
    border-radius: 16px !important;
    color: #e0e0e0 !important;
    padding: 20px 25px !important;
    text-align: center !important;
    font-size: 15px !important;
    box-shadow: none !important;
}

.woocommerce-info::before,
.woocommerce-message::before {
    display: none !important;
}

.woocommerce-info a.button,
.woocommerce-info .button,
.woocommerce-message a.button,
.woocommerce-message .button {
    background: transparent !important;
    border: 2px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 8px 25px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-left: 15px !important;
    transition: all 0.3s ease !important;
}

.woocommerce-info a.button:hover,
.woocommerce-info .button:hover,
.woocommerce-message a.button:hover,
.woocommerce-message .button:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

/* === ФОРМЫ ВХОДА И РЕГИСТРАЦИИ === */
.woocommerce-account form.woocommerce-form-login,
.woocommerce-account form.woocommerce-form-register {
    background: #252525 !important;
    padding: 25px !important;
    border-radius: 12px !important;
}

.woocommerce-account input.input-text,
.woocommerce-account input[type="email"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="text"] {
    background: #333 !important;
    border: 1px solid #555 !important;
    color: #ffffff !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    width: 100% !important;
}

.woocommerce-account label {
    color: #cccccc !important;
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    display: block !important;
}

.woocommerce-account .button,
.woocommerce-account button[type="submit"] {
    background: #ffc107 !important;
    color: #121212 !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.woocommerce-account .button:hover,
.woocommerce-account button[type="submit"]:hover {
    background: #e0a800 !important;
    color: #121212 !important;
}

/* === ПРИВЕТСТВИЕ В АККАУНТЕ === */
.woocommerce-MyAccount-content > p:first-of-type {
    background: #1e1e1e !important;
    border-radius: 16px !important;
    padding: 20px 25px !important;
    border-left: 4px solid #ffc107 !important;
    color: #e0e0e0 !important;
    font-size: 16px !important;
    margin-bottom: 25px !important;
}

.woocommerce-MyAccount-content > p:first-of-type strong {
    color: #ffc107 !important;
    font-size: 18px !important;
}

.woocommerce-MyAccount-content > p:first-of-type a {
    background: rgba(255,193,7,0.15) !important;
    border: 1px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 5px 15px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    margin-left: 10px !important;
    transition: all 0.3s ease !important;
}

.woocommerce-MyAccount-content > p:first-of-type a:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

/* === КНОПКИ В АККАУНТЕ === */
.woocommerce-MyAccount-content p:nth-of-type(2) a {
    background: transparent !important;
    border: 1px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: 0 3px !important;
    transition: all 0.3s ease !important;
}

.woocommerce-MyAccount-content p:nth-of-type(2) a:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

.woocommerce-MyAccount-content a {
    background: transparent !important;
    border: 1px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
}

.woocommerce-MyAccount-content a:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

.woocommerce-MyAccount-content button,
.woocommerce-MyAccount-content input[type="submit"] {
    background: #ffc107 !important;
    color: #121212 !important;
    border: none !important;
}

.woocommerce-MyAccount-content button:hover,
.woocommerce-MyAccount-content input[type="submit"]:hover {
    background: #e0a800 !important;
}

/* === КАРТОЧКИ АДРЕСОВ === */
.woocommerce-MyAccount-content .addresses {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce-MyAccount-content .col2-set.addresses {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 20px 0 30px !important;
}

.woocommerce-MyAccount-content .col-1,
.woocommerce-MyAccount-content .col-2,
.woocommerce-MyAccount-content .addresses .col-1,
.woocommerce-MyAccount-content .addresses .col-2 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 280px !important;
    background: #1e1e1e !important;
    border: 1px solid #2c2c2c !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    width: auto !important;
    min-width: 0 !important;
}

.woocommerce-Address-title,
.woocommerce-Address-title.title,
header.woocommerce-Address-title {
    background: #252525 !important;
    border-bottom: 1px solid #333 !important;
    padding: 15px 20px !important;
    margin: 0 !important;
}

.woocommerce-Address-title h3,
header.woocommerce-Address-title h3 {
    background: transparent !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-MyAccount-content .col-1 address,
.woocommerce-MyAccount-content .col-2 address,
.woocommerce-MyAccount-content .col-1 .address-content,
.woocommerce-MyAccount-content .col-2 .address-content {
    flex: 1 !important;
    padding: 20px !important;
    background: #1e1e1e !important;
    color: #b0b0b0 !important;
    font-style: normal !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.woocommerce-MyAccount-content .col-1 .edit,
.woocommerce-MyAccount-content .col-2 .edit,
.woocommerce-MyAccount-content .addresses .col-1 .edit,
.woocommerce-MyAccount-content .addresses .col-2 .edit {
    background: transparent !important;
    border: 1px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 8px 20px !important;
    border-radius: 12px !important;
    display: inline-block !important;
    margin: auto 20px 20px 20px !important;
    align-self: flex-start !important;
    transition: all 0.3s ease !important;
}

.woocommerce-MyAccount-content .col-1 .edit:hover,
.woocommerce-MyAccount-content .col-2 .edit:hover,
.woocommerce-MyAccount-content .addresses .col-1 .edit:hover,
.woocommerce-MyAccount-content .addresses .col-2 .edit:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

.woocommerce-MyAccount-content .addresses > p:first-child {
    grid-column: span 2 !important;
    margin-bottom: 10px !important;
}

.woocommerce-MyAccount-content .woocommerce-Addresses {
    max-width: 100% !important;
    width: 100% !important;
}

.woocommerce-Addresses.col2-set.addresses::before,
.woocommerce-MyAccount-content .col2-set::before,
.woocommerce-MyAccount-content .col2-set::after {
    display: none !important;
    content: none !important;
}

/* === ТАБЛИЦА ЗАКАЗОВ === */
.woocommerce-account .woocommerce-MyAccount-content .shop_table {
    background: #1e1e1e !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid #2c2c2c !important;
    width: 100% !important;
}

.woocommerce-account .woocommerce-MyAccount-content .shop_table th {
    background: #252525 !important;
    color: #ffc107 !important;
    padding: 12px 15px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #333 !important;
}

.woocommerce-account .woocommerce-MyAccount-content .shop_table td {
    color: #c0c0c0 !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid #2a2a2a !important;
}

.woocommerce-account .woocommerce-MyAccount-content .shop_table td .button {
    background: transparent !important;
    border: 1px solid #ffc107 !important;
    color: #ffc107 !important;
    padding: 6px 15px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    text-decoration: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content .shop_table td .button:hover {
    background: #ffc107 !important;
    color: #121212 !important;
}

/* === НАВИГАЦИЯ В АККАУНТЕ === */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    padding: 15px 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block !important;
    padding: 10px 20px !important;
    color: #cccccc !important;
    text-decoration: none !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #252525 !important;
    border-left: 3px solid #ffc107 !important;
    color: #ffc107 !important;
}

/* === СТАТУС "В НАЛИЧИИ" === */
.product-meta-info {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.in-stock {
    background: #2a2a2a !important;
    color: #ffffff !important;
    display: inline-block !important;
    padding: 8px 28px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid #444444 !important;
}

.out-of-stock {
    background: #2a2a2a !important;
    color: #999999 !important;
    display: inline-block !important;
    padding: 8px 28px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid #444444 !important;
}

.in-stock .emoji,
.in-stock img.emoji,
.out-of-stock .emoji,
.out-of-stock img.emoji {
    display: none !important;
}

/* === КНОПКА "ПРОКРУТИТЬ ВВЕРХ" === */
#ast-scroll-top {
    background: #2a2a2a !important;
    border: 1px solid #444444 !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
}

#ast-scroll-top:hover {
    background: #444444 !important;
    color: #ffc107 !important;
    border-color: #ffc107 !important;
}

#ast-scroll-top .ast-icon.icon-arrow svg {
    fill: #ffffff !important;
}

#ast-scroll-top:hover .ast-icon.icon-arrow svg {
    fill: #ffc107 !important;
}

/* === АДАПТАЦИЯ === */
@media (max-width: 1024px) {
    .site-header-primary-section-left,
    .site-header-primary-section-right {
        justify-content: center !important;
        text-align: center !important;
    }
    .site-branding {
        align-items: center !important;
    }
    .main-header-menu {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .wc-block-grid__products {
        grid-template-columns: repeat(3, minmax(200px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .ast-container {
        padding: 0 15px !important;
    }
    .main-header-menu .menu-item .menu-link {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }
    .woocommerce-MyAccount-content .col2-set.addresses {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .wc-block-grid__products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .woocommerce-ordering select.orderby {
        font-size: 13px !important;
        padding: 8px 30px 8px 15px !important;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 16px !important;
        padding: 4px 12px !important;
    }
    .custom-logo {
        max-height: 35px !important;
    }
    .main-header-menu .menu-item .menu-link {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }
    .wc-block-grid__products {
        grid-template-columns: 1fr !important;
    }
}

/* === НОВИНКИ: ЦЕНА НАД КНОПКОЙ, КНОПКА ВНИЗУ === */
.wc-block-grid__product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.wc-block-grid__product-price {
    margin-top: auto !important;
    margin-bottom: 10px !important;
}

.wc-block-grid__product-add-to-cart {
    margin-top: 0 !important;
}

/* === СОРТИРОВКА: ПРИНУДИТЕЛЬНО УБИРАЕМ СИНИЙ ФОН === */
.woocommerce-ordering select.orderby option:checked,
.woocommerce-ordering select.orderby option:selected,
.woocommerce-ordering select.orderby option:hover {
    background: #ffc107 !important;
    background-color: #ffc107 !important;
    color: #121212 !important;
}

/* Дополнительно — скрываем синий фон во всех браузерах */
.woocommerce-ordering select.orderby {
    background-color: #1a1a1a !important;
}

.woocommerce-ordering select.orderby option {
    background-color: #1a1a1a !important;
}	
	/* === ЗАКРУГЛЕНИЕ ФОТОГРАФИЙ — РАБОТАЕТ === */

/* Обёртка фото в каталоге */
.astra-shop-thumbnail-wrap {
    overflow: hidden !important;
    border-radius: 12px !important;
}

/* Само фото — чтобы не вылезало за границы */
.astra-shop-thumbnail-wrap img {
    border-radius: 0 !important;
    display: block !important;
}

/* Для новинок */
.wc-block-grid__product-image {
    overflow: hidden !important;
    border-radius: 12px !important;
}

.wc-block-grid__product-image img {
    border-radius: 0 !important;
}


/* === ЗАКРУГЛЕНИЕ ВСЕХ 4 УГЛОВ ФОТО === */

/* Обёртка фото */
.astra-shop-thumbnail-wrap {
    overflow: hidden !important;
    border-radius: 12px !important;
    display: block !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* Само фото — на всю ширину */
.astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Для новинок */
.wc-block-grid__product-image {
    overflow: hidden !important;
    border-radius: 12px !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

.wc-block-grid__product-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}














