
/* ===== Хлібні крихти ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    padding: 16px 0;

    max-width: 100%; 
    min-width: 0;  
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.crumb-dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #c9ceda;
    display: inline-block;
    flex-shrink: 0;
}

.crumb-current {
    flex: 1 1 auto;  
    min-width: 0;    
    overflow: hidden; 
    text-overflow: ellipsis;
    white-space: nowrap; 
    color: var(--muted);
}


/* ===== Головна сітка товару ===== */
.product-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px
}

@media (max-width:960px) {
    .product-grid {
        grid-template-columns: 1fr
    }
}

/* ===== Галерея ===== */
.gallery {
    background: linear-gradient(90deg, rgba(1, 255, 204, .12), transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px
}

.gallery-main {
    aspect-ratio: 1/1;
    border-radius: 12px;
    background: radial-gradient(60% 60% at 50% 40%, rgba(1, 255, 204, .12), transparent 60%), #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border)  
}

.gallery-main img {
    object-fit: contain;
    width: 100%;
    height: 100%
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px
}

@media (max-width:520px) {
    .thumbs {
        grid-template-columns: repeat(4, 1fr)
    }
}

.thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: .95;
    background: #fff
}

.thumb[aria-selected="true"] {
    outline: 2px solid var(--ring);
    opacity: 1
}

.buy-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow)
}

.title-row {
    display: flex;
    gap: 12px;
    align-items: center
}

.brand-chip {
    background: rgba(255, 212, 0, .18);
    border: 1px solid rgba(255, 212, 0, .45);
    color: #3b3b3b;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: .76rem
}

.brand-ds {
    background: rgba(0, 255, 110, 0.18);
    border: 1px solid #10b981;
    color: #3b3b3b;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: .76rem
}

h1 {
    font-size: 1.5rem;
    line-height: 1.25;
    margin: .25rem 0 .4rem
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600
}

.stars {
    letter-spacing: 2px
}
.price-block {
    display: flex;
    flex-direction: column;
    margin: 12px 0;
    line-height: 1.2;
}

.current-price {
    font-size: 2rem; 
    font-weight: 600;
    color: #000;
    display: flex;
    align-items: baseline;
    gap: .4rem;
    flex-wrap: wrap;
}

.old-save-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    font-size: 0.9rem;
}

.old-price {
    color: #000;
    font-weight: 400;
    text-decoration: line-through;
    opacity: .7;
}

.save {
    color: #007a1c;
    font-weight: 600;
    white-space: nowrap;
}

.out-f-stock {
    color: #7a0000;
    font-weight: 600;
    white-space: nowrap;
}

.low-stock {
    color: #aa8108;
    font-weight: 600;
    white-space: nowrap;
}

@media (min-width: 576px) {
    .price-block {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        row-gap: 8px;
        column-gap: 14px;
    }

    .current-price {
        font-size: 2rem;
        order: 1;
    }

    .old-save-row {
        order: 2;
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-end;
        gap: 12px;
        font-size: 1rem;
    }
}

.variants {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0
}

.chip {
    border: 1px solid var(--border);
    background: #fff;
    padding: .55rem .8rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer
}

.chip[data-active="true"],
.chip:hover {
    border-color: #d3d7e3;
    background: #f7f9fc
}

.qty-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff
}

.qty button {
    background: #f2f4f8;
    border: 0;
    color: var(--text);
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer
}

.qty input {
    width: 56px;
    text-align: center;
    background: #fff;
    border: 0;
    color: var(--text);
    font-weight: 700
}

.cta-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 10px;
    margin-top: 12px
}

@media (max-width:520px) {
    .cta-row {
        grid-template-columns: 1fr
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand), #ffb700);
    color: #000
}

.btn-primary:hover {
    filter: brightness(1.05);
    color: #000
}

.btn-ghost {
    background: #fff;
    border-color: var(--border);
    color: var(--text)
}

.trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px
}

@media (max-width:640px) {
    .trust {
        grid-template-columns: 1fr 1fr
    }
}

.trust .pill {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
    color: var(--muted)
}

.panels {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 20px;
    margin-top: 22px
}

@media (max-width:960px) {
    .panels {
        grid-template-columns: 1fr
    }
}

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow)
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px
}

.tab {
    padding: .5rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer
}

.tab[aria-selected="true"] {
    outline: 2px solid var(--ring)
}

.specs {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    border-top: 1px dashed #d9deea;
    padding-top: 12px
}

.specs div {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px
}

.nutrition {
    border: 1px dashed #d9deea;
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(90deg, rgba(1, 255, 204, .12), transparent)
}

.nutr-table {
    width: 100%;
    border-collapse: collapse
}

.nutr-table th,
.nutr-table td {
    border-bottom: 1px solid #eef1f6;
    padding: 10px;
    text-align: left
}

.nutr-table th {
    color: var(--muted);
    font-weight: 700
}

.faq details {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text)
}

.faq details+details {
    margin-top: 10px
}

summary {
    cursor: pointer;
    font-weight: 700
}

summary::marker {
    color: var(--text)
}

section {
    margin: 24px 0
}

.section-title {
    display: flex;
    align-items: baseline;
    gap: 12px
}

.section-title h2 {
    margin: 0;
    font-size: 1.4rem
}

.section-title .kicker {
    color: var(--muted);
    font-weight: 600
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px
}

@media (max-width:1100px) {
    .cards {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media (max-width:780px) {
    .cards {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:520px) {
    .cards {
        grid-template-columns: 1fr
    }
}

.card .ph {
    aspect-ratio: 1/1;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    
    /* нове */
    display: flex;
    flex-direction: column;
}

.card .body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card .buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.chip-price {
    background: rgba(1, 255, 204, .12);
    border: 1px solid rgba(3, 97, 47, 0.45);
    color: #111827;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-weight: 600
}

.mini-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700
}

/* ===== Мобільна липка панель «Додати в кошик» ===== */
.sticky-bar {
    position: sticky;
    bottom: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.2) blur(6px);
    border-top: 1px solid var(--border);
    display: none
}

.sticky-inner {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0
}

.sticky-title {
    font-weight: 800
}

@media (max-width:960px) {
    .sticky-bar {
        display: block
    }
}
/* ===================== ПК (≥992px) ===================== */
@media (min-width: 992px) {
  .cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    overflow-x: auto;
  }
  .card { height: auto; }
  .card .ph { aspect-ratio: 1/1; height: auto; }
}

/* ===================== Планшети (520–991px) ===================== */
@media (min-width: 520px) and (max-width: 991px) {
  .cards{
    display: grid !important;
    grid-auto-flow: column;   
    grid-auto-columns: 220px;
    gap: 12px;
    overflow-x: auto;           
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .card{
    width: 220px;
    scroll-snap-align: start;
    height: auto;
  }
  .card .ph{
    aspect-ratio: 1/1; 
    height: auto;
  }
  .card .body{ padding: 10px; }
  .card .name{
    font-size: .95rem; line-height: 1.25;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; min-height:2.5em;
  }
}

/* ===================== Мобільні (<520px) ===================== */
@media (max-width: 519px) {
  .cards{
    display: flex !important;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 8px 0;
  }
  .cards::-webkit-scrollbar { height: 6px; }
  .cards::-webkit-scrollbar-thumb { background:#e2e6f0; border-radius:999px; }
  .cards { scrollbar-width: thin; scrollbar-color:#e2e6f0 transparent; }

  .card{
    flex: 0 0 160px;    
    scroll-snap-align: start;
    border-radius: 10px;
    height: auto;
  }
  .card .ph{
    height: 100px;      
    aspect-ratio: auto !important;
  }
  .card .ph img{ width:100%; height:100%; object-fit:contain; display:block; }
  .card .body{ padding: 8px; }
  .card .name{
    font-size: .85rem; line-height: 1.2;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; min-height: 2.3em;
  }
  .chip-price{ font-size: .82rem; padding: .15rem .45rem; }
  .mini-btn{ height: 28px; font-size: .8rem; padding: 0 8px; }
}

.cta-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width:520px) {
    .cta-group {
        grid-template-columns: 1fr;
    }
}

.cta-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    width: 100%;
    height: 44px;             
    border-radius: 10px;

    font-size: .88rem;    
    font-weight: 600;  
    line-height: 1;        
    letter-spacing: -0.03em;    
    text-align: center;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;

    cursor: pointer;
    text-decoration: none;
    user-select: none;

    text-shadow: none;

    transition: background-color .12s linear,
                box-shadow .12s linear,
                color .12s linear,
                border-color .12s linear,
                transform .12s linear;

    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    -webkit-font-smoothing: antialiased;
    font-smooth: antialiased;
}

.cta-primary {
    background-color: #10b981;
    color: #000000;
    border: 1px solid rgba(0,0,0,.08);

    box-shadow:
        0 2px 4px rgba(0,0,0,.18),
        0 8px 16px rgba(16,185,129,.35);
}

.cta-primary:hover {
    background-color: #14c99a;
    box-shadow:
        0 3px 6px rgba(0,0,0,.22),
        0 10px 18px rgba(20,201,154,.4);
}

.cta-primary:active {
    background-color: #0a8a63;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
    transform: translateY(1px);
}

.cta-secondary {
    background-color: #ffffff;
    color: #4c1d95;
    border: 1px solid rgba(76,29,149,.3);
    box-shadow:
        0 2px 4px rgba(76,29,149,.15),
        0 8px 16px rgba(76,29,149,.15);
}

.cta-secondary:hover {
    background-color: #faf8ff;
    border-color: rgba(76,29,149,.55);
    box-shadow:
        0 3px 6px rgba(76,29,149,.22),
        0 10px 20px rgba(76,29,149,.22);
}

.cta-secondary:active {
    background-color: #f0eaff;
    box-shadow: inset 0 2px 4px rgba(76,29,149,.4);
    transform: translateY(1px);
}

@media (max-width:520px) {
    .cta-btn {
        height: 48px;
        font-size: .9rem;
        border-radius: 12px;
    }
}

.admin-float {
    position: absolute;
    left: 0;
    z-index: 2000;
    display: flex;
    gap: 8px;
    margin-left: 12px;
    margin-top: 8px;
    background: transparent;
}

.admin-float.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
}

.btn-adm {
    background: #000;
    color: #c9ceda;
    border-radius: 100px;
    padding: 10px 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 0 6px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.2s ease-in-out;
}

.btn-adm:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.35),
        0 0 10px rgba(255, 255, 255, 0.05) inset;
}

.btn-adm:active {
    transform: translateY(0);
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

.countdown {
    width: 100%;
}

.discount-countdown {
    width: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #f06595 40%, #845ef7 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    box-sizing: border-box;
}

.discount-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.discount-label {
    font-size: 1.3rem;
    white-space: nowrap;
}

.discount-timer {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 0.6rem;
    font-size: 1.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 440px) {
    .discount-countdown {
        padding: 0.65rem 0.75rem;
        gap: 0.5rem;
    }
    .discount-icon {
        font-size: 1.4rem;
    }
    .discount-label {
        font-size: 1rem;
    }
    .discount-timer {
        font-size: 1rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 520px) {
    .discount-countdown {
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.4rem;
    }
    .discount-left {
        justify-content: center;
    }
    .discount-label {
        white-space: normal;
    }
    .discount-icon {
        font-size: 1.4rem;
    }
    .discount-label {
        font-size: 1rem;
    }
}
@media (max-width: 360px) {
    .discount-countdown {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.4rem;
    }
    .discount-left {
        justify-content: center;
    }
    .discount-label {
        white-space: normal;
    }
}