/* ==========================================================================
   ZUPP RENTAL Katalógus
   Brand: primary #f37a65, secondary #44acca
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #2d3436;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Header ---------- */
.catalog-header {
    background: #1a1a2e;
    height: 150px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
}

.catalog-header-logo {
    flex-shrink: 0;
}

.catalog-header-logo .logo-screen {
    height: 100px;
    width: auto;
}

.catalog-header-logo .logo-print {
    display: none;
}

.catalog-header-title {
    flex: 1;
    text-align: center;
}

.catalog-header-title h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.0625rem;
    line-height: 1.2;
}

.catalog-header-title p {
    margin: 0.25rem 0 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.03rem;
}

/* ---------- Print / Excel export buttons (in table header) ---------- */
.btn-print,
.btn-export {
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.btn-export {
    margin-left: 1rem;
}

.btn-print:hover,
.btn-export:hover {
    color: #fff;
    opacity: 1;
    text-decoration: none;
}

/* ---------- Main ---------- */
.catalog-main {
    flex: 1;
    max-width: 87.5rem; /* 1400px */
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

/* ---------- Table ---------- */
.catalog-table-wrap {
    background: #fff;
    border-radius: 0.625rem;
    box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.06), 0 0.25rem 1rem rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Kartik GridView overrides */
.catalog-table-wrap .grid-view {
    margin: 0;
}

.catalog-table-wrap table.kv-grid-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.catalog-table-wrap table.kv-grid-table thead tr:first-child th {
    background: #f37a65;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    padding: 0.875rem 1rem;
    border: none;
    border-bottom: 0.125rem solid #e8634e;
    white-space: nowrap;
}

.catalog-table-wrap table.kv-grid-table thead tr:first-child th:first-child {
    text-align: center;
}

.catalog-table-wrap table.kv-grid-table thead tr:first-child th a,
.catalog-table-wrap table.kv-grid-table thead tr:first-child th a:hover {
    color: #fff;
    text-decoration: none;
}

.catalog-table-wrap table.kv-grid-table thead tr:last-child th input,
.catalog-table-wrap table.kv-grid-table thead tr:last-child th select {
    border: 1px solid #e0d0cc;
    border-radius: 0.25rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    width: 100%;
    transition: border-color 0.2s;
}

.catalog-table-wrap table.kv-grid-table thead tr:last-child th input:focus,
.catalog-table-wrap table.kv-grid-table thead tr:last-child th select:focus {
    outline: none;
    border-color: #f37a65;
    box-shadow: 0 0 0 0.125rem rgba(243, 122, 101, 0.15);
}

/* Body rows */
.catalog-table-wrap table.kv-grid-table tbody tr {
    transition: background 0.15s;
}

.catalog-table-wrap table.kv-grid-table tbody tr:hover {
    background: #faf6f5;
}

.catalog-table-wrap table.kv-grid-table tbody tr:nth-child(even) {
    background: #fdfcfc;
}

.catalog-table-wrap table.kv-grid-table tbody tr:nth-child(even):hover {
    background: #faf6f5;
}

.catalog-table-wrap table.kv-grid-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0ebe9;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Thumbnail cell */
.catalog-thumb-cell {
    width: 7.25rem;
    padding: 0.5rem 0.75rem !important;
}

.catalog-thumb {
    width: 6.25rem;
    height: 100px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #eee;
    cursor: pointer;
    transition: opacity 0.2s;
}

.catalog-thumb:hover {
    opacity: 0.8;
}

.catalog-gallery-trigger {
    display: block;
    line-height: 0;
}

.catalog-thumb-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0ef;
    border-radius: 0.375rem;
    color: #ccc;
}

.catalog-thumb-placeholder svg {
    width: 32px;
    height: 32px;
}

/* Price column */
.catalog-price {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

/* Pagination */
.catalog-table-wrap .kv-panel-after {
    background: #fff;
    border-top: 1px solid #f0ebe9;
    padding: 0.75rem 1rem;
}

.catalog-table-wrap .pagination {
    margin: 0;
}

.catalog-table-wrap .pagination .page-link {
    color: #f37a65;
    border-color: #eee;
}

.catalog-table-wrap .pagination .page-item.active .page-link {
    background: #f37a65;
    border-color: #f37a65;
    color: #fff;
}

.catalog-table-wrap .pagination .page-link:hover {
    background: #fff5f3;
    color: #e8634e;
}

/* Sort icons in header */
.catalog-table-wrap table.kv-grid-table thead th .asc,
.catalog-table-wrap table.kv-grid-table thead th .desc {
    color: #fff;
}

/* ---------- Footer ---------- */
.catalog-footer {
    background: #1a1a2e;
    padding: 1.25rem;
    margin-top: 2.5rem;
}

.catalog-footer-inner {
    max-width: 87.5rem;
    margin: 0 auto;
}

.catalog-footer-table {
    width: 100%;
    height: 120px;
    border-collapse: collapse;
    border: 1px solid #3a3a4e;
}

.catalog-footer-table td {
    border: 1px solid #3a3a4e;
    padding: 1rem 1.25rem;
    vertical-align: middle;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-logo-cell {
    width: 9.375rem;
}

.footer-logo-cell img {
    height: 80px;
    width: auto;
}

.footer-label-cell {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.footer-contact-cell a,
.footer-address-cell a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-cell a:hover,
.footer-address-cell a:hover {
    color: #fff;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 48rem) {
    .catalog-header {
        height: auto;
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .catalog-header-logo .logo-screen {
        height: 60px;
    }

    .catalog-header-title {
        flex: 1;
        text-align: center;
    }

    .catalog-header-title h1 {
        font-size: 1.6rem;
    }

    .catalog-header-title .title-brand {
        display: none;
    }

    .catalog-header-title p {
        font-size: 1.2rem;
    }

    .catalog-main {
        padding: 0.75rem 0.5rem;
    }

    .catalog-table-wrap {
        border-radius: 0.375rem;
    }

    .catalog-table-wrap table.kv-grid-table thead tr:first-child th {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
    }

    .catalog-table-wrap table.kv-grid-table tbody td {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }

    .catalog-thumb-cell {
        width: 4.375rem !important;
        padding: 0.375rem !important;
    }

    .catalog-thumb {
        width: 60px;
        height: 60px;
    }

    .catalog-thumb-placeholder {
        width: 60px;
        height: 60px;
    }

    /* Footer mobile: stack cells */
    .catalog-footer-table,
    .catalog-footer-table tbody,
    .catalog-footer-table tr,
    .catalog-footer-table td {
        display: block;
        width: 100%;
    }

    .catalog-footer-table {
        height: auto;
    }

    .catalog-footer-table td {
        padding: 1rem;
    }

    .footer-logo-cell {
        width: 100%;
    }

    .footer-logo-cell img {
        height: 70px;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    body {
        background: #fff;
    }

    .btn-print,
    .btn-export {
        display: none !important;
    }

    .catalog-header {
        height: auto;
        padding: 0.625rem 1.25rem;
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .catalog-header-logo .logo-screen {
        display: none;
    }

    .catalog-header-logo .logo-print {
        display: block;
        height: 80px;
    }

    .catalog-header-title h1 {
        font-size: 1.75rem;
        color: #1a1a2e;
    }

    .catalog-header-title p {
        font-size: 0.875rem;
        color: #666;
    }

    .catalog-main {
        padding: 0 0.625rem;
    }

    .catalog-table-wrap {
        box-shadow: none;
        border-radius: 0;
        margin-top: 3.125rem;
    }

    .catalog-table-wrap table.kv-grid-table thead tr:first-child th {
        background: #f37a65 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .catalog-table-wrap table.kv-grid-table tbody td {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .catalog-thumb {
        width: 60px;
        height: 60px;
    }

    .catalog-thumb-placeholder {
        width: 60px;
        height: 60px;
    }

    .catalog-table-wrap .kv-panel-after {
        display: none;
    }

    .catalog-table-wrap table.kv-grid-table tbody tr:nth-child(even) {
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Hide PhotoSwipe */
    .pswp {
        display: none !important;
    }

    /* Footer print - force desktop layout */
    .catalog-footer {
        background: #fff !important;
        margin-top: 1.25rem;
        padding: 0.625rem;
    }

    .catalog-footer-table {
        height: auto;
        border-color: #333;
        display: table;
    }

    .catalog-footer-table tbody {
        display: table-row-group;
    }

    .catalog-footer-table tr {
        display: table-row;
    }

    .catalog-footer-table td {
        display: table-cell;
        border-color: #333;
        color: #333;
        padding: 0.5rem 0.75rem;
        width: auto;
    }

    .footer-label-cell {
        color: #333;
    }

    .footer-contact-cell a,
    .footer-address-cell a {
        color: #333;
    }

    .footer-logo-cell img {
        height: 50px;
    }
}
