/* =========================================
   ESHOP CORE
   Stabilni, prenositelny zaklad frontendu e-shopu
   Bez projektoveho brandingu
========================================= */

/* =========================================
   1. Core variables with fallback values
========================================= */

:root {
    --eshop-color-primary: #5f5f5f;
    --eshop-color-accent: #b08b57;
    --eshop-color-text: #222222;
    --eshop-color-background: #ffffff;
    --eshop-color-muted-background: #f7f7f7;
    --eshop-color-border: #dddddd;

    --eshop-radius-base: 8px;
    --eshop-shadow-base: 0 2px 12px rgba(0, 0, 0, 0.08);

    --eshop-font-family-base: Arial, sans-serif;

    --eshop-spacing-xs: 4px;
    --eshop-spacing-sm: 8px;
    --eshop-spacing-md: 16px;
    --eshop-spacing-lg: 24px;
    --eshop-spacing-xl: 40px;

    --eshop-container-width: 1200px;

    --eshop-font-size-body: 16px;
    --eshop-font-size-small: 14px;
    --eshop-font-size-h1: 32px;
    --eshop-font-size-h2: 24px;
    --eshop-font-size-h3: 20px;

    --eshop-line-height-body: 1.6;
    --eshop-line-height-heading: 1.25;

    --eshop-button-padding-y: 12px;
    --eshop-button-padding-x: 18px;
}

/* =========================================
   2. Technical base
========================================= */

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* =========================================
   3. Layout
========================================= */

body.eshop-layout {
    margin: 0;
    font-family: var(--eshop-font-family-base);
    font-size: var(--eshop-font-size-body);
    line-height: var(--eshop-line-height-body);
    color: var(--eshop-color-text);
    background: var(--eshop-color-background);
}

.eshop-container {
    width: 100%;
    max-width: calc(var(--eshop-container-width) + (var(--eshop-spacing-lg) * 2));
    margin: 0 auto;
    padding-left: var(--eshop-spacing-lg);
    padding-right: var(--eshop-spacing-lg);
}

.eshop-header,
.eshop-navigation,
.eshop-main,
.eshop-footer {
    width: 100%;
}

.eshop-header {
    padding: var(--eshop-spacing-lg) 0;
}

.eshop-navigation {
    border-top: 1px solid var(--eshop-color-border);
    border-bottom: 1px solid var(--eshop-color-border);
}

.eshop-main {
    padding: var(--eshop-spacing-xl) 0;
}

.eshop-footer {
    padding: var(--eshop-spacing-lg) 0;
    border-top: 1px solid var(--eshop-color-border);
}

.eshop-layout--standalone .eshop-main > .eshop-container {
    min-width: 0;
}

.eshop-embedded-wrapper {
    width: 100%;
    max-width: var(--eshop-container-width);
    margin: 0 auto;
    padding: var(--eshop-spacing-lg);
}

/* =========================================
   4. Typography
========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: var(--eshop-spacing-md);
    line-height: var(--eshop-line-height-heading);
    font-weight: 600;
    color: inherit;
}

h1 {
    font-size: var(--eshop-font-size-h1);
}

h2 {
    font-size: var(--eshop-font-size-h2);
}

h3 {
    font-size: var(--eshop-font-size-h3);
}

p,
ul,
ol {
    margin-top: 0;
    margin-bottom: var(--eshop-spacing-md);
}

ul,
ol {
    padding-left: 1.25rem;
}

small {
    font-size: var(--eshop-font-size-small);
}

strong {
    font-weight: 600;
}

/* Rich text / content typography */

.eshop-content {
    max-width: 860px;
}

.eshop-content > :last-child {
    margin-bottom: 0;
}

.eshop-content h1,
.eshop-content h2,
.eshop-content h3,
.eshop-content h4,
.eshop-content h5,
.eshop-content h6 {
    margin-top: var(--eshop-spacing-lg);
}

.eshop-content h1:first-child,
.eshop-content h2:first-child,
.eshop-content h3:first-child,
.eshop-content h4:first-child,
.eshop-content h5:first-child,
.eshop-content h6:first-child {
    margin-top: 0;
}

.eshop-content p,
.eshop-content ul,
.eshop-content ol,
.eshop-content table,
.eshop-content blockquote {
    margin-bottom: var(--eshop-spacing-md);
}

.eshop-content ul,
.eshop-content ol {
    padding-left: 1.25rem;
}

.eshop-content li + li {
    margin-top: var(--eshop-spacing-xs);
}

.eshop-content table th,
.eshop-content table td {
    padding: var(--eshop-spacing-sm) var(--eshop-spacing-md);
    border: 1px solid var(--eshop-color-border);
    text-align: left;
    vertical-align: top;
}

.eshop-content table th {
    font-weight: 600;
    background: var(--eshop-color-muted-background);
}

.eshop-content blockquote {
    margin-left: 0;
    padding-left: var(--eshop-spacing-md);
    border-left: 3px solid var(--eshop-color-border);
}

.eshop-content hr {
    border: 0;
    border-top: 1px solid var(--eshop-color-border);
    margin: var(--eshop-spacing-lg) 0;
}

/* =========================================
   5. Links and buttons
========================================= */

a {
    color: var(--eshop-color-primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--eshop-color-accent);
    outline-offset: 2px;
}

.eshop-button,
a.eshop-button,
button.eshop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--eshop-spacing-sm);
    padding: var(--eshop-button-padding-y) var(--eshop-button-padding-x);
    border: 1px solid var(--eshop-color-primary);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-primary);
    color: #ffffff;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.eshop-button:hover,
a.eshop-button:hover,
button.eshop-button:hover {
    text-decoration: none;
    opacity: 0.92;
}

.eshop-button--secondary,
a.eshop-button--secondary,
button.eshop-button--secondary {
    background: transparent;
    color: var(--eshop-color-primary);
}

/* =========================================
   6. Shared sections
========================================= */
.eshop-page-heading {
    margin-bottom: var(--eshop-spacing-xl);
}

.eshop-page-heading h1 {
    margin-bottom: var(--eshop-spacing-sm);
}

.eshop-page-heading p {
    max-width: 760px;
    color: inherit;
}

.eshop-page-heading h1:last-child,
.eshop-page-heading p:last-child,
.eshop-section > :last-child {
    margin-bottom: 0;
}

.eshop-section {
    display: block;
}

.eshop-section + .eshop-section {
    margin-top: var(--eshop-spacing-xl);
}

.eshop-section__header {
    margin-bottom: var(--eshop-spacing-lg);
}

.eshop-section__header h2:last-child,
.eshop-section__header p:last-child {
    margin-bottom: 0;
}

.eshop-section__meta {
    font-size: var(--eshop-font-size-small);
}

.eshop-page {
    display: block;
}

.eshop-page__content {
    max-width: 860px;
}

.eshop-page__content > :last-child {
    margin-bottom: 0;
}

.eshop-empty-state {
    padding: var(--eshop-spacing-lg);
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-muted-background);
}

.eshop-search-form {
    margin-top: var(--eshop-spacing-lg);
}

.eshop-search-form__row {
    display: flex;
    align-items: end;
    gap: var(--eshop-spacing-md);
    flex-wrap: wrap;
}

.eshop-search-form__field {
    flex: 1 1 320px;
}

.eshop-search-form__field label {
    display: inline-block;
    margin-bottom: var(--eshop-spacing-xs);
    font-weight: 600;
}

.eshop-search-form__field input[type="search"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}

.eshop-search-form__actions {
    flex: 0 0 auto;
}

.eshop-search-meta {
    display: grid;
    gap: var(--eshop-spacing-xs);
    margin-top: var(--eshop-spacing-sm);
}

.eshop-search-meta .eshop-section__meta {
    margin: 0;
}

/* =========================================
   7. Header / brand / navigation / footer
========================================= */
.eshop-header__inner,
.eshop-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--eshop-spacing-md);
}

.eshop-header__inner {
    min-height: 48px;
}

.eshop-brand,
.eshop-footer__brand {
    min-width: 0;
}

.eshop-brand__link,
.eshop-brand__static {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    min-height: 40px;
}

.eshop-brand__logo {
    max-height: 56px;
    width: auto;
}

.eshop-brand__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.2;
}

.eshop-navigation__inner {
    display: flex;
    align-items: center;
    min-height: 56px;
}

.eshop-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--eshop-spacing-xs) var(--eshop-spacing-md);
    list-style: none;
    margin: 0;
    padding: var(--eshop-spacing-sm) 0;
}

.eshop-nav__item {
    margin: 0;
}

.eshop-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 var(--eshop-spacing-xs);
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
}

.eshop-nav__link:hover {
    text-decoration: underline;
}

.eshop-footer__inner {
    min-height: 32px;
}

.eshop-footer__text {
    margin: 0;
    font-size: var(--eshop-font-size-small);
}

.eshop-header__inner {
    flex-wrap: wrap;
}

.eshop-header-search {
    display: flex;
    align-items: center;
    gap: var(--eshop-spacing-sm);
    margin-left: auto;
    min-width: min(100%, 420px);
}

.eshop-header-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eshop-header-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}

.eshop-header-search__button {
    flex: 0 0 auto;
}

/* =========================================
   8. Category list
========================================= */

.eshop-breadcrumbs {
    margin-bottom: var(--eshop-spacing-lg);
}

.eshop-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--eshop-spacing-xs) var(--eshop-spacing-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.eshop-breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: var(--eshop-spacing-sm);
    margin: 0;
    font-size: var(--eshop-font-size-small);
    line-height: 1.4;
}

.eshop-breadcrumbs__item:not(:last-child)::after {
    content: "/";
    color: var(--eshop-color-border);
}

.eshop-breadcrumbs__link,
.eshop-breadcrumbs__current {
    display: inline-block;
}

.eshop-category-navigation {
    margin-bottom: var(--eshop-spacing-xl);
    padding: var(--eshop-spacing-lg);
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
}

.eshop-category-navigation__title {
    margin-bottom: var(--eshop-spacing-md);
    font-size: 1.125rem;
}

.eshop-category-navigation__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eshop-category-navigation__list--level-0 {
    display: grid;
    gap: var(--eshop-spacing-sm);
}

.eshop-category-navigation__list--level-1,
.eshop-category-navigation__list--level-2,
.eshop-category-navigation__list--level-3 {
    margin-top: var(--eshop-spacing-sm);
    margin-left: var(--eshop-spacing-md);
    padding-left: var(--eshop-spacing-md);
    border-left: 1px solid var(--eshop-color-border);
    display: grid;
    gap: var(--eshop-spacing-xs);
}

.eshop-category-navigation__item {
    margin: 0;
}

.eshop-category-navigation__link {
    display: inline-block;
    line-height: 1.45;
}

.eshop-category-navigation__link--current {
    font-weight: 700;
}

.eshop-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--eshop-spacing-md);
    list-style: none;
    padding: 0;
    margin: 0;
}

.eshop-category-list__item {
    margin: 0;
}

.eshop-category-list__item a {
    display: block;
    padding: var(--eshop-spacing-md);
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
}

/* =========================================
   9. Product grid and card
========================================= */
.eshop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--eshop-spacing-lg);
}

.eshop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--eshop-spacing-lg);
}

.eshop-product-card {
    display: flex;
    flex-direction: column;
    padding: var(--eshop-spacing-lg);
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    box-shadow: var(--eshop-shadow-base);
    min-height: 100%;
}

.eshop-product-card__image {
    margin: 0 0 var(--eshop-spacing-md);
}

.eshop-product-card__image a {
    display: block;
}

.eshop-product-card__image img {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: var(--eshop-radius-base);
}

.eshop-product-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--eshop-spacing-sm);
    flex: 1 1 auto;
}

.eshop-product-card__title,
.eshop-product-card__code,
.eshop-product-card__description,
.eshop-product-card__availability,
.eshop-product-card__stock,
.eshop-product-card__link {
    margin: 0;
}

.eshop-product-card__title {
    font-size: 1.125rem;
    line-height: 1.3;
}

.eshop-product-card__title a {
    color: inherit;
    text-decoration: none;
}

.eshop-product-card__title a:hover {
    text-decoration: underline;
}

.eshop-product-card__code,
.eshop-product-card__availability,
.eshop-product-card__stock {
    font-size: var(--eshop-font-size-small);
    line-height: 1.45;
}

.eshop-product-card__description {
    color: inherit;
    line-height: 1.55;
}

.eshop-product-card__price {
    display: grid;
    gap: var(--eshop-spacing-xs);
    margin: 0;
    padding-top: var(--eshop-spacing-sm);
}

.eshop-product-card__price strong {
    display: block;
    font-size: 1.125rem;
    line-height: 1.35;
}

.eshop-product-card__price small {
    display: block;
    line-height: 1.45;
}

.eshop-product-card__meta {
    display: grid;
    gap: var(--eshop-spacing-xs);
    padding-top: var(--eshop-spacing-xs);
}

.eshop-product-card__actions {
    display: grid;
    gap: var(--eshop-spacing-sm);
    margin-top: var(--eshop-spacing-md);
}

.eshop-product-card__cart-form {
    display: grid;
    gap: var(--eshop-spacing-sm);
}

.eshop-product-card__quantity {
    display: grid;
    gap: var(--eshop-spacing-xs);
}

.eshop-product-card__quantity label {
    font-size: var(--eshop-font-size-small);
    font-weight: 600;
}

.eshop-product-card__cart-form input[type="number"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}

.eshop-product-card__cart-form .eshop-button,
.eshop-product-card__link .eshop-button {
    width: 100%;
}

/* =========================================
   10. Product detail
========================================= */
.eshop-product-detail {
    display: grid;
    gap: var(--eshop-spacing-xl);
}

.eshop-product-detail__top {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--eshop-spacing-xl);
    align-items: start;
}

.eshop-product-detail__media {
    display: grid;
    gap: var(--eshop-spacing-lg);
    min-width: 0;
}

.eshop-product-detail__summary {
    display: grid;
    gap: var(--eshop-spacing-md);
    align-content: start;
    min-width: 0;
}

.eshop-product-detail__image,
.eshop-product-detail__gallery,
.eshop-product-detail__purchase {
    min-width: 0;
}

.eshop-product-detail__image-link,
.eshop-product-gallery__link {
    display: block;
}

.eshop-product-detail__image img {
    width: 100%;
    max-width: 100%;
    object-fit: contain;
}

.eshop-product-detail__gallery {
    display: grid;
    gap: var(--eshop-spacing-sm);
}

.eshop-product-detail__gallery h2 {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.eshop-product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 120px));
    gap: var(--eshop-spacing-sm);
}

.eshop-product-gallery__item {
    margin: 0;
}

.eshop-product-gallery__item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.eshop-product-detail__code,
.eshop-product-detail__availability,
.eshop-product-detail__stock {
    margin: 0;
    font-size: var(--eshop-font-size-small);
    line-height: 1.45;
}

.eshop-product-detail__price {
    display: grid;
    gap: var(--eshop-spacing-xs);
    margin: 0;
}

.eshop-product-detail__price p {
    margin: 0;
}

.eshop-product-detail__price strong {
    display: block;
    font-size: 1.5rem;
    line-height: 1.25;
}

.eshop-product-detail__price small {
    display: block;
    line-height: 1.45;
}

.eshop-product-detail__short-description {
    font-size: 1.05rem;
    line-height: 1.6;
}

.eshop-product-detail__short-description p:last-child,
.eshop-product-detail__description > :last-child {
    margin-bottom: 0;
}

.eshop-product-detail__description {
    max-width: 900px;
}

.eshop-product-detail__description h2,
.eshop-product-detail__description h3,
.eshop-product-detail__description h4 {
    margin-top: var(--eshop-spacing-lg);
}

.eshop-product-detail__purchase {
    padding-top: var(--eshop-spacing-md);
    border-top: 1px solid var(--eshop-color-border);
}

.eshop-product-detail__purchase-form {
    display: grid;
    gap: var(--eshop-spacing-md);
    max-width: 320px;
}

.eshop-product-detail__quantity {
    display: grid;
    gap: var(--eshop-spacing-xs);
}

.eshop-product-detail__quantity label {
    font-size: var(--eshop-font-size-small);
    font-weight: 600;
}

.eshop-product-detail__quantity input[type="number"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}

.eshop-product-detail__actions {
    padding-top: 0;
}

.eshop-product-detail__actions .eshop-button {
    width: 100%;
}

/* Lightbox */

.eshop-lightbox[hidden] {
    display: none;
}

.eshop-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.eshop-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.eshop-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.eshop-lightbox__figure {
    margin: 0;
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    text-align: center;
}

.eshop-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: 12px;
}

.eshop-lightbox__caption {
    margin-top: 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.eshop-lightbox__close,
.eshop-lightbox__nav {
    position: absolute;
    z-index: 2;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}

.eshop-lightbox__close {
    top: 1.25rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 2rem;
}

.eshop-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
}

.eshop-lightbox__nav--prev {
    left: 1.25rem;
}

.eshop-lightbox__nav--next {
    right: 1.25rem;
}

.eshop-lightbox-open {
    overflow: hidden;
}
/* =========================================
   11. Cart / checkout / tables / forms
========================================= */

.eshop-cart,
.eshop-checkout-form {
    display: grid;
    gap: var(--eshop-spacing-lg);
}

.eshop-cart__table-wrap {
    width: 100%;
    overflow-x: auto;
}

.eshop-cart-table {
    width: 100%;
    min-width: 720px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    overflow: hidden;
    background: var(--eshop-color-background);
}

.eshop-cart-table th,
.eshop-cart-table td {
    padding: var(--eshop-spacing-md);
    border-bottom: 1px solid var(--eshop-color-border);
    text-align: left;
    vertical-align: middle;
}

.eshop-cart-table thead th {
    font-weight: 600;
    background: var(--eshop-color-muted-background);
}

.eshop-cart-table td strong,
.eshop-cart-table td small {
    display: block;
}

.eshop-cart-table td strong {
    line-height: 1.4;
}

.eshop-cart-table td small {
    margin-top: var(--eshop-spacing-xs);
    line-height: 1.45;
}

.eshop-cart-table td p {
    margin: 0;
}

.eshop-cart-table tbody tr:last-child td {
    border-bottom: 0;
}

.eshop-cart-summary {
    display: grid;
    gap: var(--eshop-spacing-sm);
    padding: var(--eshop-spacing-lg);
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-muted-background);
    max-width: 420px;
}

.eshop-cart-summary__actions {
    display: grid;
    gap: var(--eshop-spacing-sm);
    padding-top: var(--eshop-spacing-sm);
    justify-items: start;
}

.eshop-cart-summary__actions .eshop-button {
    min-width: 220px;
}

.eshop-cart-summary strong,
.eshop-cart-summary small {
    display: block;
}

.eshop-cart-summary small {
    line-height: 1.5;
}

.eshop-cart-summary p {
    margin: 0;
}

.eshop-quantity-form {
    display: flex;
    align-items: flex-end;
    gap: var(--eshop-spacing-sm);
    flex-wrap: wrap;
}

.eshop-quantity-form input[type="number"] {
    width: 110px;
    padding: 10px 12px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}
.eshop-checkout-form {
    max-width: 820px;
}

.eshop-checkout-form form {
    margin: 0;
}

.eshop-form-grid {
    display: grid;
    gap: var(--eshop-spacing-md);
}

.eshop-form-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: var(--eshop-spacing-lg);
    align-items: start;
}

.eshop-form-row__label {
    padding-top: 12px;
    font-weight: 600;
}

.eshop-form-row__label label,
.eshop-form-row__label span {
    display: inline-block;
    margin: 0;
    font-weight: inherit;
}

.eshop-form-row__control {
    min-width: 0;
}

.eshop-form-row__control input[type="text"],
.eshop-form-row__control input[type="email"],
.eshop-form-row__control input[type="tel"],
.eshop-form-row__control input[type="number"],
.eshop-form-row__control textarea,
.eshop-form-row__control select {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--eshop-color-border);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-background);
    color: var(--eshop-color-text);
    font: inherit;
    line-height: 1.4;
}

.eshop-form-row__control textarea {
    min-height: 120px;
    resize: vertical;
}

.eshop-choice-list {
    display: grid;
    gap: var(--eshop-spacing-xs);
    padding-top: 6px;
}

.eshop-choice-list--compact {
    gap: var(--eshop-spacing-xs);
    padding-top: 4px;
}

.eshop-choice-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--eshop-spacing-sm);
    margin: 0;
    font-weight: 400;
    line-height: 1.45;
}

.eshop-choice-list__item input[type="radio"],
.eshop-choice-list__item input[type="checkbox"] {
    margin: 0;
    margin-top: 0.2rem;
    flex: 0 0 auto;
    accent-color: var(--eshop-color-primary);
}

.eshop-form-row--submit .eshop-form-row__label {
    padding-top: 0;
}

.eshop-form-row--submit .eshop-form-row__control {
    padding-top: var(--eshop-spacing-sm);
}

.eshop-checkout-form .error,
.eshop-checkout-form .errors,
.eshop-checkout-form .help,
.eshop-checkout-form .description {
    display: block;
    margin-top: var(--eshop-spacing-xs);
    font-size: var(--eshop-font-size-small);
}

.eshop-checkout-form .error,
.eshop-checkout-form .errors {
    color: #b42318;
}

.eshop-checkout-form ul.error,
.eshop-checkout-form ul.errors {
    margin: var(--eshop-spacing-xs) 0 0;
    padding-left: 1.1rem;
}

.eshop-cart-table form {
    margin: 0;
}

.eshop-cart-table td a {
    word-break: break-word;
}

.eshop-cart-summary .eshop-button,
.eshop-cart-summary a.eshop-button {
    align-self: start;
}

.eshop-checkout-form input[type="submit"],
.eshop-checkout-form button[type="submit"],
.eshop-checkout-form .button,
.eshop-checkout-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--eshop-spacing-sm);
    padding: var(--eshop-button-padding-y) var(--eshop-button-padding-x);
    border: 1px solid var(--eshop-color-primary);
    border-radius: var(--eshop-radius-base);
    background: var(--eshop-color-primary);
    color: #ffffff;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.eshop-checkout-form input[type="submit"]:hover,
.eshop-checkout-form button[type="submit"]:hover,
.eshop-checkout-form .button:hover,
.eshop-checkout-form .btn:hover {
    opacity: 0.92;
}

.eshop-checkout-form input[type="checkbox"],
.eshop-checkout-form input[type="radio"] {
    width: auto;
    padding: 0;
    margin: 0 var(--eshop-spacing-xs) 0 0;
    accent-color: var(--eshop-color-primary);
}

.eshop-checkout-form label:has(input[type="checkbox"]),
.eshop-checkout-form label:has(input[type="radio"]) {
    display: flex;
    align-items: flex-start;
    gap: var(--eshop-spacing-xs);
    margin-bottom: var(--eshop-spacing-sm);
    font-weight: 400;
}

.eshop-checkout-form textarea,
.eshop-checkout-form input[type="text"],
.eshop-checkout-form input[type="email"],
.eshop-checkout-form input[type="tel"],
.eshop-checkout-form input[type="number"],
.eshop-checkout-form select {
    max-width: 100%;
}

.eshop-checkout-form > :last-child,
.eshop-checkout-form form > :last-child {
    margin-bottom: 0;
}

.eshop-cart-table td:nth-child(3),
.eshop-cart-table td:nth-child(4),
.eshop-cart-table td:nth-child(5),
.eshop-cart-table th:nth-child(3),
.eshop-cart-table th:nth-child(4),
.eshop-cart-table th:nth-child(5) {
    white-space: nowrap;
}

.eshop-cart-table td:nth-child(6),
.eshop-cart-table th:nth-child(6) {
    width: 1%;
    white-space: nowrap;
}

/* =========================================
   12. Responsive
========================================= */

@media (max-width: 767px) {
    :root {
        --eshop-font-size-h1: 28px;
        --eshop-font-size-h2: 22px;
        --eshop-font-size-h3: 18px;
    }

    .eshop-container {
        padding-left: var(--eshop-spacing-md);
        padding-right: var(--eshop-spacing-md);
    }

    .eshop-header {
        padding: var(--eshop-spacing-md) 0;
    }

    .eshop-main {
        padding: var(--eshop-spacing-lg) 0;
    }

    .eshop-footer {
        padding: var(--eshop-spacing-md) 0;
    }

    .eshop-navigation__inner {
        align-items: flex-start;
    }

    .eshop-nav {
        gap: var(--eshop-spacing-xs) var(--eshop-spacing-sm);
        padding: var(--eshop-spacing-sm) 0;
    }

    .eshop-product-card {
        padding: var(--eshop-spacing-md);
    }
    .eshop-cart-summary {
        max-width: none;
        padding: var(--eshop-spacing-md);
    }

    .eshop-checkout-form fieldset {
        padding: var(--eshop-spacing-md);
    }
    .eshop-checkout-form table,
    .eshop-checkout-form tbody,
    .eshop-checkout-form tr,
    .eshop-checkout-form th,
    .eshop-checkout-form td {
        display: block;
        width: 100%;
    }

    .eshop-checkout-form tr {
        margin-bottom: var(--eshop-spacing-md);
    }

    .eshop-checkout-form th {
        padding: 0 0 var(--eshop-spacing-xs);
    }

    .eshop-checkout-form td br {
        margin-bottom: var(--eshop-spacing-xs);
    }
    .eshop-form-row {
        grid-template-columns: 1fr;
        gap: var(--eshop-spacing-xs);
    }

    .eshop-form-row__label {
        padding-top: 0;
    }

    .eshop-choice-list,
    .eshop-choice-list--compact {
        padding-top: 0;
    }

    .eshop-product-detail__top {
        grid-template-columns: 1fr;
        gap: var(--eshop-spacing-lg);
    }

    .eshop-product-gallery {
        grid-template-columns: repeat(auto-fit, minmax(72px, 96px));
    }

    .eshop-header-search {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .eshop-search-form__row {
        align-items: stretch;
    }

    .eshop-search-form__actions {
        width: 100%;
    }

    .eshop-search-form__actions .eshop-button {
        width: 100%;
    }
    .eshop-product-card {
        padding: var(--eshop-spacing-md);
    }

    .eshop-product-card__image {
        margin-bottom: var(--eshop-spacing-sm);
    }
    .eshop-product-detail__top {
        grid-template-columns: 1fr;
        gap: var(--eshop-spacing-lg);
    }

    .eshop-product-detail__purchase-form {
        max-width: none;
    }

    .eshop-product-gallery {
        grid-template-columns: repeat(auto-fit, minmax(72px, 96px));
    }

    .eshop-lightbox__dialog {
        padding: 1rem;
    }

    .eshop-lightbox__nav--prev {
        left: 0.5rem;
    }

    .eshop-lightbox__nav--next {
        right: 0.5rem;
    }

    .eshop-lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
    }
    .eshop-quantity-form {
        align-items: stretch;
    }

    .eshop-quantity-form input[type="number"] {
        width: 100%;
    }
    .eshop-category-navigation {
        padding: var(--eshop-spacing-md);
        margin-bottom: var(--eshop-spacing-lg);
    }

    .eshop-category-navigation__list--level-1,
    .eshop-category-navigation__list--level-2,
    .eshop-category-navigation__list--level-3 {
        margin-left: var(--eshop-spacing-sm);
        padding-left: var(--eshop-spacing-sm);
    }
    .eshop-cart-summary__actions {
        justify-items: stretch;
    }

    .eshop-cart-summary__actions .eshop-button {
        width: 100%;
        min-width: 0;
    }
}


/* =========================================
  Lightbox
========================================= */

.eshop-lightbox[hidden] {
    display: none;
}

.eshop-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.eshop-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.eshop-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.eshop-lightbox__figure {
    margin: 0;
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    text-align: center;
}

.eshop-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: 12px;
}

.eshop-lightbox__caption {
    margin-top: 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.eshop-lightbox__close,
.eshop-lightbox__nav {
    position: absolute;
    z-index: 2;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}

.eshop-lightbox__close {
    top: 1.25rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 2rem;
}

.eshop-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
}

.eshop-lightbox__nav--prev {
    left: 1.25rem;
}

.eshop-lightbox__nav--next {
    right: 1.25rem;
}

.eshop-lightbox-open {
    overflow: hidden;
}