/* Layout moderno e-commerce - MSS-Catálogo */
:root {
    --navbar-height: 56px;
    --categories-bar-height: 52px;
    --card-radius: 0.5rem;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body.has-categories-bar {
    padding-top: calc(var(--navbar-height) + var(--categories-bar-height));
}

body {
    padding-top: var(--navbar-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Navbar fixa */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-size: 1.35rem;
}

/* Barra de categorias - botões em formato pílula */
.categories-bar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    height: var(--categories-bar-height);
    background: #82929f;
    border-bottom: 1px solid #e8e2d9;
    z-index: 1020;
    display: flex;
    align-items: center;
}

.categories-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.categories-buttons::-webkit-scrollbar {
    height: 4px;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    background: #ffffff;
    color: #363636;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #cc8f16;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.category-btn:hover {
    background: #e7a96b;
    border-color: #d0ccc4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    color: #2a2a2a;
}

.category-btn:active,
.category-btn.active {
    background: #d4a036;
    border-color: #d0ccc4;
    box-shadow: none;
    color: #363636;
}

.category-btn.active:hover {
    background: #e6ab35;
    color: #363636;
}

/* Quando não há barra de categorias (ex: página sem categorias) */
body:not(.has-categories-bar) {
    padding-top: var(--navbar-height);
}

/* Banner */
.banner-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.section-title {
    font-weight: 600;
    color: #212529;
}

/* Cards de produto */
.product-card {
    border: none;
    border-radius: var(--card-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover) !important;
}

.product-card .card-img-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
}

.product-card .card-img-top {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.product-card .no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

.product-card .card-body {
    padding: 1rem;
}

.product-card .card-title {
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Página do produto */
.product-main-image {
    aspect-ratio: 1;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image .no-image.large {
    width: 100%;
    min-height: 300px;
}

.product-gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    padding: 0;
    border: 2px solid #dee2e6;
    border-radius: 0.35rem;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: #0d6efd;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
}

/* Seletor de quantidade no card (cardápio) */
.quantity-row {
    background: #e8f4fc !important;
}

.quantity-selector .btn {
    min-width: 32px;
}

.quantity-selector .qty-value {
    min-width: 1.5rem;
    text-align: center;
}

/* Total do Pedido - box fixo */
.order-total-box {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1030;
    background: #0d6efd;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.order-total-label {
    font-size: 0.9rem;
    opacity: 0.95;
}

.order-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0.25rem 0;
}

.order-total-hint {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Paginação */
.pagination .page-link {
    border-radius: 0.25rem;
    margin: 0 1px;
}
