.hidden {
    display: none;
}

.center-text {
    text-align: center;
}

.checkout-button {
    font-size: 1.3rem;
}

.cart-total-label {
    font-size: 1.2rem;
    gap: 8px;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.placeholder-glow {
    transition: opacity 180ms ease;
}

.placeholder-glow.fade-out {
    opacity: 0;
}

#cartButton {
    display: flex;
    align-items: center;
    gap: 5px;
}

#cartCount {
    display: inline-block;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
}

.pku-navbar {
    background: linear-gradient(135deg, rgba(26, 32, 40, 0.98), rgba(24, 32, 42, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(10, 14, 20, 0.25);
}

.pku-navbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pku-nav-left,
.pku-nav-center,
.pku-nav-right {
    display: flex;
    align-items: center;
}

.pku-nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pku-nav-right {
    justify-content: flex-end;
    gap: 10px;
}

.pku-brand {
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 60vw;
}

.pku-navbar .navbar-toggler {
    border-radius: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.pku-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.pku-cart-btn {
    border-radius: 999px;
    padding: 6px 12px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#access-logout-slot {
    display: flex;
    align-items: center;
}

.pku-cart-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.search-container {
    position: relative;
}

.main-content {
    padding-top: 5.75rem;
}

.search-input {
    height: 50px;
    border-radius: 18px;
    padding-left: 35px;
    border: none;
    box-shadow: 4px 4px gainsboro;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #888;
}

.product-card {
    display: flex;
    position: relative;
    padding: 10px;
    background: #ffffff;
    border-radius: 16px;
    border-width: 1px;
    border-color: #aaa;
    border-style: solid;
    box-shadow: 4px 4px gainsboro;
}

.product-link {
    color: inherit;
    text-decoration: none;
}

.product-link--image {
    display: block;
}

.product-link--title:hover .product-title,
.product-link--title:focus .product-title {
    text-decoration: underline;
}

.product-card .image-wrapper {
    width: 200px;
    height: 200px;
    min-width: 200px;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 15px;
}

.product-card .image-wrapper .product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 220ms ease;
    will-change: opacity;
}
.product-card .image-wrapper .product-image.is-loaded {
    opacity: 1;
}

.product-card .details {
    flex-grow: 1;
    z-index: 2;
}

.product-card .product-title {
    font-size: 1.05rem;
    line-height: 1.25;
}

.product-card .product-subtitle {
    font-size: 0.9rem;
}

.product-card .meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.product-card .price {
    font-weight: 700;
    text-align: start;
    font-size: 1.45rem;
    margin: 0;
}

.product-card .weight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #374151;
}

.product-card .action-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-left: 16px;
}

.product-card .minus-btn {
    display: none;
    border-width: 0;
    color: #0a2300;
    background-color: transparent;
    font-size: 1.5rem;
    text-align: center;
    margin: 5px 0;
    padding: 0 5px;
}

.product-card .add-btn {
    border-width: 0;
    color: #0a2300;
    background-color: transparent;
    font-size: 1.5rem;
    text-align: center;
    margin: 5px 0;
    padding: 0 5px;
}

.product-card .product-count {
    display: none;
    border-width: 0;
    color: #0a2300;
    background-color: transparent;
    font-size: 1.5rem;
    text-align: center;
    margin: 5px 0;
}

.product-card.highlighted {
    background: linear-gradient(to right, #e9ecef 91%, #afe1af 9%);
}

.group-title {
    margin: 20px 0;
    padding: 10px;
    background-color: #c8f3d3;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 4px 4px gainsboro;
}

.group-container {
    margin-bottom: 30px;
}

.toast-container {
    z-index: 1055;
}

.toast-body {
    max-height: 400px;
    overflow-x: hidden;
    overflow-y: scroll;
    background-color: white;
}

.toast-body .colum-name {
    max-width: 150px;
}

.toast-body .remove-item {
    color: #dc3545;
    border-width: 0;
    background-color: transparent;
}

.row.products-row {
    margin-top: 20px;
}

.list-group-item.active {
    background-color: #afe1af !important;
    color: #023020 !important;
}

/* Modal Content */
.modal-content {
    border-radius: 18px;
    overflow: hidden;
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#modalImage {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 180ms ease;
}

#modalImage.is-loaded {
    opacity: 1;
}

.modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

/* Go To Top Button */
.go-top-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
}

.go-top-btn:hover {
    background-color: #555;
}

/* Cart Quantity Input */
.cart-quantity {
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: center;
    width: 50px;
    appearance: none;
    -moz-appearance: textfield;
}

.cart-quantity:focus {
    border: 1px solid #ced4da;
    background: #ffffff;
    width: 60px;
    cursor: text;
}

/* -------- Protein Chips -------- */

.protein-section {
    margin-top: 8px;
}

.protein-title-row {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.protein-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.protein-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1.1;
}

.protein-chip--empty {
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.18);
    color: #6b7280;
}

.protein-chip i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.protein-chip-label {
    font-weight: 600;
    opacity: 0.8;
}

.protein-chip-value {
    font-weight: 600;
}

.protein-chip-unit {
    opacity: 0.65;
}

/* ---------------- Mobile layout for product cards ---------------- */
@media (max-width: 576px) {
    .pku-navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .pku-navbar-inner {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .pku-brand {
        font-size: 0.95rem;
        max-width: 62vw;
    }

    .pku-nav-left {
        order: 1;
    }

    .pku-nav-right {
        order: 2;
        gap: 6px;
    }

    .pku-nav-center {
        position: absolute;
        transform: translateX(-50%);
        order: 3;
        width: auto;
        justify-content: center;
    }

    .pku-cart-btn {
        padding: 4px 8px;
    }

    .pku-navbar .navbar-toggler {
        padding: 4px 8px;
    }

    #access-logout-btn.access-logout-inline {
        padding: 4px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .product-card {
        flex-direction: row;
        align-items: flex-start;
        padding: 10px;
        gap: 12px;
    }

    .product-card.highlighted {
        background: rgba(155, 200, 155, 0.22);
        border-color: rgba(10, 35, 0, 0.18);
        box-shadow: 0 0 0 2px rgba(203, 248, 203, 0.55);
    }

    .product-card .image-wrapper {
        width: 96px;
        min-width: 96px;
        height: 96px;
        margin-right: 0;
        border-radius: 12px;
        aspect-ratio: 1 / 1;
    }

    .product-card .image-wrapper .product-image,
    .product-card .image-wrapper .placeholder-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-card .details {
        width: 100%;
        min-width: 0;
    }

    .product-card .details strong {
        font-size: 0.98rem;
        line-height: 1.2;
        display: block;
    }

    .product-card .details .text-muted {
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .product-card .meta-row {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 6px;
    }

    .product-card .price {
        font-size: 1.05rem;
        margin: 0;
    }

    .product-card .weight {
        margin: 0;
        font-size: 0.85rem;
    }

    .product-card .details .protein-table {
        font-size: 0.75rem;
    }

    .product-card .action-buttons {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        margin-left: 0;
        padding-top: 0;
        border-top: none;
        align-self: center;
    }

    .product-card .minus-btn,
    .product-card .add-btn,
    .product-card .product-count {
        font-size: 1.55rem;
    }

    .product-card .product-count {
        min-width: 36px;
        border-radius: 8px;
        background: rgba(0,0,0,0.05);
    }

    .search-input {
        height: 44px;
        border-radius: 14px;
    }

    .main-content {
        padding-top: 5.75rem;
    }

    .search-container {
        margin-top: 10px;
        margin-bottom: 6px;
    }

    .navbar .navbar-brand {
        font-size: 1rem;
    }

    #cartButton {
        position: fixed;
        right: 18px;
        bottom: 18px;
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        border: none;
        background: #0a2300;
        color: #f6fff7;
        box-shadow: 0 12px 26px rgba(10, 35, 0, 0.3);
        z-index: 1300;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #cartButton i {
        font-size: 1.4rem;
    }

    #cartButton:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(175, 225, 175, 0.65), 0 12px 26px rgba(10, 35, 0, 0.3);
    }

    #cartCount {
        position: absolute;
        top: -4px;
        right: -4px;
        font-size: 0.75rem;
        background: #f5fff7;
        color: #0a2300;
        padding: 2px 6px;
        border-radius: 999px;
        line-height: 1;
        border: 1px solid rgba(10, 35, 0, 0.2);
        box-shadow: 0 6px 12px rgba(10, 35, 0, 0.18);
        min-width: 18px;
        text-align: center;
    }

    .protein-title-row {
        font-size: 0.72rem;
    }

    .protein-chips {
        gap: 6px;
    }

    .protein-chip {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
}
