h1,
h2 {
    font-weight: 700;
    margin: 0;
}

.categories-section {
    width: 100%;
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #fff8dc 100%);
}

.container-cat {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

.section-title {
    font-weight: 900;
    font-size: 4rem;
    color: black;
    margin-bottom: 0.3rem;
    position: relative;
}

.section-title::before {
    position: absolute;
    left: 25%;
    top: 0;
    content: '';
    height: 10px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    width: 15%;
    border-radius: 10px;
}

.section-desc {
    color: #555;
    margin-bottom: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}


.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.product-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-card h4 {
    margin: 0.5rem 0;
    color: #2c3e50;
}

.product-card p {
    color: #777;
    font-size: 0.9rem;
}

.details-page {
    display: none;
    padding: 25px;

}

.details-page.active {
    display: block;
}

.back-button {
    background: black;
    color: #ffce07;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 15px;
}

.details-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.details-header img {
    flex: 1 1 300px;
    max-width: 400px;
    border-radius: 15px;
    padding: 15px;
}

.details-info {
    flex: 1 1 300px;
}

.details-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.details-info p {
    color: #555;
    line-height: 1.5;
}

.toggle-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
    width: 70%;
}

.toggle-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.toggle-buttons button.active {
    background: #ffce07;
    color: black;
}

.toggle-buttons button:not(.active) {
    background: black;
    color: #ffce07;
}

/* nutration table */
.nutrition-facts {
    background: #fffdf3;
    border: 2px solid #333;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: none;
}

.nutrition-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.nutrition-item:last-child {
    border-bottom: none;
}

.nutrition-label {
    font-weight: 600;
}

.nutrition-value {
    font-weight: 500;
}

/* details-table bottom */
.details-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    /* Needed for border-radius */
    border-spacing: 0;
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    /* Ensures rounded corners work */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

.table-row {
    display: table-row;
}

.table-header {
    font-weight: bold;
    background: linear-gradient(135deg, #f5f5f5, #eaeaea);
    color: #333;
}

.table-row div {
    display: table-cell;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.table-row:last-child div {
    border-bottom: none;
}

.table-row:nth-child(even):not(.table-header) {
    background-color: #fafafa;
}

.table-row:hover:not(.table-header) {
    background-color: #f1f1f1;
    transition: background-color 0.3s ease;
}

@media (max-width:700px) {
    .container-cat {
        max-width: 900px;
        margin: auto;
        padding: 0px;
    }
}