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

body {
    background-color: #F6EFEA;
    color: #160904;
    font-size: 22px;
    margin-top: auto;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

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

.image-container {
    max-width: 1000px;
    margin: 2rem auto;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

body,
nav,
h1,
h2,
h3 {
    font-family: "Poiret One", sans-serif;
    font-weight: 500;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

main {
    flex: 1;
    padding: 1rem;
}

.page-title {
    font-size: 2.5rem;
    padding: 1rem 0;
    text-align: center;
}

.images,
.about-image,
.form-container,
.product-card {
    box-shadow:
        0 6px 12px rgba(54, 32, 24, 0.25),
        0 10px 24px rgba(54, 32, 24, 0.18);
}

/* Branding */
#logo {
    color: #160904;
    display: inline-flex;
    font-family: "Babylonica", cursive;
    font-size: 5rem;
    font-style: normal;
    font-weight: 400;
    padding: 0 1rem;
}

#branding {
    display: flex;
    justify-content: space-between;
}

.brand-name {
    font-family: "Babylonica", cursive;
    font-size: 2.6rem;
}

.tagline {
    font-family: "Babylonica", cursive;
    font-size: 3.5rem;
}

/* Navigation and Footer */
nav,
footer {
    background-color: #251109;
    color: #F6EFEA;
    text-align: center;
}

nav {
    border-top: 4px solid #58351b;
    border-bottom: 5px solid #402712;
    -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
}

.links.active,
#menu a:hover {
    font-weight: 700;
}

footer {
    border-top: 4px solid #58351b;
    -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    padding: 1rem;
}

footer p {
    color: #F6EFEA;
}

.fa-brands {
    padding: 1rem;
}

/* Menu */
#menu {
    display: inline;
    font-size: 1.2rem;
    padding: 1rem 0;
}

#menu li {
    display: inline;
    line-height: 2;
    margin-right: 2rem;
    padding-inline: 2rem;
}

#menu li a {
    color: #F6EFEA;
    font-family: "Poiret One", sans-serif;
}

/* Buttons */
.btn-container {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
}

.primary-btn {
    background-color: #3A1F10;
    border: none;
    color: #F6EFEA;
    cursor: pointer;
    font-family: "Poiret One", sans-serif;
    font-size: 1.5rem;
    margin-inline: auto;
    margin-top: 1rem;
    padding: 1rem 2rem;
    border-top: 9px solid #58351b;
    border-right: 10px solid #311c0b;
    border-bottom: 10px solid #241505;
    border-left: 10px solid #402712;
    -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.15),
        0px 1px 2px black;
    width: fit-content;
}

.primary-btn:hover {
    background-color: #4B2E17;
    border-color: #5F391F #311F0D #170D03 #341F0F;
}

.primary-btn:active {
    border-color: #170D03 #341F0F #5F391F #311F0D;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

.secondary-btn {
    background-color: #F3E9E1;
    border: none;
    color: #251109;
    cursor: pointer;
    font-family: "Poiret One", sans-serif;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    position: relative;
    width: fit-content;

    border-top: 5px solid #FFF8F2;
    border-right: 6px solid #E2D6CB;
    border-bottom: 6px solid #D2C3B6;
    border-left: 6px solid #E9DDD3;

    box-shadow:
        inset 0px 1px 0px rgba(255, 255, 255, 0.7),
        0px 1px 2px rgba(95, 70, 50, 0.35);
}

.secondary-btn:hover {
    background-color: #EBDDCE;
}

.secondary-btn:active {
    border-color: #D2C3B6 #E9DDD3 #FFF8F2 #E2D6CB;
    box-shadow: none;
}

/* Contact Us page */
input[type=text],
input[type=email],
input[type=tel],
textarea {
    border: 1px solid #341F0F;
    font-family: 'Poiret One', sans-serif;
    font-size: 22px;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}

.form-container {
    background: url("../images/white-choc-shavings.png") no-repeat center bottom;
    border: 2px solid #251109;
    margin: 2rem auto;
    max-width: 1000px;
    padding: 2rem;
}

/* Our Chocolates page */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 0 auto;
    max-width: 900px;
    padding: 2rem 0;
}

.product-card {
    background-color: #251109;
    color: #F6EFEA;
    display: flex;
    flex-direction: column;
    padding: 0.2rem;
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

.product-card:hover {
    animation: scaleUp 0.3s ease forwards;
}

.product-card img {
    margin-bottom: 1rem;
    max-width: 100%;
}

.product-card .secondary-btn {
    margin-top: auto;
}

.product-title {
    font-size: 1.4rem;
    padding-bottom: 1.2rem;
    text-align: center;
}

.product-footer {
    display: flex;
    margin-top: auto;
    justify-content: space-between;
}

.product-card p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

#price {
    font-size: 1.3rem;
    margin: auto 0;
}

/* About page */
.about-image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.about-image {
    display: block;
    width: auto;
    max-width: 32%;
    height: auto;
}

@media (max-width: 768px) {
    .about-image {
        max-width: 100%;
    }
}

/* Cart Page */
.cart-container {
    width: 100%;
    max-width: 80vw;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(37, 17, 9, 0.25);
}

.cart-item-info h3 {
    margin: 0;
}

.cart-item-price {
    opacity: 0.8;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#cart-count {
    border: 1px solid rgba(246, 239, 234, 0.5);
    padding: 4px;
}

.quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity button {
    background: none;
    border: 1px solid #251109;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.cart-item-subtotal {
    min-width: 70px;
    text-align: right;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: red;
    cursor: pointer;
    line-height: 1;
}

#cart-summary {
    align-self: flex-end;
    text-align: right;
}

.cart-total-price {
    font-size: 1.5rem;
    margin: 0.5rem 0 1.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .cart-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    #cart-summary {
        align-self: stretch;
        text-align: center;
    }
}

/* Bean to Bar page */
summary {
    font-size: 33px;
}

.journey-section {
    width: 100%;
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* Mobile Navigation */
@media (max-width: 1100px) {
    .burger-menu {
        display: flex;
        flex-direction: column;
        padding: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }

    button.burger-menu.active {
        padding: 2rem;
        position: absolute;
        right: 0;
    }

    .burger-menu span {
        background: #160904;
        width: 25px;
        height: 3px;
        margin: 3px 0;
        transition: 0.3s;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #251109;
        padding-top: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    nav.active {
        right: 0;
    }

    #menu {
        display: flex;
        flex-direction: column;
        height: 100%;
        text-align: center;
    }

    #menu li {
        margin: 15px 0;
    }

    /* Burger animation when active */
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: #F6EFEA;
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
        background: #F6EFEA;
    }
}

@media (max-width: 500px) {
    #logo {
        font-size: 3.3rem;
    }
}

@media (max-width: 1000px) {
    #branding {
        border-bottom: 4px solid #58351b;
    }
}