/*
Theme Name: Petshop Unders Woo
Theme URI: https://example.com/
Author: ChatGPT
Author URI: https://openai.com/
Description: Simple WooCommerce theme based on Underscores layout.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petshop-unders-woo
Tags: ecommerce, woocommerce
*/

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1 0 auto;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */

.site-header {
    border-bottom: 1px solid #e5e5e5;
    flex: 0 0 auto;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-logo a {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    color: #111;
    text-decoration: none;
}

.header-logo img {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.header-search {
    flex: 1;
    border: 1px solid #000;
    padding: 3px;
    max-width: 550px;
}

.header-search form {
    display: flex;
    align-items: stretch;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.header-search input[type="search"],
.header-search input[type="search"]:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

.header-search input[type="search"]::placeholder {
    font-size: 16px;
}

.header-search button,
.header-search input[type="submit"] {
    padding: 8px 16px;
    border: none;
    background: #e0e0e0;
    color: #000;
    cursor: pointer;
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

/* Icon buttons */

.header-actions a {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    transition: transform 0.2s;
}

.header-actions a:hover {
    transform: scale(1.2);
}

.header-actions .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.header-cart-count {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
}

/* Grey menu bar */

.main-nav-wrapper {
    background: #f1f1f1;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 15px;
}

.main-nav .primary-menu {
    display: flex;
    justify-content: center;
    gap: 32px;               /* трохи більше повітря між пунктами */
    list-style: none;
    margin: 0;
    padding: 7px 0;
}

.main-nav .primary-menu > li > a {
    position: relative;
    display: inline-block;
    font-size: 18px;
    color: #262525;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0 0 4px;        /* місце під лінію */
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.25s ease-out;
}

/* Анімоване підкреслення */
.main-nav .primary-menu > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #0073aa;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease-out;
}

/* Ховер + фокус */
.main-nav .primary-menu > li > a:hover,
.main-nav .primary-menu > li > a:focus {
    color: #0073aa;
}

.main-nav .primary-menu > li > a:hover::after,
.main-nav .primary-menu > li > a:focus::after {
    transform: scaleX(1);
}

/* Активний пункт меню завжди підкреслений */
.main-nav .primary-menu > li.current-menu-item > a::after,
.main-nav .primary-menu > li.current_page_item > a::after {
    transform: scaleX(1);
}


/* Layout */

.site-main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px 40px;
}

/* Footer */

.site-footer {
    background: #1d3f96;
    color: #eee;
    padding: 40px 15px 20px;
    margin-top: 40px;
    flex: 0 0 auto;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo a {
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 10px;
}

.footer-payments span {
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #444;
    padding: 2px 6px;
}

.footer-contact-email a {
    color: #fff;
    font-size: 14px;
}

.footer-useful-links h4,
.footer-region h4 {
    margin: 0 0 10px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-useful-links-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.footer-useful-links-columns ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.footer-useful-links-columns li {
    margin-bottom: 6px;
}

.footer-useful-links-columns a {
    color: #ddd;
}

.footer-useful-links-columns a:hover {
    color: #fff;
}

.footer-region select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #000;
    color: #eee;
}

/* Footer bottom */

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 10px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* WooCommerce basic tweaks */

.woocommerce ul.products,
.woocommerce-page ul.products {
    margin-top: 20px;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    text-align: center;
}

.woocommerce div.product div.images img {
    border-radius: 6px;
}

.woocommerce div.product .product_title {
    margin-bottom: 10px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 20px;
    font-weight: 700;
}

/* Swicher */
/* Перевернути валютний список вгору */
.footer-currency-switcher .psmwoo-mc-switcher-container {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: flex-start !important;
}

/* Зробити, щоб список не прилипав до кнопки */
.footer-currency-switcher .psmwoo-mc-switcher-options {
    margin-bottom: 8px !important;
}

/* Щоб список не перекривав кнопку */
.footer-currency-switcher .psmwoo-mc-switcher-options.medium {
    top: auto !important;
    bottom: 100% !important; /* показувати над кнопкою */
}




/* Responsive */

@media (max-width: 900px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .main-nav .primary-menu {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-actions {
        justify-content: flex-end;
    }
}
