/* J2Commerce – kategóriakártyák */
.j2commerce-categories .j2commerce-category-grid {
    row-gap: 1.5rem;
}

.j2commerce-categories .j2commerce-category-card {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid #dce3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 40, 80, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
                border-color 0.2s ease;
}

.j2commerce-categories .j2commerce-category-card:hover {
    transform: translateY(-3px);
    border-color: #3159a5;
    box-shadow: 0 8px 22px rgba(20, 40, 80, 0.12);
}

.j2commerce-categories .j2commerce-category-title {
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 1.25rem;
}

.j2commerce-categories .j2commerce-category-title a {
    color: #2857a4;
    text-decoration: none;
    font-weight: 600;
}

.j2commerce-categories .j2commerce-category-title a:hover {
    color: #17366d;
    text-decoration: underline;
}

.j2commerce-categories .j2commerce-category-card .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
}

@media (max-width: 575.98px) {
    .j2commerce-categories .j2commerce-category-card {
        padding: 1.1rem;
    }
}

/* J2Commerce kategóriakártyák magasságának tesztje */
body.com_j2commerce.view-categories
.j2commerce-category-card {
    height: 120px !important;
    min-height: 120px !important;
    box-sizing: border-box;
}

body.com_j2commerce.view-categories
.j2commerce-category-title a::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 12px;
    vertical-align: -5px;
    background-color: #3159a5;

    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 16v5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 16v5'/%3E%3C/svg%3E") center / contain no-repeat;
}


/* J2Commerce termékoldal: leírás teljes szélességben */
body.com_j2commerce.view-product
.j2commerce-single-product .j2commerce-product-tabs {
    width: 100%;
    max-width: 100%;
    clear: both;
}

/* A leírás tartalmának teljes szélessége */
body.com_j2commerce.view-product
.j2commerce-single-product .j2commerce-product-tabs .tab-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* A termékadatok és a leírás közötti térköz */
body.com_j2commerce.view-product
.j2commerce-single-product .j2commerce-product-tabs {
    margin-top: 2rem;
}


/* A termékadatok teljes szélességben */
body.com_j2commerce.view-product
.j2commerce-single-product .j2c-product-detail-info {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/* A termékadatok sora töltse ki a rendelkezésre álló szélességet */
body.com_j2commerce.view-product
.j2commerce-single-product .j2c-product-detail-row {
    display: flex;
    flex-wrap: wrap;
}


/* J2Commerce: a Kosárba tesz gomb ne töltse ki a teljes sort */
body.com_j2commerce.view-product
.j2commerce-single-product .j2c-product-detail-info
form.j2commerce-addtocart-form .btn,
body.com_j2commerce.view-product
.j2commerce-single-product .j2c-product-detail-info
form[action*="carts"][action*="addItem"] button[type="submit"] {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    display: inline-block;
    padding: 0.75rem 1.5rem;
}

/* 1. KÉP MEGJELENÍTÉSÉNEK KIKÉNYSZERÍTÉSE: Felülírjuk az elrejtést */
body.com_j2commerce.view-product .j2commerce-single-product .j2c-product-detail-media {
    display: block !important;
    width: 40% !important; /* A kép szélessége a leírás mellett */
    float: left;
}

body.com_j2commerce.view-product .j2commerce-single-product .j2c-product-detail-info {
    width: 60% !important; /* A szöveges adatok szélessége a kép mellett */
    flex: 0 0 60% !important;
}

/* 2. AUTOMATIKUS NAGYÍTÁS: Kattinthatóvá tesszük az összes képet a bolton belül */
.j2commerce-product-list .thumbnail-image img, 
.j2commerce-product-wrapper img,
.j2c-product-detail-media img,
img[src*="j2commerce"], 
img[src*="j2store"] {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* 1. INTELLIGENS KÉPKEZELÉS: Csak akkor rejti el az oszlopot, ha tényleg NINCS benne képfájl */
body.com_j2commerce.view-product .j2c-product-detail-media:not(:has(img)) {
    display: none !important;
}

/* Ha nincs kép, a szöveges blokk automatikusan ugorjon teljes szélességre */
body.com_j2commerce.view-product .j2c-product-detail-media:not(:has(img)) + .j2c-product-detail-info {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/* 2. HA VAN KÉP: Akkor jelenjen meg szépen egymás mellett a fotó és a szöveg */
body.com_j2commerce.view-product .j2c-product-detail-media:has(img) {
    display: block !important;
    width: 40% !important;
    float: left;
}

body.com_j2commerce.view-product .j2c-product-detail-media:has(img) + .j2c-product-detail-info {
    width: 60% !important;
    flex: 0 0 60% !important;
}

/* 3. AUTOMATIKUS NAGYÍTÁS: Kattinthatóvá és nagyíthatóvá tesszük a meglévő képeket */
body.com_j2commerce.view-product .j2c-product-detail-media img {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Joomla-Shop logó mérete magyar és angol nyelven */
.container-header .navbar-brand img,
.container-header .brand-logo img,
.navbar-brand img,
.brand-logo img {
    max-height: 75px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain;
}