/* =========================
   MistyMade Global Styles
   ========================= */

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

body {
    font-family: Arial, sans-serif;
    background-color: #783903;
    color: #020202;
}

/* =========================
   Header
   ========================= */

header {
    width: 100%;
    background-color: #FF85B3;
}

.header-container {
    width: 100%;
    min-height: 80px;
    padding: 0 20px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Logo */
.logo {
    justify-self: start;
}

.logo img {
    display: block;
    width: 140px;
    height: auto;
    max-height: 75px;
    object-fit: contain;
}

/* Navigation */

.main-nav {
    justify-self: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 35px;
}

.main-nav a {
    text-decoration: none;
    color: #fffdfd;
    font-size: 16px;
}

.main-nav a.active {
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.main-nav a:hover {
    opacity: 0.7;
}

/* Login */

.header-actions {
    justify-self: end;

    display: flex;
    align-items: center;
}

.header-actions a {
    text-decoration: none;
    color: #fffcfc;
    font-size: 16px;
}

.header-actions a:hover {
    opacity: 0.7;
}

/* =========================
   Menu Page
   ========================= */

.menu-page {
    background-color: #F5E6D3;
    min-height: 700px;
    padding: 50px 30px 70px;
}

/* Menu Title */

.menu-page h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 45px;
    color: #ffffff;
    letter-spacing: 1px;
}

/* Product Grid */

.menu-container {
    max-width: 1050px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
}

/* Product Card */

.product-card {
    background-color: #fffaf3;
    border-radius: 18px;
    padding: 25px;

    text-align: center;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* Product Image */

.product-image {
    width: 100%;
    max-width: 300px;
    height: 190px;

    margin: 0 auto 20px;

    background-color: #dddddd;

    border-radius: 14px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;
}

/* Product Name */

.product-card h2 {
    font-size: 22px;
    font-weight: 600;

    margin-bottom: 8px;

    color: #2b211c;
}

/* Product Description */

.product-card p:not(.price) {
    max-width: 500px;
    margin: 0 auto 12px;

    font-size: 15px;
    line-height: 1.5;

    color: #5b4a40;
}

/* Product Price */

.product-card .price {
    font-size: 18px;
    font-weight: bold;

    margin-bottom: 20px;

    color: #713103;
}

/* =========================
   Sourdough Inclusions
   ========================= */

.inclusion-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

    margin: 15px 0 22px;
}

/* Individual Inclusion */

.inclusion-bubble {
    position: relative;
    display: block;

    cursor: pointer;
}

/* Hide Actual Checkbox */

.inclusion-bubble input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Inclusion Card */

.inclusion-bubble span {
    min-height: 68px;
    padding: 12px;

    background-color: #ffffff;

    border: 2px solid #d8c5b3;
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 14px;
    font-weight: bold;

    color: #3a2b23;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Inclusion Hover */

.inclusion-bubble:hover span {
    border-color: #713103;
    background-color: #fffaf5;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Inclusion Selected */

.inclusion-bubble input:checked + span {
    background-color: #f1f6ec;

    border-color: #5f7f45;

    color: #3f5d2d;

    box-shadow: 0 4px 10px rgba(95, 127, 69, 0.15);
}

/* Selected Checkmark */

.inclusion-bubble input:checked + span::before {
    content: "✓";

    margin-right: 7px;

    font-size: 15px;
    font-weight: bold;

    color: #5f7f45;
}

/* =========================
   Cookie Options
   ========================= */

.cookie-section-title {
    margin-top: 20px !important;
    margin-bottom: 12px !important;

    font-size: 15px !important;
    font-weight: bold !important;

    color: #2b211c !important;
}

/* Quantity Options */

.cookie-quantity-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;

    margin-bottom: 20px;
}

.cookie-option {
    position: relative;
    cursor: pointer;
}

.cookie-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cookie-option span {
    min-height: 75px;
    padding: 12px;

    background-color: #ffffff;

    border: 2px solid #d8c5b3;
    border-radius: 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    transition: all 0.2s ease;
}

.cookie-option strong {
    font-size: 15px;
}

.cookie-option small {
    margin-top: 5px;

    font-size: 14px;
    font-weight: bold;

    color: #713103;
}

.cookie-option:hover span {
    border-color: #713103;
    background-color: #fffaf5;

    transform: translateY(-2px);
}

.cookie-option input:checked + span {
    background-color: #f1f6ec;
    border-color: #5f7f45;

    box-shadow: 0 4px 10px rgba(95, 127, 69, 0.15);
}

.cookie-option input:checked + span::before {
    content: "✓";

    margin-bottom: 4px;

    color: #5f7f45;
    font-weight: bold;
}

/* Cookie Flavors */

.cookie-flavor-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;

    margin-bottom: 22px;
}

.cookie-flavor-option {
    position: relative;
    cursor: pointer;
}

.cookie-flavor-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cookie-flavor-option span {
    min-height: 55px;
    padding: 10px;

    background-color: #ffffff;

    border: 2px solid #d8c5b3;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 14px;
    font-weight: bold;

    color: #3a2b23;

    transition: all 0.2s ease;
}

.cookie-flavor-option:hover span {
    border-color: #713103;
    background-color: #fffaf5;

    transform: translateY(-2px);
}

.cookie-flavor-option input:checked + span {
    background-color: #f1f6ec;
    border-color: #5f7f45;

    color: #3f5d2d;

    box-shadow: 0 4px 10px rgba(95, 127, 69, 0.15);
}

.cookie-flavor-option input:checked + span::before {
    content: "✓";

    margin-right: 7px;

    color: #5f7f45;
    font-weight: bold;
}

/* =========================
   Add to Cart Button
   ========================= */

.product-card button {
    width: 100%;

    padding: 13px 20px;

    border: none;
    border-radius: 10px;

    background-color: #713103;
    color: #ffffff;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-card button:hover {
    background-color: #5d2802;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    margin-left: 5px;
    background-color: #ffffff;
    color: #713103;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}


/* =========================
   Menu - Mobile
   ========================= */

@media (max-width: 750px) {

    .menu-page {
        padding: 35px 20px 50px;
    }

    .menu-page h1 {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .menu-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .product-card {
        padding: 20px;
    }

    .product-image {
        max-width: 100%;
        height: 200px;
    }

    .logo img {
    width: 120px;
    height: 55px;
}
}

/* =========================
   Menu - Small Phones
   ========================= */

@media (max-width: 450px) {

    .menu-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .product-card {
        padding: 17px;
        border-radius: 15px;
    }

    .product-image {
        height: 170px;
    }

    .inclusion-options {
        grid-template-columns: 1fr;
    }

    .inclusion-bubble span {
        min-height: 55px;
    }
}

/* =========================
   Add to Cart
   ========================= */

.product-card button {
    width: 100%;

    padding: 13px 20px;

    border: none;
    border-radius: 10px;

    background-color: #713103;
    color: #ffffff;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-card button:hover {
    background-color: #5d2802;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-card button:active {
    transform: translateY(0);
}

/* =========================
   Menu Mobile Layout
   ========================= */

@media (max-width: 750px) {

    .menu-page {
        padding: 35px 20px 50px;
    }

    .menu-page h1 {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .menu-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .product-card {
        padding: 20px;
    }

    .product-image {
        max-width: 100%;
        height: 200px;
    }
}

/* Smaller Phones */

@media (max-width: 450px) {

    .menu-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .product-card {
        padding: 17px;
        border-radius: 15px;
    }

    .product-image {
        height: 170px;
    }

    .inclusion-options {
        grid-template-columns: 1fr;
    }

    .inclusion-bubble span {
        min-height: 55px;
    }
}

/* =========================
   About Me Page
   ========================= */

.about-page {
    background-color: #F5E6D3;
    min-height: 700px;
    padding: 40px 30px;
}

.about-page h1 {
    text-align: center;
    font-size: 36px;
    color: #ffffff;
    text-decoration: underline;
    margin-bottom: 50px;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;

    background-color: #fffaf3;
    padding: 40px;
    border: 2px solid #d8c5b3;
    border-radius: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* Misty's Picture */

.about-image {
    width: 280px;
    height: 340px;
    margin: 0 auto;

    background-color: #dddddd;
    border-radius: 14px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

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

.about-image span {
    color: #ff3333;
    font-weight: bold;
    font-style: italic;
}

/* About Text */

.about-text {
    color: #000000;
}

.about-text h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

.about-text p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* =========================
   Cart Page
   ========================= */

.cart-page {
    background-color: #F5E6D3;
    min-height: 700px;
    padding: 40px 30px 70px;
}

.cart-page h1 {
    text-align: center;
    font-size: 36px;
    color: #ffffff;
    text-decoration: underline;
    margin-bottom: 40px;
}

.cart-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Individual Cart Item */

.cart-item {
    background-color: #fffaf3;
    min-height: 140px;
    margin-bottom: 20px;
    padding: 20px;

    display: grid;
    grid-template-columns: 130px 1fr auto auto auto;
    align-items: center;
    gap: 25px;

    border: 2px solid #d8c5b3;
    border-radius: 18px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);
}

/* Product Image */

.cart-image {
    width: 130px;
    height: 100px;

    background-color: #dddddd;
    border-radius: 12px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;
}

/* Product Information */

.cart-product h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2b211c;
}

.cart-product p {
    font-size: 15px;
    margin-bottom: 6px;
    color: #5b4a40;
}

.cart-product ul {
    margin: 5px 0 10px 20px;
    color: #5b4a40;
}

.cart-product li {
    font-size: 14px;
    margin-bottom: 3px;
}

.cart-product > p:last-child {
    font-size: 17px;
    font-weight: bold;
    color: #713103;
    margin-top: 10px;
}

/* Quantity */

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-quantity form {
    margin: 0;
}

.cart-quantity button {
    width: 30px;
    height: 30px;

    border: 1px solid #713103;
    border-radius: 5px;

    background-color: #ffffff;
    color: #713103;

    font-size: 18px;
    cursor: pointer;
}

.cart-quantity button:hover {
    background-color: #f1e5d9;
}

.cart-quantity span {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

/* Item Total */

.cart-price {
    font-weight: bold;
    font-size: 17px;
    color: #713103;
    white-space: nowrap;
}

/* Remove */

.cart-remove button {
    border: none;
    background: none;

    color: #713103;
    text-decoration: underline;

    cursor: pointer;
    font-size: 14px;
}

.cart-remove button:hover {
    color: #5d2802;
}

/* Cart Summary */

.cart-summary {
    margin-top: 35px;
    margin-left: auto;
    max-width: 350px;

    text-align: right;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;

    font-size: 20px;
    margin-bottom: 25px;

    color: #2b211c;
}

.cart-summary p strong {
    color: #713103;
}

/* Checkout */

.checkout-button {
    display: block;

    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 8px;

    background-color: #713103;
    color: #ffffff;

    font-size: 16px;
    font-weight: bold;

    text-align: center;
    text-decoration: none;

    cursor: pointer;
}

.checkout-button:hover {
    background-color: #5d2802;
}

/* Continue Shopping */

.continue-shopping {
    display: block;

    margin-top: 15px;

    color: #000000;
    text-decoration: underline;

    font-size: 14px;
}

.continue-shopping:hover {
    opacity: 0.7;
}

/* =========================
   Cart Mobile
   ========================= */

@media (max-width: 750px) {

    .cart-page {
        padding: 35px 20px 50px;
    }

    .cart-page h1 {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 15px;

        padding: 15px;
    }

    .cart-image {
        width: 100px;
        height: 85px;
    }

    .cart-product h2 {
        font-size: 18px;
    }

    .cart-quantity {
        grid-column: 2;
        justify-self: start;
    }

    .cart-price {
        grid-column: 2;
        justify-self: start;
    }

    .cart-remove {
        grid-column: 2;
        justify-self: start;
    }

    .cart-summary {
        max-width: 100%;
    }
}

/* =========================
   Checkout Page
   ========================= */

.checkout-page {
    background-color: #F5E6D3;
    min-height: 700px;
    padding: 40px 30px 70px;
}

.checkout-page h1 {
    text-align: center;
    font-size: 36px;
    color: #ffffff;
    text-decoration: underline;
    margin-bottom: 40px;
}

/* Main Checkout Layout */

.checkout-container {
    max-width: 1050px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;

    align-items: start;
}

/* =========================
   Order Summary
   ========================= */

.checkout-order {
    background-color: #fffaf3;
    padding: 30px;

    border: 2px solid #d8c5b3;
    border-radius: 18px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);
}

.checkout-order h2,
.checkout-form h2 {
    font-size: 20px;
    color: #2b211c;
    margin-bottom: 25px;
}

/* Individual Order Item */

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
    padding: 15px 0;

    border-bottom: 1px solid #d8c5b3;

    color: #3a2b23;
}

.order-item > span:first-child {
    line-height: 1.5;
}

.order-item > span:last-child {
    color: #713103;
    font-weight: bold;
    white-space: nowrap;
}

.order-item small {
    color: #5b4a40;
    font-size: 14px;
}

/* Order Total */

.order-total {
    display: flex;
    justify-content: space-between;

    margin-top: 25px;

    font-size: 20px;
    color: #2b211c;
}

.order-total strong {
    color: #713103;
}

/* =========================
   Checkout Form
   ========================= */

.checkout-form {
    background-color: #fffaf3;
    padding: 30px;

    border: 2px solid #d8c5b3;
    border-radius: 18px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);
}

.checkout-form form {
    display: flex;
    flex-direction: column;
}

.checkout-form label {
    font-weight: bold;
    color: #2b211c;
    margin-bottom: 8px;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"],
.checkout-form textarea {
    width: 100%;

    padding: 11px 12px;
    margin-bottom: 20px;

    border: 1px solid #c7b3a3;
    border-radius: 8px;

    background-color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 15px;

    color: #2b211c;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: #713103;
    box-shadow: 0 0 0 2px rgba(113, 49, 3, 0.10);
}

.checkout-form textarea {
    resize: vertical;
}

/* =========================
   Pickup / Delivery
   ========================= */

.order-method {
    display: flex;
    gap: 15px;

    margin-bottom: 25px;
}

.order-method label {
    flex: 1;

    margin: 0;
    padding: 12px 15px;

    background-color: #ffffff;

    border: 2px solid #d8c5b3;
    border-radius: 10px;

    font-weight: normal;

    cursor: pointer;
}

.order-method label:hover {
    border-color: #713103;
}

.order-method input {
    margin-right: 6px;
}

/* =========================
   Place Order
   ========================= */

.place-order-button {
    width: 100%;

    margin-top: 10px;
    padding: 14px;

    border: none;
    border-radius: 10px;

    background-color: #713103;
    color: #ffffff;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.place-order-button:hover {
    background-color: #5d2802;
    transform: translateY(-2px);
}

/* Back to Cart */

.back-to-cart {
    display: block;

    margin-top: 15px;

    color: #000000;
    text-decoration: underline;

    font-size: 14px;
}

.back-to-cart:hover {
    opacity: 0.7;
}

/* =========================
   Checkout Mobile
   ========================= */

@media (max-width: 750px) {

    .checkout-page {
        padding: 35px 20px 50px;
    }

    .checkout-page h1 {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .checkout-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .checkout-order,
    .checkout-form {
        padding: 22px;
    }

    .order-method {
        flex-direction: column;
        gap: 10px;
    }
}

.back-to-cart {
    display: block;
    margin-top: 15px;
    color: #000000;
    text-decoration: underline;
    font-size: 14px;
}

/* =========================
   ORDER CONFIRMATION
   ========================= */

.confirmation-container {
    background-color: #F5E6D3;
    min-height: 700px;
    padding: 40px 30px;
}

.confirmation-container h1 {
    text-align: center;
    font-size: 36px;
    color: #ffffff;
    text-decoration: underline;
    margin-bottom: 20px;
}

.confirmation-message {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.confirmation-message p {
    font-size: 17px;
    margin-bottom: 10px;
}

.confirmation-order {
    max-width: 800px;
    margin: 0 auto 30px;
    background-color: #ffffff;
    padding: 30px;
}

.confirmation-order h2 {
    font-size: 20px;
    margin-bottom: 25px;
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #dddddd;
}

.confirmation-total {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    font-size: 20px;
}

.confirmation-details {
    max-width: 800px;
    margin: 0 auto 30px;
    background-color: #ffffff;
    padding: 30px;
    text-align: left;
}

.confirmation-details h2 {
    font-size: 20px;
    margin-bottom: 25px;
}

.confirmation-details p {
    font-size: 15px;
    margin-bottom: 12px;
}

.confirmation-button {
    display: block;
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    padding: 14px;
    background-color: #713103;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.confirmation-button:hover {
    opacity: 0.8;
}

/* =========================
   Admin Login
   ========================= */

.admin-login-page {
    background-color: #F5E6D3;
    min-height: 700px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
}

.admin-login-container {
    width: 100%;
    max-width: 450px;
    background-color: #fffaf3;
    padding: 40px;
}

.admin-login-container h1 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 30px;
    color: #713103;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
}

.admin-login-form label {
    font-weight: bold;
    margin-bottom: 8px;
}

.admin-login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #999999;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.admin-login-button {
    padding: 14px;
    border: none;
    background-color: #713103;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.admin-login-button:hover {
    opacity: 0.8;
}

.admin-login-error {
    background-color: #f8d7da;
    color: #842029;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.admin-login-back {
    display: block;
    margin-top: 20px;
    color: #000000;
    text-align: center;
    text-decoration: underline;
    font-size: 14px;
}

.admin-login-back:hover {
    opacity: 0.7;
}


/* =========================
   Responsive Header + About Me
   ========================= */

@media (max-width: 600px) {
    /* Stack the header sections so they fit smaller screens */
    .header-container {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 10px;
        padding: 10px 16px 12px;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    .logo img {
        width: 140px;
        max-width: 100%;
        height: auto;
        max-height: 70px;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .header-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 38px;
        min-height: 38px;
        padding: 8px 10px;
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 9px;
        font-weight: bold;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 24px;
    }

    .main-nav a {
        display: inline-block;
        padding: 4px 0;
        font-size: 15px;
    }

    /* About page: one column instead of the desktop two-column grid */
    .about-page {
        min-height: 0;
        padding: 24px 14px 36px;
    }

    .about-content {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 20px 16px;
        border-radius: 15px;
    }

    /* Keep Misty's portrait centered and responsive */
    .about-image {
        width: min(100%, 280px);
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .about-image span {
        display: block;
        width: 100%;
        height: 100%;
    }

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

    .about-text {
        width: 100%;
        min-width: 0;
    }

    .about-text h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 18px;
    }

    .about-text p {
        font-size: 16px;
        line-height: 1.65;
        margin-bottom: 16px;
        overflow-wrap: anywhere;
    }

    .about-contact {
        min-width: 0;
    }

    .about-contact h3 {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .about-contact a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 380px) {
    .main-nav ul {
        gap: 10px 16px;
    }

    .main-nav a {
        font-size: 14px;
    }

    .about-content {
        padding: 16px 12px;
    }

    .about-text h2 {
        font-size: 22px;
    }
}

/* Mobile refinement: keep the desktop header arrangement on one row */
@media (max-width: 600px) {
    .header-container {
        position: relative;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        column-gap: 8px;
        row-gap: 0;
        min-height: 68px;
        padding: 8px 12px;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    .logo img {
        width: clamp(76px, 23vw, 115px);
        max-width: 100%;
        max-height: 54px;
    }

    .main-nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        grid-column: auto;
        grid-row: auto;
        justify-self: auto;
        width: max-content;
        max-width: calc(100% - 150px);
        min-width: 0;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: nowrap;
        gap: clamp(7px, 2.2vw, 13px);
    }

    .main-nav a {
        white-space: nowrap;
        padding: 4px 0;
        font-size: clamp(10px, 3.1vw, 14px);
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .header-actions a {
        min-width: 0;
        min-height: 32px;
        padding: 5px 7px;
        font-size: 13px;
        border-radius: 7px;
    }
}

/* On very narrow phones, allow the links to wrap rather than overflow */
@media (max-width: 350px) {
    .header-container {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        row-gap: 6px;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .main-nav {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 6px 18px;
    }

    .main-nav a {
        font-size: 13px;
    }
}
