.navbar {
    padding: 0rem 1rem;
}

.expansion {
    margin: 5px;
}

.searchedMain {
    border: 1px solid;
    z-index: 999;
    position: absolute;
    background-color: white;
    margin: .25rem .5rem;
}

.cardShow {
    width: 100px;
    height: 150px;
    transition: transform .2s; /* Animation */
}

.imgBackground{
    margin: 5px;
    padding: 0px;
}

.imgBackgroundShow{
    margin: 2em;
    width: 300px;
    padding: 0;

}

/* Žlutý podklad jen u foil produktů */
.imgBackground.foil-bg,
.imgBackgroundShow.foil-bg{
    background-color: #fff6a1;
}

.cardImg {
    width: 100px;
    height: 140px;
}

.cardImgShow{
    width: 300px;
}
.foil{
    opacity: 0.7;
}

.cardShow:hover{
    margin-top: 70px;
    margin-bottom: 70px;
    margin-left: 40px;
    transform: scale(2);
}
.pagination{
    flex-wrap:wrap;
}

.itemDiv{
    min-height: 150px;
}

.selectedItem{
    background-color: lightgray !important;
}

.currency-icon{
    width: 16px;
}

.foil-icon{
    width: 30px ;
    height: 13px ;
    background-image: url('/storage/public/icons/foil-star.png') ;
    background-size: contain ;
}

.expansionIcon{
    width: 24px;
}
.btn-size{
    width: 24px;
    height: 24px;
    margin: 1px;
}

.row-uncommon {
    background:lightgrey;
}

.row-rare {
    background: lightyellow;
}

.row-mythic {
    background: lightcoral;
}

/*  Filip Doskočil */
.btn, .col-md-3 .list-group-item a {background-color:#9de};
.btn, .col-md-3 .list-group-item a:hover {background-color:#none !important};
.card-header {border:none !imporant;}
.card {border:none !imporant;}
h3 {font-size: 1rem;}
h4 {font-size: 0.8rem;}
.navbar {background-image: linear-gradient(to top left, rgba(0,136,238,.25) 1%, rgba(0,136,238,1) 99% ); opacity: 1 !important; background-color: white}
/*.side-bar{background-image: linear-gradient(to right, rgba(0,136,238,.5) 70%, rgba(0,136,238,.15)  ) !important;}*/
.side-bar{background-image: radial-gradient(closest-corner at 0% 0%, rgba(0,136,238,.15) , rgba(0,136,238,.1)  ) !important;  min-height: 91vh; max-height: 91vh; top:82px !important;  }
.main{margin-top:82px;}
@media (max-width: 750px){
    cardmarket-logo{
        display: none !important;
    }
}

/* Search – vždy viditelný v navbaru (mimo hamburger) */
#navbar-search {
    order: 4;
    width: 100%;
    padding: 0.25rem 0.5rem;
    position: relative;
}
@media (min-width: 768px) {
    #navbar-search {
        order: 0;
        width: auto;
        flex: 1 1 auto;
        max-width: 300px;
        padding: 0 0.5rem;
    }
}

/* Kompenzace výšky navbaru na mobilu (2 řádky: logo+burger, search) */
@media (max-width: 767.98px) {
    .main { margin-top: 110px !important; }
    .side-bar { top: 110px !important; }

    /* Logo (255×55) bez velkého levého okraje + zmenšené, aby se vešlo
       na jeden řádek s hamburgerem (jinak burger padal pod logo). */
    .navbar-brand.logo { margin-left: 0 !important; }
    .navbar-brand.logo img { height: 40px; width: auto; }
    /* Hamburger na pravý okraj prvního řádku. */
    .navbar-toggler { margin-left: auto; }
}

/* Mobilní menu – sekční nadpisy */
.nav-mobile-label {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
}

/* Mobilní menu – vizuálně oddělené skupiny */
@media (max-width: 767.98px) {
    .navbar-collapse .navbar-nav.d-md-none {
        background: rgba(255,255,255,.04);
    }
    .navbar-collapse .navbar-nav.d-md-none .nav-link {
        font-size: .95rem;
    }
}

.table-hover tbody tr.trBuyListItem:hover td {
background-color: red !important;
}
.table-hover tbody tr.trBuyListItem:hover {
border: 1px solid;
background-color: red;

}

/* ============================================================
   MODERNIZACE — Design systém (modrá #0088ee, minimalistický)
   ============================================================ */

:root {
    --brand-blue:        #0088ee;
    --brand-blue-dark:   #0070c4;
    --brand-blue-soft:   rgba(0,136,238,.08);
    --brand-blue-tint:   rgba(0,136,238,.15);
    --text-primary:      #1f2937;
    --text-secondary:    #6b7280;
    --text-muted:        #9ca3af;
    --border-light:      #e5e7eb;
    --border-medium:     #d1d5db;
    --bg-soft:           #f8fafc;
    --shadow-sm:         0 1px 2px 0 rgba(0,0,0,.05);
    --shadow-md:         0 2px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg:         0 8px 20px -4px rgba(0,0,0,.1), 0 4px 8px -2px rgba(0,0,0,.05);
    --radius-sm:         .375rem;
    --radius-md:         .5rem;
    --radius-lg:         .75rem;
}

/* ============ FIX: navbar nesmí přetékat širokou tabulkou ============ */
html, body { overflow-x: hidden; max-width: 100vw; }
.navbar.fixed-top { width: 100vw; }
#app, main, main > .row { max-width: 100%; }
main > .row { margin-left: 0 !important; margin-right: 0 !important; }

/* Všechny tabulky → automatická horizontální scroll wrappery */
main .table:not(.table-borderless):not(.no-responsive),
.card-body > .table,
.modal-body > .table {
    margin-bottom: 0;
}
main .table-responsive {
    border-radius: var(--radius-md);
}

/* ============ Typografie ============ */
body {
    color: var(--text-primary);
    background-color: #fafbfc;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}
/* Filip Doskočil's overrides ponecháme, ale ne tak agresivně */
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: .95rem; }

/* ============ Karty ============ */
.card {
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: #fff;
}
.card-header {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-light) !important;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============ Tlačítka (jemně zlepšit Filipův původní override) ============ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all .15s ease;
}
.btn-primary {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-blue-dark) !important;
    border-color: var(--brand-blue-dark) !important;
}
.btn-outline-primary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}
.btn-outline-primary:hover {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}
/* zrušit Filipův agresivní override pro všechny .btn */
.btn, .col-md-3 .list-group-item a { background-color: initial; }
.btn-primary { background-color: var(--brand-blue) !important; }

/* ============ Formuláře ============ */
.form-control, .form-select {
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0,136,238,.15);
}
label { color: var(--text-secondary); font-weight: 500; font-size: .9rem; }

/* ============ Tabulky ============ */
.table {
    color: var(--text-primary);
}
.table > thead {
    background: var(--bg-soft);
}
.table > thead th {
    border-bottom: 2px solid var(--border-light);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--text-secondary);
}
.table > tbody > tr { border-color: var(--border-light); }
.table-hover > tbody > tr:hover {
    background: var(--brand-blue-soft);
}

/* ============ Badge ============ */
.badge {
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: .35em .65em;
}

/* ============ Side-bar ============ */
.side-bar {
    background: linear-gradient(180deg, rgba(0,136,238,.06) 0%, rgba(0,136,238,.02) 100%) !important;
    border-right: 1px solid var(--border-light);
    padding-top: 1rem;
}
.side-bar .list-group-item {
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
}
.side-bar .list-group-item:hover {
    background: var(--brand-blue-soft);
    color: var(--brand-blue-dark);
}

/* ============ Pagination ============ */
.pagination .page-link {
    color: var(--brand-blue);
    border-color: var(--border-light);
}
.pagination .page-item.active .page-link {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

/* ============ Modal ============ */
.modal-content {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-soft);
}

/* ============ Sidebar víceúrovňové menu ============ */
#sidebar-wrapper .sidebar-caret {
    transition: transform .15s ease-in-out;
    font-size: 1.2rem;
    line-height: 1;
    margin-left: .35rem;
}
#sidebar-wrapper [data-bs-toggle="collapse"]:not(.collapsed) .sidebar-caret {
    transform: rotate(90deg);
}
#sidebar-wrapper .collapse .list-group-item {
    background-color: var(--bg-soft);
}

/* ============ Moderní přehled produktů (productList) ============ */
.product-list-toolbar { border-radius: var(--radius-md); }

.product-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
    background: #fff;
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.product-card-imgwrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    padding: .75rem;
    background: var(--bg-soft);
    overflow: hidden;
}
.product-card-imgwrap.foil-bg { background-color: #fff6a1; }
.product-card-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}
.product-card:hover .product-card-img { transform: scale(1.04); }
.product-card-noimg {
    font-size: 2.5rem;
    color: var(--border-light);
}
.product-card-title {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: .4rem;
}
.product-card-title a { color: var(--text-primary); text-decoration: none; }
.product-card-title a:hover { color: var(--brand-blue); }

.product-card .buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .35rem;
}
.product-card .buy-row-info { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .75rem; }
.product-card .buy-row-stock { font-size: .8rem; }
.product-card .buy-row-price { font-weight: 700; white-space: nowrap; color: var(--text-primary); }
.product-card .buy-form { display: flex; gap: .4rem; margin-top: .35rem; }
.product-card .buy-qty { max-width: 72px; }

.product-card-admin {
    border-top: 1px dashed var(--border-light);
    font-size: .8rem;
    background: var(--bg-soft);
}
.product-card-admin > summary {
    cursor: pointer;
    padding: .4rem .75rem;
    color: var(--text-secondary, #888);
    list-style: none;
}
.product-card-admin > summary::-webkit-details-marker { display: none; }

/* Foil ikona (kometa – foil-star.png z původního Magic singles view) */
.foil-comet { height: 14px; width: auto; vertical-align: middle; }

/* ---- List (řádkové) zobrazení ---- */
.product-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem .75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    margin-bottom: .5rem;
    transition: box-shadow .15s ease;
}
.product-row:hover { box-shadow: var(--shadow-lg); }
.product-row-imgwrap {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.product-row-imgwrap.foil-bg { background-color: #fff6a1; }
.product-row-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-row-noimg { color: var(--border-light); font-size: 1.4rem; }
.product-row-main { flex: 1 1 auto; min-width: 0; }
.product-row-title {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}
.product-row-title:hover { color: var(--brand-blue); }
.product-row-buy {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .25rem;
}
.product-row-offer { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.product-row-offer-meta { display: flex; align-items: center; gap: .25rem; font-size: .75rem; }
.product-row-price { font-weight: 700; white-space: nowrap; }
.product-row-form { display: flex; gap: .35rem; }
.product-row .buy-qty { max-width: 68px; }
.product-row-admin > summary {
    cursor: pointer; list-style: none; color: var(--text-secondary, #888); font-size: .85rem;
}
.product-row-admin > summary::-webkit-details-marker { display: none; }

@media (max-width: 575.98px) {
    .product-row { flex-wrap: wrap; }
    .product-row-buy { align-items: stretch; width: 100%; }
    .product-row-offer { justify-content: space-between; }
}

/* ============ Magic singles – moderní karty ============ */
.single-card { border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; background: #fff; height: 100%; transition: box-shadow .15s ease; }
.single-card:hover { box-shadow: var(--shadow-lg); }
.single-card-head { display: flex; gap: .75rem; padding: .75rem; }
.single-card--grid .single-card-head { flex-direction: column; }
.single-card--grid .single-card-imgwrap { width: 100%; height: 200px; }
.single-card--list .single-card-head { flex-direction: row; align-items: flex-start; }
.single-card--list .single-card-imgwrap { flex: 0 0 90px; width: 90px; height: 126px; }
.single-card-imgwrap { display: flex; align-items: center; justify-content: center; background: var(--bg-soft); border-radius: var(--radius-sm); overflow: hidden; }
.single-card-imgpad { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; padding: 1em; box-sizing: border-box; border-radius: var(--radius-sm); }
.single-card-imgpad.foil-bg { background-color: #fff6a1; }
.single-card-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.single-card-info { flex: 1 1 auto; min-width: 0; }
.single-card-title { font-size: .95rem; font-weight: 600; line-height: 1.25; margin: 0 0 .35rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.single-card-title a { color: var(--text-primary); text-decoration: none; }
.single-card-title a:hover { color: var(--brand-blue); }
.single-card-badges { display: flex; flex-wrap: wrap; gap: .25rem; font-size: .72rem; margin-bottom: .25rem; }
.single-card-buy { border-top: 1px solid var(--border-light); padding: .35rem .75rem; }
.single-card .buy-qty { max-width: 70px; }

.single-card-forms { border-top: 1px solid var(--border-light); }
.single-acc { border-bottom: 1px solid var(--border-light); font-size: .85rem; }
.single-acc:last-child { border-bottom: 0; }
.single-acc > summary { cursor: pointer; list-style: none; padding: .45rem .75rem; color: var(--text-secondary, #666); background: var(--bg-soft); }
.single-acc > summary::-webkit-details-marker { display: none; }
.single-acc[open] > summary { color: var(--brand-blue-dark); }
.single-acc-body { padding: .6rem .75rem; }
.variant-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-top: 1px dashed var(--border-light); }
.variant-row:first-child { border-top: 0; }
.variant-meta { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .75rem; }
.variant-price { font-weight: 600; white-space: nowrap; }
.variant-form { display: flex; gap: .3rem; }
.single-list .single-card { margin-bottom: .6rem; }

.lang-flag { border: 1px solid rgba(0,0,0,.2); border-radius: 2px; vertical-align: middle; }

@media (max-width: 575.98px) {
    .single-card--list .single-card-head { flex-wrap: wrap; }
    .single-card--list .single-card-buy { flex-basis: 100%; align-items: stretch; text-align: left; }
}

/* ============ Drobnosti ============ */
a { color: var(--brand-blue); }
a:hover { color: var(--brand-blue-dark); }
hr { border-color: var(--border-light); opacity: 1; }
code { color: var(--brand-blue-dark); background: var(--brand-blue-soft); padding: 2px 6px; border-radius: 4px; }

/* Mobilní vylepšení */
@media (max-width: 767.98px) {
    .card { border-radius: var(--radius-sm); }
    .table > tbody > tr > td { padding: .5rem .4rem; }
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.25rem; }
}
