body {
    background-color: #6d7080;
    color: #f5f5dc;
    font-family: 'Almendra Display', cursive;
    margin: 0;
    padding: 0;
    text-align: center;

    /* Sticky footer setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html {
    height: 100%;
}

/* === NAV (same as site) === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #6d7080;
    height: 4rem;              /* lock consistent nav height */
    display: flex;
    align-items: center;       /* vertical alignment for contact */
    padding: 0 2rem;
    justify-content: space-between;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

.nav-right {
    margin-left: auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

nav a {
    font-size: 1.5rem;
    color: #f5f5dc;
    text-decoration: none;
}

.nav-center-link {
    font-size: 2rem;
    color: #f5f5dc;
    text-decoration: none;
    padding: 2rem;
}

nav a:hover {
    text-decoration: none;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-bug {
    height: 3rem;
    width: auto;
    margin-right: 1.5rem;
}

.logo-word {
    height: 9rem;
    width: auto;
}

/* === CART MAIN === */
main {
    flex: 1; /* expands to push footer down */
    padding: 6rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* Cart table */
#cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #5c5f6e;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
#cart-table th, #cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #f5f5dc55;
    vertical-align: middle;
}
#cart-table th {
    background: #4f5160;
    font-size: 1.3rem;
    color: #f5f5dc;
}
#cart-table th:first-child { border-top-left-radius: 8px; }
#cart-table th:last-child { border-top-right-radius: 8px; }

#cart-table tr:hover td { background-color: #66687a; }

#cart-table img {
    border-radius: 4px;
    border: 1px solid #f5f5dc;
    width: 60px;
}

/* Qty controls */
.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    font-family: 'Almendra Display', cursive;
    font-size: 1rem;
    border: 1px solid #f5f5dc;
    background: #6d7080;
    color: #f5f5dc;
    border-radius: 4px;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.qty-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #5c5f6e;
    border: 1px solid #f5f5dc;
    color: #f5f5dc;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    font-family: 'Almendra Display', cursive;
    transition: all 0.2s ease;
}
.qty-btn:hover {
    background-color: #f5f5dc;
    color: #6d7080;
}

#cart-total {
    font-size: 1.4rem;
    margin: 1.5rem 0;
}

.cart-actions { margin-top: 1rem; }
.btn-link {
    display: inline-block;
    padding: 0.7rem 1.3rem;
    margin: 0.5rem;
    background-color: #5c5f6e;
    color: #f5f5dc;
    border-radius: 4px;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
}
.btn-link:hover { background: #fff8dc; }

.remove-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.remove-btn:hover {
    transform: scale(1.2);
    color: #ff7a7a;
}

/* === FOOTER === */
footer {
    background-color: #5c5f6e; /* darker shade for separation */
    padding: 2rem 3rem;
    color: #f5f5dc;
    font-family: 'Almendra Display', cursive;
    margin-top: auto; /* sticky footer */
}

/* Top section layout */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* Left side (logo + links) */
.footer-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Links group */
.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
}

.footer-links a {
    color: #f5f5dc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #fff8dc;
}

/* Email signup side by side */
.footer-email {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.footer-email label {
    font-size: 1rem;
    white-space: nowrap;
    margin-top: 0.8rem;
}

.footer-email input[type="email"] {
    padding: 10px;
    font-family: 'Almendra Display', cursive;
    font-size: 1rem;
    background-color: #6d7080;
    border: 1px solid #f5f5dc;
    color: #f5f5dc;
    text-align: center;
    width: 250px;
    max-width: 100%;
}

/* Bottom row */
.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid #f5f5dc33;
    padding-top: 1rem;
}

/* === Footer Logo === */
.footer-logo img {
    height: 40px;
    width: auto;
}

input[type="email"] {
    padding: 10px;
    font-family: 'Almendra Display', cursive;
    font-size: 1rem;
    background-color: #6d7080;
    border: 1px solid #f5f5dc;
    color: #f5f5dc;
    text-align: center;
    width: 90%;
    max-width: 400px;
    margin-top: 15px;
}

a {
    color: #f5f5dc;
    text-decoration: none;
    font-family: 'Almendra Display', cursive;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    color: #fff8dc;
}

/* Placeholder color fix */
input[type="email"]::placeholder {
    color: #f5f5dc;
    opacity: 1;
}

/* === RESPONSIVE DESIGN === */

/* Tablets (<= 1024px) */
@media (max-width: 1024px) {
    nav {
        padding: 0 1rem;
    }

    .nav-center {
        gap: 1.2rem;
    }

    .nav-center-link {
        font-size: 1.6rem;
        padding: 1rem;
    }

    main {
        padding: 5rem 1.5rem 3rem;
    }

    #cart-table th, #cart-table td {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .footer-left,
    .footer-email {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Phones (<= 768px) */
@media (max-width: 768px) {
    /* === NAV === */
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
        padding: 0.4rem 0.8rem;
    }

    .logo-word { display: none; }
    .logo-bug { height: 2rem; margin-right: 0; }

    .nav-center {
        position: static;
        transform: none;
        flex: 2;
        justify-content: center;
        gap: 0.6rem;
    }

    nav a, .nav-center-link {
        font-size: 0.95rem;
        padding: 0.2rem 0.4rem;
    }

    /* === MAIN === */
    main {
        padding: 5rem 1rem 3rem;
        max-width: 100%;
    }

    h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    /* === CART === */
    #cart-table,
    #cart-table thead,
    #cart-table tbody,
    #cart-table tr,
    #cart-table th,
    #cart-table td {
        display: block;
        width: 100%;
    }

    #cart-table { border: none; background: none; }
    #cart-table thead { display: none; }

    #cart-table tr {
        display: flex;
        flex-direction: row;         /* horizontal card */
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
        background: #5c5f6e;
        border: 1px solid #f5f5dc55;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 0.6rem;
        overflow: hidden;   /* prevent cut-off */
    }

    #cart-table td {
        border: none;
        padding: 0.2rem;
        font-size: 0.9rem;
        min-width: 0;       /* allow shrinking instead of overflow */
    }

    /* Product image */
    #cart-table td img {
        width: 55px;
        height: auto;
        border: 1px solid #f5f5dc;
        border-radius: 4px;
        flex-shrink: 0;
    }

    /* Hide product name/title column */
    #cart-table td[data-label="Print"] {
        display: none;
    }

    /* Price */
    #cart-table td[data-label="Price"] {
        font-size: 0.85rem;
        font-weight: bold;
        white-space: nowrap;
    }

    /* Qty input only (no +/- buttons) */
    .qty-btn { display: none !important; }
    .qty-input {
        width: 40px;
        height: 28px;
        font-size: 0.85rem;
        text-align: center;
    }

    /* Subtotal + remove inline */
    #cart-table td[data-label="Subtotal"] {
        font-size: 0.85rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.3rem;
        white-space: nowrap;
    }

    .remove-btn {
        font-size: 1.3rem;
        color: #ff4d4d;
        margin-left: 0.3rem;
    }

    /* === CART TOTAL + ACTIONS === */
    #cart-total {
        font-size: 1.1rem;
        margin-top: 1rem;
        text-align: center;
    }

    .cart-actions {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
        background-color: #6d7080;
        padding: 1rem;
        border-radius: 8px;
    }

    .cart-actions .btn-link {
        max-width: 260px;       /* fixed width */
        margin: 0 auto;         /* center horizontally */
        font-size: 1rem;
        padding: 0.9rem;
        text-align: center;
        background-color: #5c5f6e;
        color: #f5f5dc;
    }

    /* === FOOTER === */
    .footer-top {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.6rem;
        font-size: 0.95rem;
    }

    .footer-email {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    .footer-email input[type="email"] {
        width: 100%;
        max-width: 320px;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.2rem;
    }
}


