/* ══════════════════════════════════════════════════════════════════════════
   Hrad Prodej — Frontend styly (optimalizováno)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Základní wrapper ──────────────────────────────────────────────────────── */

.hrad-prodej-wrap {
    width: 100%;
    padding: 24px 0;
}

.hrad-prodej-wrap h1,
.hrad-prodej-wrap h2 {
    text-align: center;
}

.hrad-prodej-wrap h1 {
    font-size: 28px;
}

/* Reset DIVI tabulkových borderů */
.hrad-prodej-wrap table,
.hrad-prodej-wrap table tr,
.hrad-prodej-wrap table td,
.hrad-prodej-wrap table th {
    border: none !important;
}

/* ── Tlačítka ──────────────────────────────────────────────────────────────── */

.hrad-prodej-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.hrad-prodej-btn:hover {
    background: #1a252f;
    color: #fff;
}

.hrad-prodej-btn--primary { background: #27ae60; }
.hrad-prodej-btn--primary:hover { background: #1e8449; }

.hrad-prodej-btn--secondary { background: #95a5a6; }
.hrad-prodej-btn--secondary:hover { background: #7f8c8d; }

.hrad-prodej-btn--cart { background: #e67e22; }
.hrad-prodej-btn--cart:hover { background: #ca6f1e; }

.hrad-prodej-btn--danger { background: #e74c3c; }
.hrad-prodej-btn--danger:hover { background: #c0392b; }

.hrad-prodej-btn-remove {
    background: #c0392b;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.2s;
}

.hrad-prodej-btn-remove:hover { background: #922b21; }

.hrad-prodej-btn-small {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-width: auto !important;
}

/* ── Drobečková navigace ───────────────────────────────────────────────────── */

.hrad-prodej-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 14px;
    color: #888;
    margin: 15px 0;
    flex-wrap: wrap;
}

.hrad-prodej-breadcrumb a {
    color: #e67e22;
    font-weight: 600;
    text-decoration: none;
}

.hrad-prodej-breadcrumb a:hover { text-decoration: underline; }
.hrad-prodej-breadcrumb__sep { color: #ccc; margin: 0 2px; }
.hrad-prodej-breadcrumb__current { color: #333; }

/* ── Akce (tlačítka) — univerzální ─────────────────────────────────────────── */

.hrad-prodej-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Zpětná kompatibilita */
.hrad-prodej-cart-actions,
.hrad-prodej-form__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.hrad-prodej-form__actions { margin-top: 40px; }

/* ── Notifikace ────────────────────────────────────────────────────────────── */

.hrad-prodej-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.hrad-prodej-notice--error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ── Prázdný stav ──────────────────────────────────────────────────────────── */

.hrad-prodej-empty {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 16px;
}

/* ── Galerie ───────────────────────────────────────────────────────────────── */

.hrad-prodej-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.hrad-prodej-card {
    overflow: hidden;
}

.hrad-prodej-card .hrad-prodej-zoom { display: block; }

.hrad-prodej-card__img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.hrad-prodej-card__no-img {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: #f5f5f5;
}

.hrad-prodej-card__body {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hrad-prodej-card__title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.hrad-prodej-cart-bar {
    text-align: center;
    margin-bottom: 40px;
}

/* ── Detail produktu ───────────────────────────────────────────────────────── */

.hrad-prodej-product {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7vw;
    align-items: start;
    margin: 40px 0;
}

.hrad-prodej-product__info { width: 320px; }
.hrad-prodej-product__img { width: 100%; border-radius: 8px; }
.hrad-prodej-product__title { margin-top: 0; font-size: 28px; }
.hrad-prodej-product__desc { color: #555; line-height: 1.6; }

.hrad-prodej-sizes {
    border: none;
    padding: 0;
    margin: 16px 0;
}

.hrad-prodej-sizes legend {
    font-weight: 600;
    margin-bottom: 8px;
}

.hrad-prodej-size-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.hrad-prodej-size-option:has(input:checked) {
    border-color: #27ae60;
    background: #f0fff4;
}

.hrad-prodej-size-option__label { flex: 1; font-weight: 500; font-size: 16px; }
.hrad-prodej-size-option__price { font-weight: 700; color: #2c3e50; }

.hrad-prodej-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.hrad-prodej-qty input {
    width: 70px;
    padding: 8px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.hrad-prodej-link-back {
    display: block;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
}

/* ── Tabulky (košík, souhrn) ───────────────────────────────────────────────── */

.hrad-prodej-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    margin: 40px 0;
}

.hrad-prodej-table th,
.hrad-prodej-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.hrad-prodej-table th {
    background: #f0f8ff;
    font-weight: 600;
}

/* Zpětná kompatibilita */
.hrad-prodej-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    margin: 40px 0 !important;
}

.hrad-prodej-cart-table th,
.hrad-prodej-cart-table td {
    padding: 6px 15px !important;
    border-bottom: 1px solid #e0e0e0;
    text-align: center !important;
}

.hrad-prodej-cart-table th {
    background: #f0f8ff;
    font-weight: 600;
}

.hrad-prodej-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    text-align: left;
}

.hrad-prodej-summary-table th,
.hrad-prodej-summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0 !important;
}

.hrad-prodej-summary-table th { font-weight: 700; color: #333; }
.hrad-prodej-summary-table tfoot td { border-bottom: none !important; padding-top: 14px; }

.hrad-prodej-right { text-align: right !important; }

.hrad-prodej-qty-input {
    width: 60px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ── Souhlasy (checkboxy) ──────────────────────────────────────────────────── */

.hrad-prodej-consents {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.hrad-prodej-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.hrad-prodej-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.hrad-prodej-consent a {
    color: #e67e22;
    text-decoration: underline;
}

/* ── Formulář ──────────────────────────────────────────────────────────────── */

.hrad-prodej-form { margin-top: 40px; }

.hrad-prodej-form__field { margin-bottom: 20px; }

.hrad-prodej-form__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.hrad-prodej-form__field input {
    width: 100%;
    padding: 10px 12px !important;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.hrad-prodej-form__field input:focus {
    outline: none;
    border-color: #27ae60;
}

.hrad-prodej-form__row { display: grid; grid-template-columns: 1fr 140px; gap: 40px; }
.hrad-prodej-form__row--addr { grid-template-columns: 2fr 2fr 90px 1.5fr; }
.hrad-prodej-form__row--2 { grid-template-columns: 250px 250px; }

/* ── Bloky (souhrn, potvrzení) ─────────────────────────────────────────────── */

.hrad-prodej-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin: 40px 0;
}

.hrad-prodej-blocks > * { min-width: 0; }

.hrad-prodej-blocks__left {
    display: flex;
    flex-direction: column;
    gap: 60px;
    min-width: 0;
}

.hrad-prodej-blocks__right {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hrad-prodej-block {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 30px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hrad-prodej-block__title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    color: #2c3e50;
    font-size: 20px;
}

/* ── Položky v souhrnu ─────────────────────────────────────────────────────── */

.hrad-prodej-items__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.hrad-prodej-items__name { flex: 1; font-weight: 500; }
.hrad-prodej-items__name small { display: block; color: #888; font-size: 12px; font-weight: 400; }
.hrad-prodej-items__qty { color: #666; font-size: 13px; white-space: nowrap; }
.hrad-prodej-items__price { font-weight: 600; white-space: nowrap; }

.hrad-prodej-items__total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    font-size: 15px;
}

/* ── Platební údaje ────────────────────────────────────────────────────────── */

.hrad-prodej-payment-box {
    margin: 20px 0;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
	font-size: 16px;
}

.hrad-prodej-payment-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hrad-prodej-payment-dl__row {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.hrad-prodej-payment-dl__row dt {
    color: #666;
    white-space: nowrap;
    min-width: 160px;
}

.hrad-prodej-payment-dl__row dd {
    margin: 0;
}

.hrad-prodej-vs {
    letter-spacing: 2px;
    color: #c0392b;
}

.hrad-prodej-qr {
    text-align: center;
    margin: auto;
}

/* Na stránce potvrzení je box centrovaný — QR se neposouvá doprava */
.hrad-prodej-complete .hrad-prodej-payment-box .hrad-prodej-qr {
    margin: 0;
}

.hrad-prodej-address {
    font-style: normal;
    line-height: 1.7 !important;
    /*padding: 12px 10px;*/
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ── Stránka potvrzení ─────────────────────────────────────────────────────── */

.hrad-prodej-complete { text-align: center; }

.hrad-prodej-complete .hrad-prodej-payment-box {
    text-align: left;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.hrad-prodej-complete__icon {
    width: 72px;
    height: 72px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    line-height: 72px;
    margin: 0 auto 16px;
}

.hrad-prodej-complete h1 { color: #c0392b; }
.hrad-prodej-complete h2 { color: #e67e22; margin-top: 40px; }
.hrad-prodej-complete__subtitle { color: #555; margin-bottom: 24px; }
.hrad-prodej-complete__footer { margin-top: 40px; }

/* ── Overlay (lightbox + modal) ────────────────────────────────────────────── */

.hrad-prodej-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.hrad-prodej-overlay[hidden] { display: none; }

/* Lightbox */
.hrad-prodej-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.hrad-prodej-lightbox[hidden] { display: none; }

.hrad-prodej-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    cursor: default;
}

.hrad-prodej-lightbox__close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.hrad-prodej-lightbox__close:hover { opacity: 1; }

/* Modal */
.hrad-prodej-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hrad-prodej-modal[hidden] { display: none; }

.hrad-prodej-modal__box {
    background: #fff;
    border-radius: 8px;
    padding: 40px 32px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.hrad-prodej-modal__msg { font-size: 16px; margin: 0 0 24px; }
.hrad-prodej-modal__actions { display: flex; gap: 12px; justify-content: center; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONZIVNÍ STYLY
   ══════════════════════════════════════════════════════════════════════════ */

/* Tablet: formulář adresa */
@media (max-width: 768px) {
    .hrad-prodej-form__row--addr { grid-template-columns: 1fr 1fr; }
}

/* Tablet: souhrn na jeden sloupec */
@media (max-width: 860px) {
    .hrad-prodej-blocks { grid-template-columns: 1fr; gap: 20px; }
    .hrad-prodej-blocks__left { gap: 20px; }
}

/* Mobil */
@media (max-width: 640px) {
    /* Produkt */
    .hrad-prodej-product { grid-template-columns: 1fr; }

    /* Formuláře */
    .hrad-prodej-form__row,
    .hrad-prodej-form__row--addr,
    .hrad-prodej-form__row--2 { grid-template-columns: 1fr; }

    /* Akce na celou šířku */
    .hrad-prodej-cart-actions,
    .hrad-prodej-form__actions { flex-direction: column; }

    .hrad-prodej-cart-actions > *,
    .hrad-prodej-form__actions > * {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* Platební box */
    .hrad-prodej-payment-box { flex-direction: column; }

    /* Košík — card layout */
    .hrad-prodej-cart-table thead { display: none; }
    .hrad-prodej-cart-table,
    .hrad-prodej-cart-table tbody,
    .hrad-prodej-cart-table tfoot { display: block; }

    .hrad-prodej-cart-table tbody tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 14px;
        overflow: hidden;
    }

    .hrad-prodej-cart-thumb {
        display: block !important;
        text-align: center !important;
        padding: 12px !important;
        background: #fafafa;
        border-bottom: 1px solid #e0e0e0;
    }

    .hrad-prodej-cart-thumb img { width: 80px !important; height: 80px !important; }

    .hrad-prodej-cart-remove {
        display: flex !important;
        justify-content: flex-end !important;
        padding: 8px 12px !important;
        border-top: 1px solid #e0e0e0;
    }

    .hrad-prodej-cart-table tbody td[data-label] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        padding: 10px 14px !important;
        border-bottom: 1px solid #f5f5f5;
    }

    .hrad-prodej-cart-table tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        font-size: 13px;
        margin-right: 12px;
    }

    .hrad-prodej-cart-table tfoot tr {
        display: flex;
        justify-content: space-between;
        padding: 12px 14px;
        background: #f5f5f5;
        border-radius: 8px;
        margin-top: 4px;
    }

    .hrad-prodej-cart-table tfoot td {
        display: block !important;
        border: none !important;
        padding: 0 !important;
    }
}
