/* ===================================================================================
   HEXXXA COMPONENTS
   Shared, predefined elements of the design manual (DESIGN.md). Loaded on every page
   after hexxxa-base.css. Values come from the reference pages: header, footer, product
   page and checkout. Use these classes for new work instead of page-local copies; the
   live reference is /?hexxxa-styleguide (administrators only).
===================================================================================== */

/* ---------------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------------- */
.hexxxa-section {
    padding: var(--hexxxa-space-9) 0;
}

.hexxxa-section--cream {
    background: var(--hexxxa-cream);
}

.hexxxa-section--dark {
    background: var(--hexxxa-dark-section);
    color: rgba(255, 255, 255, 0.78);
}

.hexxxa-section--dark h1,
.hexxxa-section--dark h2,
.hexxxa-section--dark h3,
.hexxxa-section--dark .hexxxa-section-title {
    color: var(--hexxxa-white);
}

.hexxxa-section--dark p,
.hexxxa-section--dark .hexxxa-section-head p,
.hexxxa-section--dark .hexxxa-lead {
    color: rgba(255, 255, 255, 0.78);
}

.hexxxa-section-head {
    max-width: 720px;
    margin: 0 0 40px;
}

.hexxxa-section-head--center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

/* ---------------------------------------------------------------------------------
   Text
   --------------------------------------------------------------------------------- */
.hexxxa-eyebrow {
    display: block;
    margin: 0 0 var(--hexxxa-space-3);
    color: var(--hexxxa-gold);
    font-family: var(--hexxxa-font-text);
    font-size: var(--hexxxa-fs-small);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hexxxa-eyebrow--muted {
    color: var(--hexxxa-muted);
    font-weight: 500;
    letter-spacing: 1.2px;
}

.hexxxa-section-title {
    margin: 0 0 20px;
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-size: var(--hexxxa-fs-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    text-wrap: balance;
}

.hexxxa-page-title {
    margin: 0;
    color: var(--hexxxa-topbar);
    font-family: var(--hexxxa-font-heading);
    line-height: 1.2;
    text-transform: uppercase;
    font-size: var(--hexxxa-fs-page-title);
    font-weight: 500;
    text-align: center;
}

.hexxxa-card-title {
    margin: 0 0 10px;
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-size: var(--hexxxa-fs-card-title);
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.hexxxa-lead {
    max-width: 58ch;
    margin: 0 0 28px;
    color: var(--hexxxa-dark);
    font-size: var(--hexxxa-fs-lead);
    line-height: 1.65;
}

.hexxxa-section-head p {
    margin: 0;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.65;
}

.hexxxa-footnote {
    margin: 28px 0 0;
    color: var(--text-soft);
    font-size: var(--hexxxa-fs-caption);
    line-height: 1.55;
}

.hexxxa-field-label {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-text);
    font-size: var(--hexxxa-fs-small);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------------------------
   Buttons (base .hexxxa-btn in hexxxa-base.css: gold, 52 px, Oswald uppercase)
   --------------------------------------------------------------------------------- */
.hexxxa-btn--lg {
    min-height: var(--hexxxa-cta-h);
    padding: 8px 32px;
    font-size: 18px;
}

.hexxxa-btn--block {
    display: flex;
    width: 100%;
}

.hexxxa-btn--dark {
    background: var(--hexxxa-brown);
}

.hexxxa-btn--dark:hover {
    background: var(--hexxxa-brown-dark);
}

.hexxxa-btn--light {
    background: var(--hexxxa-white);
    color: var(--hexxxa-brown);
}

.hexxxa-btn--light:hover {
    background: var(--hexxxa-cream);
    color: var(--hexxxa-brown-dark);
}

.hexxxa-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hexxxa-btn:disabled,
.hexxxa-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Text link with an arrow ("Čítajte viac", "Detailné zloženie") */
.hexxxa-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hexxxa-brown);
    font-size: var(--hexxxa-fs-small);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hexxxa-line-strong);
    text-underline-offset: 3px;
}

.hexxxa-link-arrow:hover {
    color: var(--hexxxa-brown-dark);
    text-decoration-color: currentColor;
}

.hexxxa-link-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* "+ Pridať …" — reveals an optional field (checkout, cart coupon) */
.hexxxa-add-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--hexxxa-brown);
    font-family: var(--hexxxa-font-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.hexxxa-add-link::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--hexxxa-gold);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.hexxxa-add-link:hover {
    color: var(--hexxxa-brown-dark);
}

/* ---------------------------------------------------------------------------------
   Tags / badges
   --------------------------------------------------------------------------------- */
.hexxxa-tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--hexxxa-gold);
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-text);
    font-size: var(--hexxxa-fs-caption);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hexxxa-tag--brown {
    background: var(--hexxxa-brown);
    color: var(--hexxxa-white);
}

.hexxxa-tag--cream {
    background: var(--hexxxa-cream-strong);
    color: var(--hexxxa-brown-dark);
}

.hexxxa-tag--dark {
    background: var(--hexxxa-dark);
    color: var(--hexxxa-white);
}

.hexxxa-tag--muted {
    background: var(--hexxxa-line);
    color: var(--hexxxa-muted);
}

/* ---------------------------------------------------------------------------------
   Option card — a radio/checkbox choice (bundles, shipping, payment)
   <label class="hexxxa-option"><input type="radio" …><span class="hexxxa-option-mark"></span>
   <span class="hexxxa-option-body"><span class="hexxxa-option-title">…</span>
   <span class="hexxxa-option-meta">…</span></span><span class="hexxxa-option-aside">…</span></label>
   --------------------------------------------------------------------------------- */
.hexxxa-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 12px;
    padding: 16px 20px;
    background: var(--hexxxa-white);
    border: 2px solid var(--hexxxa-option-line);
    color: var(--hexxxa-dark);
    font-size: var(--hexxxa-fs-body);
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--hexxxa-ease), background var(--hexxxa-ease);
}

@media (hover: hover) {
    .hexxxa-option:hover {
        border-color: var(--hexxxa-gold);
    }
}

.hexxxa-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.hexxxa-option:has(> input:checked) {
    border-color: var(--hexxxa-brown);
    background: var(--hexxxa-selected);
}

.hexxxa-option-mark {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background: var(--hexxxa-white);
    border: 2px solid #d9d2c3;
}

.hexxxa-option:has(> input:checked) .hexxxa-option-mark {
    border-color: var(--hexxxa-brown);
}

.hexxxa-option:has(> input:checked) .hexxxa-option-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--hexxxa-brown);
}

.hexxxa-option > input:focus-visible ~ .hexxxa-option-mark {
    outline: 2px solid var(--hexxxa-brown);
    outline-offset: 2px;
}

.hexxxa-option-body {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hexxxa-option-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.hexxxa-option-meta {
    color: var(--hexxxa-muted);
    font-size: var(--hexxxa-fs-small);
    font-weight: 400;
}

.hexxxa-option-aside {
    flex: 0 0 auto;
    font-family: var(--hexxxa-font-heading);
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------------
   Square checkbox (opt-in class; checkout and cart use the same look)
   --------------------------------------------------------------------------------- */
.hexxxa-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--hexxxa-dark);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

.hexxxa-checkbox input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    background: var(--hexxxa-white) center / 14px 14px no-repeat;
    border: 2px solid #cfc6b5;
    border-radius: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.hexxxa-checkbox input[type="checkbox"]:checked {
    background-color: var(--hexxxa-brown);
    border-color: var(--hexxxa-brown);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------------------
   Quantity stepper (woocommerce/global/quantity-input.php; pages may resize it)
   --------------------------------------------------------------------------------- */
.hexxxa-qty {
    display: inline-flex;
    align-items: stretch;
    height: var(--hexxxa-control-h);
    background: var(--hexxxa-white);
    border: 1px solid var(--hexxxa-line-strong);
}

.hexxxa-qty .qty {
    flex: 1 1 auto;
    width: 52px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-size: 19px;
    font-weight: 500;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.hexxxa-qty .qty::-webkit-outer-spin-button,
.hexxxa-qty .qty::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.hexxxa-qty:focus-within {
    border-color: var(--hexxxa-brown);
    box-shadow: var(--hexxxa-focus-ring);
}

.hexxxa-qty .qty:focus {
    box-shadow: none;
}

.hexxxa-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--hexxxa-dark);
    cursor: pointer;
    transition: background var(--hexxxa-ease), color var(--hexxxa-ease);
}

.hexxxa-qty-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.hexxxa-qty-btn:hover:not(:disabled) {
    background: var(--hexxxa-cream);
    color: var(--hexxxa-brown);
}

.hexxxa-qty-btn:disabled {
    color: var(--hexxxa-disabled);
    cursor: default;
}

/* ---------------------------------------------------------------------------------
   Cards and panels
   --------------------------------------------------------------------------------- */
.hexxxa-card {
    padding: 28px;
    background: var(--hexxxa-white);
    border: 1px solid var(--hexxxa-line);
}

.hexxxa-card--raised {
    border: 0;
    box-shadow: var(--hexxxa-shadow-card);
}

.hexxxa-card--selected {
    border: 2px solid var(--hexxxa-brown);
    background: var(--hexxxa-selected);
}

/* Highlighted info: free-shipping progress, notes, quotes */
.hexxxa-panel {
    padding: 14px 18px;
    border-left: 3px solid var(--hexxxa-gold);
    background: var(--hexxxa-cream);
    color: var(--hexxxa-dark);
}

.hexxxa-panel--success {
    border-left-color: var(--hexxxa-success);
    background: #f0f6f1;
}

.hexxxa-panel--error {
    border-left-color: var(--hexxxa-error);
    background: #fdf3f2;
}

/* ---------------------------------------------------------------------------------
   Lists
   --------------------------------------------------------------------------------- */
.hexxxa-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hexxxa-checklist > li {
    position: relative;
    margin: 0;
    padding: 12px 0 12px 34px;
    border-bottom: 1px solid var(--hexxxa-line-strong);
    color: var(--hexxxa-dark);
}

.hexxxa-checklist > li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 9px;
    margin-top: -7px;
    border-bottom: 2px solid var(--hexxxa-brown);
    border-left: 2px solid var(--hexxxa-brown);
    transform: rotate(-45deg);
}

/* Icon + short fact (trust lists in the cart, badges row on the product page) */
.hexxxa-trust-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hexxxa-trust-list > li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--text-soft);
    font-size: var(--hexxxa-fs-small);
    line-height: 1.4;
}

.hexxxa-trust-list svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--hexxxa-brown);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------------------------------------------------------------------------------
   Disclosure (accordion) — native <details>/<summary>
   --------------------------------------------------------------------------------- */
.hexxxa-disclosure {
    border-top: 1px solid var(--hexxxa-line-strong);
    border-bottom: 1px solid var(--hexxxa-line-strong);
}

.hexxxa-disclosure + .hexxxa-disclosure {
    border-top: 0;
}

.hexxxa-disclosure > summary {
    position: relative;
    padding: 20px 40px 20px 0;
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
}

.hexxxa-disclosure > summary::-webkit-details-marker {
    display: none;
}

.hexxxa-disclosure > summary::before,
.hexxxa-disclosure > summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 6px;
    width: 16px;
    height: 2px;
    background: var(--hexxxa-brown);
    transition: transform var(--hexxxa-ease);
}

.hexxxa-disclosure > summary::after {
    transform: rotate(90deg);
}

.hexxxa-disclosure[open] > summary::after {
    transform: rotate(0deg);
}

.hexxxa-disclosure-body {
    padding: 0 0 24px;
}

/* ---------------------------------------------------------------------------------
   Price
   --------------------------------------------------------------------------------- */
.hexxxa-price {
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-size: var(--hexxxa-fs-price);
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.hexxxa-price--compare {
    color: #9b9b9b;
    font-size: 22px;
    font-weight: 500;
    text-decoration: line-through;
}

/* ---------------------------------------------------------------------------------
   Table (nutrition, comparisons)
   --------------------------------------------------------------------------------- */
.hexxxa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.hexxxa-table th,
.hexxxa-table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--hexxxa-line);
    text-align: left;
}

.hexxxa-table thead th {
    border-bottom: 2px solid var(--hexxxa-line-strong);
    color: var(--hexxxa-dark);
    font-family: var(--hexxxa-font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hexxxa-table-wrap {
    overflow-x: auto;
}

/* ---------------------------------------------------------------------------------
   Breadcrumb
   --------------------------------------------------------------------------------- */
.hexxxa-breadcrumb,
.hexxxa-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    color: var(--hexxxa-muted);
    font-size: var(--hexxxa-fs-small);
}

.hexxxa-breadcrumb a {
    color: var(--hexxxa-brown);
}

/* ---------------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .hexxxa-section {
        padding: var(--hexxxa-space-8) 0;
    }

    .hexxxa-section-title {
        font-size: 32px;
    }

    .hexxxa-page-title {
        font-size: 32px;
    }

    .hexxxa-lead {
        font-size: 17px;
    }

    .hexxxa-card-title {
        font-size: 21px;
    }

    .hexxxa-option {
        gap: 12px;
        padding: 14px 16px;
    }

    .hexxxa-price {
        font-size: 34px;
    }
}

/* Required-field marker next to labels */
.hexxxa-required {
    color: var(--hexxxa-error);
}
