/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header and nav container */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #4b5320;
    color: #f0e6d2;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Pattern background / Fade overlay */
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(139, 69, 19, 0.15) 0,
            rgba(139, 69, 19, 0.15) 10px,
            rgba(160, 82, 45, 0.15) 10px,
            rgba(160, 82, 45, 0.15) 20px
        ),
        linear-gradient(to right, rgba(75, 83, 32, 1), rgba(75, 83, 32, 0));
    
    background-repeat: repeat;
    background-size: auto, 40px 40px, 100% 100%;
    background-blend-mode: overlay, multiply;
}

header img.logo {
    width: 4rem;
    height: 4rem;
    margin-right: 1rem;
}

/* Title */
header h3 {
    margin-right: 40px;
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Nav */
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

/* Links */
nav ul li a {
    text-decoration: none;
    color: #d2b48c;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    padding-bottom: 8px;
}

/* Hover effect */
nav ul li a:hover {
    background-color: #7c6f42;
    color: #f0e6d2;
    box-shadow: 0 0 8px 2px rgba(143, 151, 121, 0.7);
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* After effect */
nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 3px;
    background-color: #8f9779;
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* Footer styling */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #4b5320;
    color: #f0e6d2;
    text-align: center;
    padding: 6px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;

    /* Pattern background / Fade overlay */
    background-image:
    repeating-linear-gradient(
        45deg,
        rgba(139, 69, 19, 0.15) 0,
        rgba(139, 69, 19, 0.15) 10px,
        rgba(160, 82, 45, 0.15) 10px,
        rgba(160, 82, 45, 0.15) 20px
    ),
    linear-gradient(to right, rgba(75, 83, 32, 1), rgba(75, 83, 32, 0));
    background-repeat: repeat;
    background-size: 40px 40px;
    background-blend-mode: multiply;

    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* Body styling */
body {
    background-color: #d2b48c;

    /* Pattern background */
    background-image: repeating-linear-gradient(
        45deg,
        rgba(75, 83, 32, 0.1) 0,
        rgba(75, 83, 32, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #2f3e1c;
    min-height: 100vh;
}

figure.product {
    border: 1px solid black;
    border-radius: 1rem;
    padding: 1rem;
    color: black;
    background-color: white;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5rem;
    width: 75vw;
}

figure.product.loading {
    background-color: #007f7f;
    margin-bottom: 5rem;
}

figure.product.loading h1 {
    color: white;
    text-align: center;
}

figure.product.end {
    background-color: red;
    margin-bottom: 5rem;
}

figure.product.end h1 {
    color: white;
    text-align: center;
}

figure.product p.description {
    margin-bottom: 0.5rem;
}

figure.product h2 {
    margin-bottom: 0.2rem;
}

figure.product h4 {
    margin-bottom: 0.75rem;
}

figure.product h2 i {
    color: #404040;
}

figure.product div.attributes {
    margin-bottom: 1rem;
}

figure.product div.categories {
    margin-bottom: 1.125rem;
}

figure.product span {
    font-size: small;
    font-weight: bold;
    border: 1px solid black;
    border-radius: 0.25rem;
    padding: 0.2rem;
    margin-bottom: 0.5rem;
}

figure.product span.category {
    font-size: small;
    border: 3px solid black;
    border-radius: 0.25rem;
    padding: 0.125rem;
}

figure.product span.dietary {
    background-color: #4CAF50;    
}

figure.product span.sustainability {
    background-color: #7f7fff;    
}

figure.product span.labor_practices {
    background-color: #FFC107;    
}

figure.product span.political_donations {
    background-color: #E53935;    
}

figure.product span.packaging {
    background-color: #2196F3;    
}

figure.product span.allergens {
    background-color: #FF5722;    
}