:root {
    --primary: #8B0000;
    --primary-dark: #6b0000;
    --bg: #f4f4f4;
    --white: #ffffff;
    --gray: #e0e0e0;
    --text: #222;
}

.tab, .ver-menu-btn {
    cursor: pointer;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary);
}

.cart-icon {
    position: relative;
    font-size: 22px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero h1 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 8px;
}

.hero p {
    color: #555;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.familias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    justify-content: start;
}

.pizza-card.clickable-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pizza-card.clickable-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.familia-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.familia-image-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.familia-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.familia-thumb {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    background: #8B0000;
}

.ver-menu-btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.ver-menu-btn:hover {
    background: var(--primary-dark);
}

.product-image-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pizza-thumb {
    height: 120px;
    border-radius: 8px;
}

.pizza-card h3 {
    color: var(--primary);
}

.pizza-card p {
    font-size: 14px;
    color: #555;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.price {
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.add-btn:hover {
    background: var(--primary-dark);
}

.cart-panel {
    position: fixed;
    right: 0;
    top: 72px;
    width: 360px;
    max-width: 100%;
    background: var(--white);
    padding: 24px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.1);
    height: calc(100vh - 72px);
    overflow-y: auto;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.order-form input,
.order-form select {
    padding: 10px;
    border: 1px solid var(--gray);
    border-radius: 6px;
    font-size: 16px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    padding: 8px 0;
    border-top: 1px solid var(--gray);
}

.submit-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray);
}

.remove-btn {
    background: transparent;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

@media (max-width: 900px) {
    .cart-panel {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: none;
        padding: 16px;
    }
    .container {
        padding-bottom: 24px;
    }
}
