
.kuba-front-category{
    background:#f7f8fa;
    color:#151b26;
    min-height:70vh;
    padding:28px 0 60px;
}
.kuba-front-shell{
    width:min(1440px,calc(100% - 32px));
    margin:0 auto;
}
.kuba-front-breadcrumb{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:0 0 18px;
    color:#687386;
    font-size:13px;
}
.kuba-front-breadcrumb a{
    color:inherit;
    text-decoration:none;
}
.kuba-front-breadcrumb a:hover{
    color:#111827;
}
.kuba-front-breadcrumb__sep{opacity:.5}
.kuba-front-category-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    overflow:hidden;
    min-height:220px;
    margin-bottom:30px;
    border:1px solid #e4e7ec;
    border-radius:22px;
    background:#fff;
    box-shadow:0 8px 28px rgba(16,24,40,.05);
}
.kuba-front-category-hero.has-image{
    grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
}
.kuba-front-category-hero__content{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:44px 48px;
}
.kuba-front-eyebrow{
    margin:0 0 9px;
    color:#2563eb;
    font-size:12px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
}
.kuba-front-category-hero h1{
    margin:0;
    color:#111827;
    font-size:clamp(32px,4vw,54px);
    line-height:1.02;
    letter-spacing:-.035em;
}
.kuba-front-category-description{
    max-width:760px;
    margin-top:16px;
    color:#5d6676;
    font-size:15px;
    line-height:1.65;
}
.kuba-front-category-description p:last-child{margin-bottom:0}
.kuba-front-category-hero__image{
    min-height:220px;
    background:#eef1f5;
}
.kuba-front-category-hero__image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}
.kuba-front-section{
    margin-top:34px;
}
.kuba-front-section__head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin:0 0 16px;
}
.kuba-front-section__head h2{
    margin:0;
    color:#111827;
    font-size:24px;
    letter-spacing:-.02em;
}
.kuba-front-section__head>span{
    color:#687386;
    font-size:13px;
}
.kuba-front-category-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}
.kuba-front-category-tile{
    overflow:hidden;
    border:1px solid #e4e7ec;
    border-radius:16px;
    background:#fff;
    color:inherit;
    text-decoration:none;
    box-shadow:0 4px 16px rgba(16,24,40,.04);
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.kuba-front-category-tile:hover{
    transform:translateY(-2px);
    border-color:#cbd5e1;
    box-shadow:0 10px 28px rgba(16,24,40,.08);
}
.kuba-front-category-tile__image{
    aspect-ratio:16/10;
    overflow:hidden;
    background:#eef1f5;
}
.kuba-front-category-tile__image img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.kuba-front-category-tile__placeholder,
.kuba-front-product-card__placeholder{
    display:flex;
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
    color:#a6afbd;
    font-size:42px;
}
.kuba-front-category-tile__body{
    padding:15px 16px 17px;
}
.kuba-front-category-tile__body h3{
    margin:0 0 4px;
    color:#111827;
    font-size:17px;
}
.kuba-front-category-tile__body span{
    color:#7b8493;
    font-size:12px;
}
.kuba-front-product-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}
.kuba-front-product-card{
    overflow:hidden;
    border:1px solid #e4e7ec;
    border-radius:16px;
    background:#fff;
    box-shadow:0 4px 16px rgba(16,24,40,.04);
}
.kuba-front-product-card__image{
    display:block;
    overflow:hidden;
    aspect-ratio:1/1;
    background:#f0f2f5;
}
.kuba-front-product-card__image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .25s ease;
}
.kuba-front-product-card:hover .kuba-front-product-card__image img{
    transform:scale(1.025);
}
.kuba-front-product-card__body{
    padding:15px 16px 17px;
}
.kuba-front-product-card h3{
    min-height:44px;
    margin:0 0 14px;
    font-size:16px;
    line-height:1.35;
}
.kuba-front-product-card h3 a{
    color:#111827;
    text-decoration:none;
}
.kuba-front-product-card__buy{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.kuba-front-product-card__buy strong{
    display:block;
    color:#111827;
    font-size:19px;
    line-height:1.15;
}
.kuba-front-product-card__buy small{
    color:#7b8493;
    font-size:11px;
}
.kuba-front-add{
    display:inline-flex;
    min-height:40px;
    align-items:center;
    justify-content:center;
    padding:0 16px;
    border-radius:10px;
    background:#146eb4;
    color:#fff!important;
    text-decoration:none!important;
    font-size:13px;
    font-weight:800;
}
.kuba-front-add:hover{
    background:#0c5f9f;
}
.kuba-front-unavailable{
    color:#8b95a5;
    font-size:12px;
    font-weight:700;
}
.kuba-front-empty{
    margin-top:30px;
    padding:40px 28px;
    border:1px dashed #cbd2dc;
    border-radius:16px;
    background:#fff;
    text-align:center;
}
.kuba-front-empty h2{margin-top:0}
@media(max-width:1100px){
    .kuba-front-category-grid,
    .kuba-front-product-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
    .kuba-front-category-hero.has-image{
        grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);
    }
}
@media(max-width:820px){
    .kuba-front-category-hero.has-image{
        grid-template-columns:1fr;
    }
    .kuba-front-category-hero__content{
        padding:32px 28px;
    }
    .kuba-front-category-hero__image{
        max-height:280px;
    }
    .kuba-front-category-grid,
    .kuba-front-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:520px){
    .kuba-front-category{
        padding-top:18px;
    }
    .kuba-front-shell{
        width:min(100% - 20px,1440px);
    }
    .kuba-front-category-hero{
        margin-bottom:22px;
        border-radius:16px;
    }
    .kuba-front-category-hero__content{
        padding:26px 20px;
    }
    .kuba-front-category-hero h1{
        font-size:34px;
    }
    .kuba-front-category-grid{
        gap:10px;
    }
    .kuba-front-product-grid{
        gap:10px;
    }
    .kuba-front-category-tile,
    .kuba-front-product-card{
        border-radius:12px;
    }
    .kuba-front-category-tile__body,
    .kuba-front-product-card__body{
        padding:12px;
    }
    .kuba-front-product-card h3{
        min-height:40px;
        font-size:14px;
    }
    .kuba-front-product-card__buy{
        align-items:flex-start;
        flex-direction:column;
    }
    .kuba-front-add{
        width:100%;
    }
}


/* 0.1.4 — compact storefront hierarchy */
.kuba-front-shop .kuba-front-breadcrumb{
    margin-bottom:18px;
}
.kuba-front-shop .kuba-front-section{
    margin-top:0;
}
.kuba-front-category-title{
    margin:0 0 22px;
    padding:4px 0 2px;
}
.kuba-front-category-title .kuba-front-eyebrow{
    margin-bottom:6px;
}
.kuba-front-category-title h1{
    margin:0;
    color:#111827;
    font-size:clamp(30px,3.2vw,44px);
    line-height:1.08;
    letter-spacing:-.03em;
}
.kuba-front-category-title .kuba-front-category-description{
    max-width:760px;
    margin-top:10px;
}
.kuba-front-category-page .kuba-front-section{
    margin-top:24px;
}
@media(max-width:520px){
    .kuba-front-category-title{
        margin-bottom:16px;
    }
    .kuba-front-category-title h1{
        font-size:30px;
    }
}


/* 0.1.5 — minimal category header */
.kuba-front-category-title{
    margin:6px 0 22px;
    padding:0;
    text-align:center;
}
.kuba-front-category-title h1{
    margin:0;
    text-align:center;
}
.kuba-front-category-title .kuba-front-category-description{
    margin:10px auto 0;
    text-align:center;
}
.kuba-front-category-page .kuba-front-section{
    margin-top:0;
}
.kuba-front-category-page .kuba-front-product-grid{
    margin-top:0;
}


/* 0.1.7 — product cards and detail consistency */
.kuba-front-back-row{
    margin:0 0 14px;
}
.kuba-front-back{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:0 12px;
    border:1px solid #dbe1e8;
    border-radius:10px;
    background:#fff;
    color:#334155!important;
    text-decoration:none!important;
    font-size:13px;
    font-weight:700;
}
.kuba-front-back:hover{
    border-color:#b8c2cf;
    background:#f8fafc;
}
.kuba-front-product-card__description{
    min-height:34px;
    margin:-6px 0 12px;
    color:#6b7280;
    font-size:12px;
    line-height:1.4;
}
.kuba-front-price-line{
    display:inline-flex;
    align-items:baseline;
    gap:2px;
    white-space:nowrap;
}
.kuba-front-price-line strong{
    display:inline!important;
}
.kuba-front-price-line small{
    display:inline!important;
    margin:0!important;
}
.kuba-front-product-detail{
    background:#f7f8fa;
    min-height:70vh;
    padding:28px 0 60px;
}
.kuba-front-product-detail__card{
    display:grid;
    grid-template-columns:minmax(300px,.9fr) minmax(320px,1.1fr);
    gap:34px;
    overflow:hidden;
    padding:24px;
    border:1px solid #e4e7ec;
    border-radius:18px;
    background:#fff;
    box-shadow:0 4px 16px rgba(16,24,40,.04);
}
.kuba-front-product-detail__image{
    overflow:hidden;
    border-radius:14px;
    background:#f0f2f5;
}
.kuba-front-product-detail__image img{
    display:block;
    width:100%;
    height:auto;
    object-fit:cover;
}
.kuba-front-product-detail__content{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:8px 8px 8px 0;
}
.kuba-front-product-detail__content h1{
    margin:0 0 14px;
    color:#111827;
    font-size:clamp(30px,3vw,44px);
    line-height:1.08;
    letter-spacing:-.03em;
}
.kuba-front-product-detail__price{
    margin-bottom:14px;
    font-size:22px;
}
.kuba-front-product-detail__description{
    max-width:620px;
    margin:0 0 22px;
    color:#5f6877;
    font-size:15px;
    line-height:1.6;
}
.kuba-front-product-detail__buy{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:18px;
}
.kuba-front-product-detail__buy input[type=number]{
    width:72px;
    min-height:42px;
    padding:8px 10px;
    border:1px solid #d5dbe4;
    border-radius:10px;
}
.kuba-front-product-detail__meta{
    color:#7b8493;
    font-size:12px;
}
@media(max-width:820px){
    .kuba-front-product-detail__card{
        grid-template-columns:1fr;
        gap:20px;
        padding:16px;
    }
    .kuba-front-product-detail__content{
        padding:0;
    }
}


/* 0.2.0 — configurable catalog layouts */
.kuba-front-product-grid{
    grid-template-columns:repeat(var(--kuba-desktop-columns,4),minmax(0,1fr));
}

.kuba-front-product-grid.ratio-1-1 .kuba-front-product-card__image{aspect-ratio:1/1}
.kuba-front-product-grid.ratio-4-3 .kuba-front-product-card__image{aspect-ratio:4/3}
.kuba-front-product-grid.ratio-3-4 .kuba-front-product-card__image{aspect-ratio:3/4}
.kuba-front-product-grid.ratio-original .kuba-front-product-card__image{aspect-ratio:auto;max-height:none}
.kuba-front-product-grid.ratio-original .kuba-front-product-card__image img{height:auto;object-fit:contain}

.kuba-front-product-grid.layout-compact .kuba-front-product-card__body{padding:10px 11px 12px}
.kuba-front-product-grid.layout-compact .kuba-front-product-card h3{min-height:0;margin-bottom:8px;font-size:14px}
.kuba-front-product-grid.layout-compact .kuba-front-product-card__description{display:none}
.kuba-front-product-grid.layout-compact .kuba-front-product-card__buy strong{font-size:16px}
.kuba-front-product-grid.layout-compact .kuba-front-add{min-height:34px;padding:0 12px;font-size:12px}

.kuba-front-product-grid.layout-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card{
    display:grid;
    grid-template-columns:minmax(120px,220px) minmax(0,1fr);
}
.kuba-front-product-grid.layout-list.image-small .kuba-front-product-card{grid-template-columns:140px minmax(0,1fr)}
.kuba-front-product-grid.layout-list.image-medium .kuba-front-product-card{grid-template-columns:200px minmax(0,1fr)}
.kuba-front-product-grid.layout-list.image-large .kuba-front-product-card{grid-template-columns:280px minmax(0,1fr)}
.kuba-front-product-grid.layout-list .kuba-front-product-card__image{
    max-height:none;
    height:100%;
    border-radius:0;
}
.kuba-front-product-grid.layout-list.ratio-original .kuba-front-product-card__image img{
    height:100%;
    object-fit:contain;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__body{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:18px 20px;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card h3{
    min-height:0;
    margin-bottom:8px;
    font-size:18px;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__description{
    min-height:0;
    max-width:760px;
    margin:0 0 14px;
    font-size:13px;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__buy{
    justify-content:flex-start;
    gap:18px;
}

@media(max-width:1100px){
    .kuba-front-product-grid:not(.layout-list){
        grid-template-columns:repeat(var(--kuba-tablet-columns,2),minmax(0,1fr));
    }
}
@media(max-width:820px){
    .kuba-front-product-grid.layout-list.image-large .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-medium .kuba-front-product-card{
        grid-template-columns:180px minmax(0,1fr);
    }
}
@media(max-width:520px){
    .kuba-front-product-grid:not(.layout-list){
        grid-template-columns:repeat(var(--kuba-mobile-columns,1),minmax(0,1fr));
    }
    .kuba-front-product-grid.layout-list .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-small .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-medium .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-large .kuba-front-product-card{
        grid-template-columns:110px minmax(0,1fr);
    }
    .kuba-front-product-grid.layout-list .kuba-front-product-card__body{padding:12px}
    .kuba-front-product-grid.layout-list .kuba-front-product-card h3{font-size:14px}
    .kuba-front-product-grid.layout-list .kuba-front-product-card__description{
        display:-webkit-box;
        overflow:hidden;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        font-size:11px;
    }
    .kuba-front-product-grid.layout-list .kuba-front-product-card__buy{
        align-items:flex-start;
        flex-direction:column;
        gap:8px;
    }
}


/* 0.2.1 — language switcher and dedicated List image sizing */
.kuba-front-language-switcher{
    display:flex;
    justify-content:flex-end;
    gap:6px;
    margin:0 0 12px;
}
.kuba-front-language-option{
    display:inline-flex;
    min-width:34px;
    height:30px;
    align-items:center;
    justify-content:center;
    border:1px solid #dbe1e8;
    border-radius:8px;
    background:#fff;
    color:#475569!important;
    text-decoration:none!important;
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
}
.kuba-front-language-option:hover{
    border-color:#aeb8c6;
    background:#f8fafc;
}
.kuba-front-language-option.is-active{
    border-color:#146eb4;
    background:#146eb4;
    color:#fff!important;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card,
.kuba-front-product-grid.layout-list.image-small .kuba-front-product-card,
.kuba-front-product-grid.layout-list.image-medium .kuba-front-product-card,
.kuba-front-product-grid.layout-list.image-large .kuba-front-product-card{
    grid-template-columns:var(--kuba-list-image-width,110px) minmax(0,1fr);
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__image{
    width:var(--kuba-list-image-width,110px);
    min-height:var(--kuba-list-image-width,110px);
    max-height:none;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__image img{
    width:100%;
    height:100%;
    object-fit:cover;
}
@media(max-width:520px){
    .kuba-front-language-switcher{
        justify-content:center;
        margin-bottom:10px;
    }
    .kuba-front-product-grid.layout-list .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-small .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-medium .kuba-front-product-card,
    .kuba-front-product-grid.layout-list.image-large .kuba-front-product-card{
        grid-template-columns:min(var(--kuba-list-image-width,100px),110px) minmax(0,1fr);
    }
    .kuba-front-product-grid.layout-list .kuba-front-product-card__image{
        width:min(var(--kuba-list-image-width,100px),110px);
        min-height:min(var(--kuba-list-image-width,100px),110px);
    }
}


/* 0.2.3 — image size controls the whole product card in tile modes */
.kuba-front-product-grid.layout-tiles,
.kuba-front-product-grid.layout-compact{
    justify-content:start;
}

.kuba-front-product-grid.layout-tiles.image-small,
.kuba-front-product-grid.layout-compact.image-small{
    grid-template-columns:repeat(var(--kuba-desktop-columns,4), minmax(140px,180px));
}
.kuba-front-product-grid.layout-tiles.image-medium,
.kuba-front-product-grid.layout-compact.image-medium{
    grid-template-columns:repeat(var(--kuba-desktop-columns,4), minmax(190px,260px));
}
.kuba-front-product-grid.layout-tiles.image-large,
.kuba-front-product-grid.layout-compact.image-large{
    grid-template-columns:repeat(var(--kuba-desktop-columns,4), minmax(260px,360px));
}

.kuba-front-product-grid.layout-tiles .kuba-front-product-card,
.kuba-front-product-grid.layout-compact .kuba-front-product-card{
    width:100%;
}

.kuba-front-product-grid.layout-tiles.image-small .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.image-small .kuba-front-product-card__image{
    min-height:140px;
}
.kuba-front-product-grid.layout-tiles.image-medium .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.image-medium .kuba-front-product-card__image{
    min-height:210px;
}
.kuba-front-product-grid.layout-tiles.image-large .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.image-large .kuba-front-product-card__image{
    min-height:300px;
}

/* All tile images visually fill their media area. */
.kuba-front-product-grid.layout-tiles .kuba-front-product-card__image img,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* Original ratio keeps the image natural, but still fills card width. */
.kuba-front-product-grid.layout-tiles.ratio-original .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.ratio-original .kuba-front-product-card__image{
    aspect-ratio:auto;
    min-height:0;
}
.kuba-front-product-grid.layout-tiles.ratio-original .kuba-front-product-card__image img,
.kuba-front-product-grid.layout-compact.ratio-original .kuba-front-product-card__image img{
    width:100%;
    height:auto;
    object-fit:contain;
}

/* Slightly scale typography/padding with card size for visual balance. */
.kuba-front-product-grid.layout-tiles.image-small .kuba-front-product-card__body,
.kuba-front-product-grid.layout-compact.image-small .kuba-front-product-card__body{
    padding:10px 11px 12px;
}
.kuba-front-product-grid.layout-tiles.image-small .kuba-front-product-card h3,
.kuba-front-product-grid.layout-compact.image-small .kuba-front-product-card h3{
    font-size:13px;
}
.kuba-front-product-grid.layout-tiles.image-large .kuba-front-product-card__body{
    padding:18px 19px 20px;
}
.kuba-front-product-grid.layout-tiles.image-large .kuba-front-product-card h3{
    font-size:18px;
}
.kuba-front-product-grid.layout-tiles.image-large .kuba-front-product-card__buy strong{
    font-size:22px;
}

@media(max-width:1100px){
    .kuba-front-product-grid.layout-tiles.image-small,
    .kuba-front-product-grid.layout-compact.image-small{
        grid-template-columns:repeat(var(--kuba-tablet-columns,2), minmax(130px,170px));
    }
    .kuba-front-product-grid.layout-tiles.image-medium,
    .kuba-front-product-grid.layout-compact.image-medium{
        grid-template-columns:repeat(var(--kuba-tablet-columns,2), minmax(180px,240px));
    }
    .kuba-front-product-grid.layout-tiles.image-large,
    .kuba-front-product-grid.layout-compact.image-large{
        grid-template-columns:repeat(var(--kuba-tablet-columns,2), minmax(230px,320px));
    }
}
@media(max-width:520px){
    .kuba-front-product-grid.layout-tiles.image-small,
    .kuba-front-product-grid.layout-compact.image-small{
        grid-template-columns:repeat(var(--kuba-mobile-columns,1), minmax(120px,1fr));
    }
    .kuba-front-product-grid.layout-tiles.image-medium,
    .kuba-front-product-grid.layout-compact.image-medium,
    .kuba-front-product-grid.layout-tiles.image-large,
    .kuba-front-product-grid.layout-compact.image-large{
        grid-template-columns:repeat(var(--kuba-mobile-columns,1), minmax(0,1fr));
    }
}


/* 0.2.4 — uniform media boxes regardless of source image proportions */
.kuba-front-product-grid.layout-tiles .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__image{
    width:100%;
    overflow:hidden;
    background:#f3f4f6;
    max-height:var(--kuba-tile-image-max-height,320px);
}

/* For fixed ratios every card gets the exact same media box. */
.kuba-front-product-grid.layout-tiles.ratio-1-1 .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.ratio-1-1 .kuba-front-product-card__image{
    aspect-ratio:1/1;
}
.kuba-front-product-grid.layout-tiles.ratio-4-3 .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.ratio-4-3 .kuba-front-product-card__image{
    aspect-ratio:4/3;
}
.kuba-front-product-grid.layout-tiles.ratio-3-4 .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.ratio-3-4 .kuba-front-product-card__image{
    aspect-ratio:3/4;
}

/* The max-height is a hard cap; aspect-ratio still keeps all cards identical. */
.kuba-front-product-grid.layout-tiles .kuba-front-product-card__image img,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__image img,
.kuba-front-product-grid.layout-list .kuba-front-product-card__image img{
    display:block;
    width:100%;
    height:100%;
}

.kuba-front-product-grid.fit-cover .kuba-front-product-card__image img{
    object-fit:cover;
}

.kuba-front-product-grid.fit-contain .kuba-front-product-card__image img{
    object-fit:contain;
    background:#f3f4f6;
}

/* Original ratio cannot guarantee equal height; keep the configured cap and fit mode. */
.kuba-front-product-grid.layout-tiles.ratio-original .kuba-front-product-card__image,
.kuba-front-product-grid.layout-compact.ratio-original .kuba-front-product-card__image{
    aspect-ratio:auto;
    height:var(--kuba-tile-image-max-height,320px);
}
.kuba-front-product-grid.layout-tiles.ratio-original .kuba-front-product-card__image img,
.kuba-front-product-grid.layout-compact.ratio-original .kuba-front-product-card__image img{
    height:100%;
}

/* List view also gets a deterministic image box. */
.kuba-front-product-grid.layout-list .kuba-front-product-card__image{
    width:var(--kuba-list-image-width,110px);
    height:var(--kuba-list-image-width,110px);
    min-height:var(--kuba-list-image-width,110px);
    max-height:var(--kuba-list-image-width,110px);
    overflow:hidden;
    background:#f3f4f6;
}


/* 0.2.5 — configurable category presentation */
.kuba-front-category-grid{
    justify-content:start;
    grid-template-columns:repeat(var(--kuba-category-desktop-columns,4),minmax(0,1fr));
}

/* Tile sizes control the whole category card width. */
.kuba-front-category-grid.category-layout-tiles.category-size-small,
.kuba-front-category-grid.category-layout-compact.category-size-small{
    grid-template-columns:repeat(var(--kuba-category-desktop-columns,4),minmax(140px,180px));
}
.kuba-front-category-grid.category-layout-tiles.category-size-medium,
.kuba-front-category-grid.category-layout-compact.category-size-medium{
    grid-template-columns:repeat(var(--kuba-category-desktop-columns,4),minmax(190px,260px));
}
.kuba-front-category-grid.category-layout-tiles.category-size-large,
.kuba-front-category-grid.category-layout-compact.category-size-large{
    grid-template-columns:repeat(var(--kuba-category-desktop-columns,4),minmax(260px,360px));
}

.kuba-front-category-grid .kuba-front-category-tile__image{
    overflow:hidden;
    background:#f3f4f6;
}
.kuba-front-category-grid.category-ratio-1-1 .kuba-front-category-tile__image{aspect-ratio:1/1}
.kuba-front-category-grid.category-ratio-4-3 .kuba-front-category-tile__image{aspect-ratio:4/3}
.kuba-front-category-grid.category-ratio-3-4 .kuba-front-category-tile__image{aspect-ratio:3/4}
.kuba-front-category-grid.category-ratio-original .kuba-front-category-tile__image{aspect-ratio:auto}

.kuba-front-category-grid .kuba-front-category-tile__image img{
    width:100%;
    height:100%;
    display:block;
}
.kuba-front-category-grid.category-fit-cover .kuba-front-category-tile__image img{object-fit:cover}
.kuba-front-category-grid.category-fit-contain .kuba-front-category-tile__image img{
    object-fit:contain;
    background:#f3f4f6;
}
.kuba-front-category-grid.category-ratio-original .kuba-front-category-tile__image img{
    height:auto;
}

/* Compact category cards. */
.kuba-front-category-grid.category-layout-compact .kuba-front-category-tile__body{
    padding:10px 11px 12px;
}
.kuba-front-category-grid.category-layout-compact .kuba-front-category-tile__body h3{
    font-size:14px;
    margin-bottom:2px;
}
.kuba-front-category-grid.category-layout-compact .kuba-front-category-tile__body span{
    font-size:11px;
}

/* List mode for categories. */
.kuba-front-category-grid.category-layout-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.kuba-front-category-grid.category-layout-list .kuba-front-category-tile{
    display:grid;
    grid-template-columns:var(--kuba-category-list-image-width,110px) minmax(0,1fr);
    width:100%;
}
.kuba-front-category-grid.category-layout-list .kuba-front-category-tile__image{
    width:var(--kuba-category-list-image-width,110px);
    height:var(--kuba-category-list-image-width,110px);
    aspect-ratio:auto;
}
.kuba-front-category-grid.category-layout-list .kuba-front-category-tile__body{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:14px 18px;
}
.kuba-front-category-grid.category-layout-list .kuba-front-category-tile__body h3{
    margin:0 0 4px;
    font-size:17px;
}

@media(max-width:1100px){
    .kuba-front-category-grid.category-layout-tiles.category-size-small,
    .kuba-front-category-grid.category-layout-compact.category-size-small{
        grid-template-columns:repeat(var(--kuba-category-tablet-columns,2),minmax(130px,170px));
    }
    .kuba-front-category-grid.category-layout-tiles.category-size-medium,
    .kuba-front-category-grid.category-layout-compact.category-size-medium{
        grid-template-columns:repeat(var(--kuba-category-tablet-columns,2),minmax(180px,240px));
    }
    .kuba-front-category-grid.category-layout-tiles.category-size-large,
    .kuba-front-category-grid.category-layout-compact.category-size-large{
        grid-template-columns:repeat(var(--kuba-category-tablet-columns,2),minmax(230px,320px));
    }
}
@media(max-width:520px){
    .kuba-front-category-grid.category-layout-tiles,
    .kuba-front-category-grid.category-layout-compact{
        grid-template-columns:repeat(var(--kuba-category-mobile-columns,1),minmax(0,1fr));
    }
    .kuba-front-category-grid.category-layout-list .kuba-front-category-tile{
        grid-template-columns:min(var(--kuba-category-list-image-width,100px),110px) minmax(0,1fr);
    }
    .kuba-front-category-grid.category-layout-list .kuba-front-category-tile__image{
        width:min(var(--kuba-category-list-image-width,100px),110px);
        height:min(var(--kuba-category-list-image-width,100px),110px);
    }
}


/* 0.2.6 — language switcher inside shared Core top bar */
.kuba-front-topbar .kuba-front-language-switcher{
    margin:0;
    justify-content:flex-end;
}
.kuba-front-topbar .kuba-front-language-option{
    min-width:32px;
    height:28px;
    border-color:rgba(255,255,255,.5);
    background:rgba(255,255,255,.12);
    color:#fff!important;
}
.kuba-front-topbar .kuba-front-language-option:hover{
    background:rgba(255,255,255,.22);
    border-color:#fff;
}
.kuba-front-topbar .kuba-front-language-option.is-active{
    background:#fff;
    color:#111827!important;
    border-color:#fff;
}


/* 0.2.9 — product card text geometry follows Core catalog-content limits */
.kuba-front-product-grid.layout-tiles .kuba-front-product-card__body,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__body{
    display:flex;
    flex-direction:column;
}

.kuba-front-product-grid.layout-tiles .kuba-front-product-card h3,
.kuba-front-product-grid.layout-compact .kuba-front-product-card h3{
    min-height:calc(var(--kuba-title-lines,2) * 1.35em);
    margin-bottom:10px;
}

.kuba-front-product-grid.layout-tiles .kuba-front-product-card__description,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__description{
    min-height:calc(var(--kuba-description-lines,3) * 1.4em);
    margin-bottom:12px;
}

/* Keep price/action aligned at the bottom even when actual text is shorter. */
.kuba-front-product-grid.layout-tiles .kuba-front-product-card__buy,
.kuba-front-product-grid.layout-compact .kuba-front-product-card__buy{
    margin-top:auto;
}

/* Compact mode still respects Core content limits; it no longer hides description. */
.kuba-front-product-grid.layout-compact .kuba-front-product-card__description{
    display:block;
    font-size:11px;
    line-height:1.4;
}

/* List layout should grow naturally rather than reserve tile-style vertical space. */
.kuba-front-product-grid.layout-list .kuba-front-product-card h3,
.kuba-front-product-grid.layout-list .kuba-front-product-card__description{
    min-height:0;
}


/* 0.3.0 — configurable borders for product and category cards */
.kuba-front-product-grid.border-none .kuba-front-product-card{
    border-color:transparent;
    box-shadow:none;
}
.kuba-front-product-grid.border-soft .kuba-front-product-card{
    border:1px solid #e4e7ec;
    box-shadow:none;
}
.kuba-front-product-grid.border-strong .kuba-front-product-card{
    border:2px solid #c4ccd7;
    box-shadow:none;
}
.kuba-front-product-grid.border-card .kuba-front-product-card{
    border:1px solid #e4e7ec;
    box-shadow:0 8px 24px rgba(16,24,40,.08);
}

.kuba-front-category-grid.category-border-none .kuba-front-category-tile{
    border-color:transparent;
    box-shadow:none;
}
.kuba-front-category-grid.category-border-soft .kuba-front-category-tile{
    border:1px solid #e4e7ec;
    box-shadow:none;
}
.kuba-front-category-grid.category-border-strong .kuba-front-category-tile{
    border:2px solid #c4ccd7;
    box-shadow:none;
}
.kuba-front-category-grid.category-border-card .kuba-front-category-tile{
    border:1px solid #e4e7ec;
    box-shadow:0 8px 24px rgba(16,24,40,.08);
}

.kuba-front-section__head--centered{
    justify-content:center;
    text-align:center;
    position:relative;
}
.kuba-front-section__head--centered h2{
    text-align:center;
}
.kuba-front-section__head--centered > span{
    position:absolute;
    right:0;
    bottom:2px;
}
@media(max-width:520px){
    .kuba-front-section__head--centered > span{
        position:static;
        margin-left:6px;
    }
}


/* 0.3.1 — clearly visible "Card with shadow" style */
.kuba-front-product-grid.border-card .kuba-front-product-card{
    border:1px solid rgba(203,213,225,.95);
    background:#fff;
    box-shadow:
        0 2px 5px rgba(15,23,42,.08),
        0 12px 30px rgba(15,23,42,.14);
    transform:translateY(-1px);
}
.kuba-front-product-grid.border-card .kuba-front-product-card:hover{
    border-color:rgba(148,163,184,.95);
    box-shadow:
        0 4px 8px rgba(15,23,42,.10),
        0 18px 38px rgba(15,23,42,.18);
    transform:translateY(-3px);
}

.kuba-front-category-grid.category-border-card .kuba-front-category-tile{
    border:1px solid rgba(203,213,225,.95);
    background:#fff;
    box-shadow:
        0 2px 5px rgba(15,23,42,.08),
        0 12px 30px rgba(15,23,42,.14);
    transform:translateY(-1px);
}
.kuba-front-category-grid.category-border-card .kuba-front-category-tile:hover{
    border-color:rgba(148,163,184,.95);
    box-shadow:
        0 4px 8px rgba(15,23,42,.10),
        0 18px 38px rgba(15,23,42,.18);
    transform:translateY(-3px);
}


/* 0.3.2 — KUBA Front owns the storefront footer */
.kuba-front-store-footer{
    border-top:1px solid #e5e7eb;
    background:#fff;
    color:#6b7280;
    padding:18px 20px;
    font-size:12px;
}
.kuba-front-store-footer__inner{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
    text-align:center;
}
.kuba-front-store-footer__sep{
    color:#c0c7d1;
}


/* 0.3.3 — optional creator link */
.kuba-front-store-footer__creator{
    color:inherit;
    font-weight:600;
    text-decoration:none;
}
.kuba-front-store-footer__creator:hover{
    color:#111827;
    text-decoration:underline;
}


/* 0.3.8 — managed responsive store home page */
.kuba-front-home{
    min-height:68vh;
    background:#f7f8fa;
    padding:28px 0 52px;
}
.kuba-front-home__shell{
    display:flex;
    flex-direction:column;
    gap:22px;
}
.kuba-front-home__text{
    max-width:980px;
    margin:0 auto;
    color:#344054;
    font-size:16px;
    line-height:1.7;
    text-align:center;
}
.kuba-front-home__text > :first-child{margin-top:0}
.kuba-front-home__text > :last-child{margin-bottom:0}

.kuba-front-home__image{
    width:100%;
    max-width:100%;
    margin:0;
    overflow:hidden;
    border-radius:18px;
    background:#fff;
}
.kuba-front-home__image img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    max-height:70vh;
    margin:0 auto;
    object-fit:contain;
}

.kuba-front-home__actions{
    display:flex;
    justify-content:center;
}
.kuba-front-home__shop-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 22px;
    border-radius:11px;
    background:#1479bd;
    color:#fff!important;
    text-decoration:none!important;
    font-weight:800;
    box-shadow:0 6px 18px rgba(20,121,189,.18);
}
.kuba-front-home__shop-button:hover{
    background:#0f659f;
    transform:translateY(-1px);
}
@media(max-width:640px){
    .kuba-front-home{padding:18px 0 36px}
    .kuba-front-home__shell{gap:16px}
    .kuba-front-home__image{border-radius:12px}
    .kuba-front-home__text{font-size:15px}
}


/* 0.4.3 — centered catalog geometry and phone-first responsiveness */

/* Catalog sections should visually sit in the middle of the Store page, even when
   the configured cards do not consume the full shell width. */
.kuba-front-shop .kuba-front-section,
.kuba-front-category .kuba-front-products,
.kuba-front-category .kuba-front-subcategories{
    width:100%;
}

.kuba-front-category-grid,
.kuba-front-product-grid.layout-tiles,
.kuba-front-product-grid.layout-compact{
    justify-content:center;
}

/* Keep headings aligned with the visual grid rather than looking detached from it. */
.kuba-front-shop .kuba-front-section__head--centered{
    width:100%;
    max-width:100%;
    margin-left:auto;
    margin-right:auto;
}
.kuba-front-shop .kuba-front-section__head--centered > span{
    right:16px;
}

/* Cards are centered inside their grid cells. */
.kuba-front-category-grid .kuba-front-category-tile,
.kuba-front-product-grid.layout-tiles .kuba-front-product-card,
.kuba-front-product-grid.layout-compact .kuba-front-product-card{
    justify-self:center;
    width:100%;
}

/* A little more balanced whitespace around category/product screens. */
.kuba-front-shop .kuba-front-shell,
.kuba-front-category .kuba-front-shell{
    padding-left:clamp(0px,1vw,10px);
    padding-right:clamp(0px,1vw,10px);
    box-sizing:border-box;
}

/* Tablet: keep the complete group centered, not anchored to the left edge. */
@media(max-width:1100px){
    .kuba-front-category-grid,
    .kuba-front-product-grid.layout-tiles,
    .kuba-front-product-grid.layout-compact{
        justify-content:center;
    }

    .kuba-front-shop .kuba-front-shell,
    .kuba-front-category .kuba-front-shell{
        width:min(100% - 24px,1440px);
    }
}

/* Phones: comfortable gutters, centered headings and usable cards.
   Configured mobile column count is still respected. */
@media(max-width:600px){
    .kuba-front-category{
        padding-top:18px;
        padding-bottom:36px;
    }

    .kuba-front-shop .kuba-front-shell,
    .kuba-front-category .kuba-front-shell{
        width:calc(100% - 20px);
        padding-left:0;
        padding-right:0;
    }

    .kuba-front-breadcrumb{
        margin-bottom:14px;
        font-size:12px;
    }

    .kuba-front-back-row{
        margin-bottom:12px;
    }

    .kuba-front-category-title{
        margin:8px 0 18px;
    }

    .kuba-front-category-title h1{
        font-size:clamp(27px,9vw,36px);
        line-height:1.08;
        overflow-wrap:anywhere;
    }

    .kuba-front-section{
        margin-top:22px;
    }

    .kuba-front-section__head{
        margin-bottom:13px;
    }

    .kuba-front-section__head--centered{
        display:flex;
        justify-content:center;
        align-items:baseline;
        gap:7px;
    }

    .kuba-front-section__head--centered h2{
        font-size:22px;
    }

    .kuba-front-section__head--centered > span{
        position:static;
        margin:0;
        font-size:11px;
    }

    .kuba-front-category-grid,
    .kuba-front-product-grid.layout-tiles,
    .kuba-front-product-grid.layout-compact{
        width:100%;
        justify-content:center;
        gap:12px;
    }

    .kuba-front-category-tile__body,
    .kuba-front-product-card__body{
        padding:12px 12px 14px;
    }

    .kuba-front-category-tile__body h3{
        font-size:15px;
        line-height:1.25;
        overflow-wrap:anywhere;
    }

    .kuba-front-product-grid.layout-tiles .kuba-front-product-card h3,
    .kuba-front-product-grid.layout-compact .kuba-front-product-card h3{
        font-size:13px;
        line-height:1.3;
        overflow-wrap:anywhere;
    }

    .kuba-front-product-card__description{
        font-size:11px;
        line-height:1.35;
    }

    .kuba-front-product-card__buy{
        gap:8px;
    }

    .kuba-front-product-card__buy strong{
        font-size:16px;
    }

    .kuba-front-add{
        min-height:36px;
        padding:0 12px;
        font-size:12px;
        flex:0 0 auto;
    }
}

/* When a single mobile column is configured, do not let the card become absurdly
   wide on large phones. */
@media(min-width:380px) and (max-width:600px){
    .kuba-front-category-grid[style*="--kuba-category-mobile-columns:1"] .kuba-front-category-tile,
    .kuba-front-product-grid[style*="--kuba-mobile-columns:1"] .kuba-front-product-card{
        max-width:420px;
    }
}

/* Very narrow phones: stack price/button instead of squeezing them. */
@media(max-width:360px){
    .kuba-front-product-card__buy{
        align-items:flex-start;
        flex-direction:column;
    }

    .kuba-front-add{
        width:100%;
    }
}


/* 0.4.4 — centered return actions and back-to-top control */
.kuba-front-back-row{
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    text-align:center;
}
.kuba-front-back{
    justify-content:center;
    text-align:center;
}

/* Fixed above the lower floating controls (Privacy / Promotions). */
.kuba-front-back-to-top{
    position:fixed;
    z-index:9997;
    right:max(18px, env(safe-area-inset-right));
    bottom:calc(118px + env(safe-area-inset-bottom));
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:42px;
    padding:0 14px;
    border:1px solid rgba(203,213,225,.95);
    border-radius:999px;
    background:rgba(255,255,255,.96);
    color:#334155;
    box-shadow:0 8px 24px rgba(15,23,42,.14);
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease,background .18s ease;
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
}
.kuba-front-back-to-top:hover{
    background:#fff;
    transform:translateY(-1px);
}
.kuba-front-back-to-top.is-visible{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}
.kuba-front-back-to-top > span:first-child{
    font-size:17px;
    line-height:1;
}

@media(max-width:600px){
    .kuba-front-back-row{
        margin-bottom:14px;
    }

    .kuba-front-back{
        min-height:40px;
        padding:0 16px;
        border-radius:999px;
        font-size:13px;
    }

    .kuba-front-back-to-top{
        right:max(12px, env(safe-area-inset-right));
        bottom:calc(108px + env(safe-area-inset-bottom));
        min-width:44px;
        min-height:44px;
        padding:0 12px;
    }

    .kuba-front-back-to-top__label{
        display:none;
    }
}

@media(max-width:360px){
    .kuba-front-back{
        width:min(100%,320px);
    }
}


/* 0.4.8 — Store page product search */
.kuba-front-search{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:min(100%,760px);
    margin:18px auto 26px;
}
.kuba-front-search input[type="search"]{
    flex:1 1 auto;
    min-width:0;
    min-height:44px;
    padding:0 15px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#fff;
    color:#0f172a;
    font:inherit;
    font-size:15px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.kuba-front-search input[type="search"]:focus{
    outline:2px solid rgba(37,99,235,.20);
    outline-offset:1px;
    border-color:#3b82f6;
}
.kuba-front-search button,
.kuba-front-search__clear{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 18px;
    border:1px solid #1677b8;
    border-radius:12px;
    background:#1677b8;
    color:#fff!important;
    text-decoration:none!important;
    font:inherit;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
}
.kuba-front-search__clear{
    border-color:#cbd5e1;
    background:#fff;
    color:#334155!important;
}
.kuba-front-search-results{
    margin-top:8px;
}
.kuba-front-search-empty{
    text-align:center;
    padding:28px 16px;
}
@media(max-width:600px){
    .kuba-front-search{
        display:grid;
        grid-template-columns:1fr auto;
        gap:8px;
        width:100%;
        margin:14px auto 20px;
    }
    .kuba-front-search input[type="search"]{
        min-height:46px;
        font-size:16px;
    }
    .kuba-front-search button{
        min-height:46px;
        padding:0 14px;
    }
    .kuba-front-search__clear{
        grid-column:1 / -1;
        width:100%;
        min-height:40px;
    }
}

.kuba-front-search-results{scroll-margin-top:24px}
.kuba-front-search-empty{text-align:center;margin:18px auto 8px;max-width:720px}
.kuba-front-search button:disabled{opacity:.7;cursor:wait}


/* 0.4.18 — quantity selector on product cards and product detail */
.kuba-front-buy-form{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    margin:0;
}
.kuba-front-qty{
    display:inline-flex;
    flex:0 0 auto;
    margin:0;
}
.kuba-front-qty input[type=number]{
    width:62px;
    min-height:40px;
    margin:0;
    padding:6px 7px;
    border:1px solid #d5dbe4;
    border-radius:10px;
    background:#fff;
    color:#111827;
    font:inherit;
    font-size:13px;
    font-weight:700;
    line-height:1;
    text-align:center;
    box-sizing:border-box;
}
.kuba-front-qty input[type=number]:focus{
    outline:2px solid rgba(20,110,180,.20);
    outline-offset:1px;
    border-color:#146eb4;
}
.kuba-front-product-detail__buy .kuba-front-buy-form{
    justify-content:flex-start;
}
.kuba-front-product-detail__buy .kuba-front-qty input[type=number]{
    width:76px;
    min-height:42px;
}
.kuba-front-product-grid.layout-compact .kuba-front-buy-form{
    gap:5px;
}
.kuba-front-product-grid.layout-compact .kuba-front-qty input[type=number]{
    width:54px;
    min-height:34px;
    padding:4px 5px;
    border-radius:8px;
    font-size:12px;
}
@media(max-width:600px){
    .kuba-front-product-card__buy{
        align-items:flex-end;
    }
    .kuba-front-buy-form{
        gap:6px;
    }
    .kuba-front-qty input[type=number]{
        width:56px;
        min-height:36px;
        padding:5px;
        font-size:12px;
    }
}
@media(max-width:360px){
    .kuba-front-product-card__buy .kuba-front-buy-form{
        width:100%;
        justify-content:flex-start;
    }
    .kuba-front-product-card__buy .kuba-front-add{
        width:auto;
        flex:1 1 auto;
    }
}


/* 0.4.19 — decimal quantities and localized validation */
.kuba-front-buy-form{position:relative;flex-wrap:wrap}
.kuba-front-qty-error{
    flex:1 0 100%;
    display:block;
    margin:2px 0 0;
    color:#b42318;
    font-size:11px;
    line-height:1.3;
    text-align:right;
}
.kuba-front-product-detail__buy .kuba-front-qty-error{text-align:left}
.kuba-front-qty input[aria-invalid=true]{
    border-color:#b42318;
    outline:2px solid rgba(180,35,24,.12);
}


/* 0.4.20 — compact quantity control; validation must not break card geometry */
.kuba-front-buy-form{
    position:relative;
    display:inline-flex;
    flex:0 0 auto;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    margin:0;
    padding:0;
}
.kuba-front-qty{
    display:inline-flex;
    flex:0 0 auto;
    margin:0;
}
.kuba-front-qty input[type=text],
.kuba-front-qty input[type=number]{
    width:62px;
    min-width:62px;
    max-width:62px;
    height:40px;
    min-height:40px;
    margin:0;
    padding:6px 7px;
    border:1px solid #d5dbe4;
    border-radius:10px;
    background:#fff;
    color:#111827;
    font:inherit;
    font-size:13px;
    font-weight:700;
    line-height:1;
    text-align:center;
    box-sizing:border-box;
}
.kuba-front-buy-form .kuba-front-add{
    flex:0 0 auto;
    min-height:40px;
    margin:0;
    white-space:nowrap;
}
.kuba-front-qty-error{
    display:none;
    position:absolute;
    top:calc(100% + 4px);
    right:0;
    z-index:2;
    width:max-content;
    max-width:min(320px,80vw);
    margin:0;
    padding:5px 7px;
    border:1px solid rgba(180,35,24,.18);
    border-radius:7px;
    background:#fff7f6;
    box-shadow:0 3px 12px rgba(17,24,39,.08);
    color:#b42318;
    font-size:11px;
    line-height:1.3;
    text-align:left;
}
.kuba-front-qty-error:not(:empty){display:block}
.kuba-front-product-grid.layout-list .kuba-front-product-card__buy{
    align-items:center;
}
.kuba-front-product-grid.layout-list .kuba-front-buy-form{
    align-self:center;
}
.kuba-front-product-grid.layout-compact .kuba-front-qty input[type=text],
.kuba-front-product-grid.layout-compact .kuba-front-qty input[type=number]{
    width:54px;
    min-width:54px;
    max-width:54px;
    height:34px;
    min-height:34px;
    padding:4px 5px;
    border-radius:8px;
    font-size:12px;
}
.kuba-front-product-grid.layout-compact .kuba-front-buy-form .kuba-front-add{
    min-height:34px;
}
.kuba-front-product-detail__buy .kuba-front-qty input[type=text],
.kuba-front-product-detail__buy .kuba-front-qty input[type=number]{
    width:76px;
    min-width:76px;
    max-width:76px;
    height:42px;
    min-height:42px;
}
.kuba-front-product-detail__buy .kuba-front-buy-form .kuba-front-add{min-height:42px}
@media(max-width:600px){
    .kuba-front-buy-form{gap:6px}
    .kuba-front-qty input[type=text],
    .kuba-front-qty input[type=number]{
        width:56px;
        min-width:56px;
        max-width:56px;
        height:36px;
        min-height:36px;
        padding:5px;
        font-size:12px;
    }
    .kuba-front-buy-form .kuba-front-add{min-height:36px}
}
@media(max-width:360px){
    .kuba-front-product-card__buy .kuba-front-buy-form{
        width:auto;
        flex-wrap:nowrap;
        justify-content:flex-start;
    }
    .kuba-front-product-card__buy .kuba-front-add{
        width:auto;
        flex:0 0 auto;
    }
}


/* 0.4.21 — validation message belongs to card geometry, never outside it */
.kuba-front-buy-form.has-quantity-error{
    display:grid;
    grid-template-columns:max-content max-content;
    grid-template-rows:auto auto;
    align-items:center;
    justify-content:start;
    column-gap:7px;
    row-gap:7px;
}
.kuba-front-buy-form.has-quantity-error .kuba-front-qty-error{
    position:static;
    grid-column:1 / -1;
    grid-row:2;
    display:block;
    width:auto;
    min-width:240px;
    max-width:340px;
    margin:0;
    padding:8px 10px;
    border:1px solid #f0a7a0;
    border-radius:8px;
    background:#fff1f0;
    box-shadow:none;
    color:#a61b12;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
    text-align:left;
    white-space:normal;
    overflow-wrap:anywhere;
    box-sizing:border-box;
}
.kuba-front-product-grid.layout-list .kuba-front-buy-form.has-quantity-error{
    align-self:flex-start;
}
.kuba-front-product-grid.layout-list .kuba-front-product-card__buy{
    align-items:flex-start;
}
.kuba-front-product-grid.layout-tiles .kuba-front-buy-form.has-quantity-error,
.kuba-front-product-grid.layout-compact .kuba-front-buy-form.has-quantity-error{
    width:100%;
    grid-template-columns:max-content max-content;
}
.kuba-front-product-grid.layout-tiles .kuba-front-buy-form.has-quantity-error .kuba-front-qty-error,
.kuba-front-product-grid.layout-compact .kuba-front-buy-form.has-quantity-error .kuba-front-qty-error{
    min-width:0;
    max-width:100%;
}
@media(max-width:600px){
    .kuba-front-buy-form.has-quantity-error{
        width:100%;
        max-width:100%;
    }
    .kuba-front-buy-form.has-quantity-error .kuba-front-qty-error{
        min-width:0;
        width:100%;
        max-width:100%;
        font-size:12px;
    }
}
