/*
Theme Name: PadBook Child Theme
Theme URI: https://padbook.net
Description: Egyedi stílusok és funkciók a PadBook webhelyhez.
Author: Your Name
Author URI: https://padbook.net
Template: gameshop
Version: 1.1.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: padbook-child-theme
*/

/* --- Görgetés engedélyezése az egész oldalon --- */
html, body {
    overflow: auto !important; /* Felülírja a szülő téma 'overflow: hidden' beállítását, engedélyezi a görgetést. */
}

/* Konténer: grid layout */
.my-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Egy könyv doboza */
.my-book-card,
.book-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.my-book-card:hover,
.book-item:hover {
    transform: translateY(-5px);
}

/* Kép */
.my-book-image-wrapper {
    width: 100%;
    padding-bottom: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
    margin-bottom: 15px;
}

.my-book-image-wrapper img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 4px;
}

/* Cím */
.my-book-title,
.book-item h4 {
    font-size: 16px;
    margin: 10px 0;
    min-height: 2.5em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gomb */
.my-book-button,
.book-item .button {
    display: inline-block;
    margin-top: auto;
}

/* Vásárlói admin menüben <br> ne tördeljen */
.woocommerce-MyAccount-navigation br {
    display: none;
}


/*
 * ========================================================================
 * WooCommerce Fiókom - Mobil menü stílusok
 * ========================================================================
 */

/* A mobil menüt vezérlő gomb alap stílusa (alapból rejtett) */
.myaccount-toggle-btn {
    display: none; /* Nagy képernyőn nem látszik */
    width: 100%;
    padding: 12px 15px;
    background-color: #E36703; /* Gomb háttérszíne */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

/* A gomb stílusa, ha a menü nyitva van (aktív állapot) */
.myaccount-toggle-btn.is-active,
.myaccount-toggle-btn:hover {
    background-color: #c95b00; /* Sötétebb árnyalat */
}

/* A TÉMA ÁLTAL GENERÁLT, FELESLEGES MOBIL MENÜ GOMB ELREJTÉSE */
/* A lenti szelektor csak egy PÉLDA! Ezt cseréld le arra, amit a böngészőben találsz a remote debugging során! */
.a-tema-altal-generalt-gomb-osztalyneve {
    display: none !important;
}


/*
 * Media Query: Stílusok mobil nézetre (768px-es töréspont alatt)
 * ------------------------------------------------------------------------
 */
@media screen and (max-width: 768px) {

    /* Megjelenítjük a toggle gombot mobilon */
    .myaccount-toggle-btn {
        display: block;
    }

    /* A navigációs menü alaphelyzete mobilon: csukva */
    .woocommerce-MyAccount-navigation {
        max-height: 0;
        overflow: hidden;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-radius: 5px;
        /* Animáció a lenyitáshoz és összecsukáshoz */
        transition: max-height 0.4s ease-in-out, margin-bottom 0.4s ease-in-out, padding 0.4s ease-in-out;
    }

    /* A navigációs menü nyitott állapota, amikor megkapja az 'is-open' classt */
    .woocommerce-MyAccount-navigation.is-open {
        max-height: 800px !important;
        margin-bottom: 20px; /* Térköz a menü és a tartalom között nyitott állapotban */
    }

    /* A menüpontok stílusának javítása mobilon */
    .woocommerce-MyAccount-navigation ul {
        list-style: none;
        margin: 0;
        padding: 0;
        border: 1px solid #eee;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .woocommerce-MyAccount-navigation li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .woocommerce-MyAccount-navigation li:last-child {
        border-bottom: none;
    }

    .woocommerce-MyAccount-navigation li a {
        display: block;
        padding: 10px 15px;
        text-decoration: none;
        color: #333;
        background-color: #f9f9f9;
        transition: background-color 0.2s ease;
    }

    .woocommerce-MyAccount-navigation li a:hover,
    .woocommerce-MyAccount-navigation li.is-active a {
        background-color: #e0e0e0;
        color: #0073aa;
    }

    /* Helyet biztosít a láblécnek, hogy a tartalom ne fedje át. */
    .woocommerce-MyAccount-content {
        padding-bottom: 150px !important;
    }
}
