@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Chewy&display=swap');

/* CSS Variabelen */
:root {
    --primary-blue: #ADD8E6; /* Light Blue */
    --secondary-pink: #FFC0CB; /* Light Pink */
    --tertiary-white: #FFFFFF;
    --dark-blue: #6A5ACD; /* Slate Blue - for deeper accents */
    --light-grey: #F8F8F8; /* Off-white for subtle backgrounds */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --gradient-bg: linear-gradient(135deg, var(--tertiary-white) 0%, var(--light-grey) 100%);
    --card-bg: var(--tertiary-white);
    --button-bg: var(--primary-blue);
    --button-hover-bg: var(--dark-blue);
    --border-radius-large: 20px;
    --border-radius-small: 10px;
}

/* Reset Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Algemene Body Styling */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background: var(--gradient-bg);
    color: var(--text-dark);
    min-height: 100vh; /* Zorgt dat de footer onderaan blijft */
    display: flex; /* Maakt de body een flex-container */
    flex-direction: column; /* Stapelt inhoud verticaal */
}

/* Zorgt dat de main content de beschikbare ruimte inneemt */
main {
    flex-grow: 1; /* Hiermee duwt de main de footer naar beneden */
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-blue); /* Nav bar in light blue */
    padding: 1rem 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-family: 'Chewy', cursive;
    font-size: 2.5rem;
    color: var(--tertiary-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--tertiary-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-small);
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--dark-blue); /* Hover in darker blue */
    color: var(--tertiary-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-btn {
    background-color: var(--dark-blue);
    color: var(--tertiary-white);
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.admin-btn:hover {
    background-color: var(--secondary-pink); /* Hover in light pink */
    transform: scale(1.05);
}

/* Hamburger menu styling */
.hamburger {
    display: none; /* Hidden by default for desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 25px; /* Consistent width */
    height: 20px; /* Adjusted height for 3 lines */
    position: relative;
    z-index: 1001; /* Ensure it's above other elements if needed */
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--tertiary-white);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger active state animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Sections */
.hero, .producten-hero, .cart-hero, .previous-orders-hero {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dark);
    background: var(--light-grey);
    margin-bottom: 2rem;
    border-bottom: 5px solid var(--primary-blue);
}

.hero h2, .producten-hero h2, .cart-hero h2, .previous-orders-hero h2 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.hero h1, .producten-hero h1, .cart-hero h1, .previous-orders-hero h1 {
    font-family: 'Chewy', cursive;
    font-size: 4rem;
    color: var(--secondary-pink);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
}

.hero p, .producten-hero p, .cart-hero p, .previous-orders-hero p {
    font-size: 1.2rem;
    color: var(--text-dark);
}

/* Product Card Styling */
.producten-overzicht { /* Sectie voor het productoverzicht */
    padding-bottom: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-grow: 1;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-large);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.product-card img {
    max-width: 100%;
    height: auto; /* Zorg ervoor dat de hoogte automatisch schaalt */
    max-height: 200px; /* Optioneel: maximale hoogte instellen */
    object-fit: contain; /* Zorgt dat de afbeelding past zonder bijsnijden */
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    font-family: 'Chewy', cursive;
}

.product-card p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* --- Knoppen Styling (gecorrigeerd voor index.php) --- */

/* Algemene 'button' klasse voor "Login / Registreer" en "Bekijk alle producten" */
.button {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--tertiary-white);
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none; /* Voor links die eruit zien als knoppen */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

/* Flexbox voor de product-actions om knoppen onder elkaar te plaatsen */
.product-actions {
    display: flex;
    flex-direction: column; /* Plaats knoppen onder elkaar */
    gap: 10px; /* Ruimte tussen de knoppen */
    margin-top: 10px;
}

/* Stijl voor de 'add-to-cart-btn' knop (In winkelmandje) */
.add-to-cart-btn {
    background-color: var(--button-bg); /* Gebruikt de button background variabele */
    color: var(--tertiary-white);
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%; /* Full width voor consistency */
    box-sizing: border-box; /* Zorgt dat padding en border binnen de width vallen */
}

.add-to-cart-btn:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

/* Stijl voor de 'detail-btn' knop (Bekijk details) */
.detail-btn {
    display: inline-block; /* Zodat padding en margin goed werken op een link */
    background-color: var(--dark-blue); /* Gebruik donkerdere kleur voor details */
    color: var(--tertiary-white);
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%; /* Full width voor consistency */
    box-sizing: border-box;
}

.detail-btn:hover {
    background-color: var(--secondary-pink); /* Hover in light pink */
    transform: translateY(-2px);
}

/* --- Einde knoppen styling --- */


/* Shopping Cart Page */
.winkelmand-items {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    flex-grow: 1;
}

#cart-items {
    flex: 2;
    min-width: 300px;
}

.cart-item {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: var(--border-radius-small);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
    margin-right: 1rem;
}

.item-details {
    flex-grow: 1;
}

.item-details h4 {
    font-size: 1.3rem;
    color: var(--dark-blue);
    margin-bottom: 0.3rem;
}

.item-details p {
    color: var(--text-dark);
}

.remove-from-cart-btn {
    background-color: #FF4B5C; /* Red for remove */
    color: var(--tertiary-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.remove-from-cart-btn:hover {
    background-color: #d13a48;
}

#empty-cart-message {
    text-align: center;
    font-size: 1.5rem;
    color: var(--dark-blue);
    padding: 2rem;
}

.cart-summary {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--border-radius-large);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-width: 250px;
    align-self: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-summary h3 {
    font-size: 1.8rem;
    color: var(--secondary-pink);
    margin-bottom: 1rem;
    font-family: 'Chewy', cursive;
    text-align: center;
}

.cart-summary p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.checkout-button, .clear-cart-button {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.checkout-button {
    background-color: var(--secondary-pink);
    color: var(--tertiary-white);
}

.checkout-button:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

.clear-cart-button {
    background-color: var(--primary-blue);
    color: var(--tertiary-white);
}

.clear-cart-button:hover {
    background-color: var(--secondary-pink);
    transform: translateY(-2px);
}

/* Previous Orders Section */
.previous-orders-section {
    padding-bottom: 2rem;
}

.previous-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.order-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-large);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.order-card h4 {
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-family: 'Chewy', cursive;
}

.order-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.order-card ul li {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.cancel-order-btn {
    background-color: #FF4B5C;
    color: var(--tertiary-white);
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.cancel-order-btn:hover {
    background-color: #d13a48;
}

/* Footer */
footer {
    background: var(--dark-blue);
    color: var(--tertiary-white);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 1.5rem auto;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-content .logo {
    font-family: 'Chewy', cursive;
    font-size: 2.2rem;
    color: var(--tertiary-white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--tertiary-white);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-blue);
}


/* --- CSS Specifiek voor Mijn Bestellingen pagina (my_orders.php) --- */

.my-orders-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 30px;
    background: var(--tertiary-white);
    border-radius: var(--border-radius-large);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.my-orders-container h1 {
    font-family: 'Chewy', cursive;
    font-size: 3rem;
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.my-orders-container p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.no-items-message {
    color: #777;
    font-style: italic;
    margin-top: 30px;
}

/* Algemene tabel styling */
.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    background-color: var(--tertiary-white);
    border-radius: var(--border-radius-small);
    overflow: hidden; /* Zorgt dat afgeronde hoeken werken */
}

.order-table th,
.order-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.order-table th {
    background-color: var(--primary-blue);
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.order-table tbody tr:last-child td {
    border-bottom: none;
}

.order-table tbody tr:hover {
    background-color: #f5f5f5;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: capitalize;
    color: var(--text-light); /* This is already set to white */
}

/* Status specifieke kleuren */
.status-pending, .status-Pending { background-color: #ffc107; } /* Yellow */
.status-accepted, .status-Accepted, .status-Approved { background-color: #28a745; } /* Green */
.status-shipped { background-color: #007bff; } /* Blue */
.status-cancelled, .status-Cancelled { background-color: #dc3545; } /* Red */


/* --- MEDIA QUERIES SPECIFIEK VOOR DEZE PAGINA (my_orders.php) --- */

/* Voor tablets (typisch tussen 768px en 1024px) */
@media (max-width: 1024px) {
    .my-orders-container {
        padding: 25px;
        margin: 30px auto;
        max-width: 95%; /* Neemt meer breedte in */
    }

    .my-orders-container h1 {
        font-size: 2.5rem;
    }

    .order-table th,
    .order-table td {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Voor telefoons (typisch tot 767px) */
@media (max-width: 767px) {
    .my-orders-container {
        padding: 15px;
        margin: 20px auto;
        max-width: 100%; /* Volle breedte met kleine marges */
        border-radius: 0; /* Geen afgeronde hoeken op hele kleine schermen */
        box-shadow: none; /* Geen schaduw op zeer kleine schermen */
    }

    .my-orders-container h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .my-orders-container p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* Responsive tabel styling voor mobiel */
    .order-table thead {
        display: none; /* Verberg thead op kleine schermen */
    }

    .order-table,
    .order-table tbody,
    .order-table tr,
    .order-table td {
        display: block; /* Maak alle tabel-elementen blok-level */
        width: 100%; /* Zodat ze 100% breedte innemen */
    }

    .order-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: var(--border-radius-small);
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        background-color: var(--tertiary-white);
    }

    .order-table td {
        text-align: right; /* Lijn de inhoud rechts uit */
        padding-left: 50%; /* Ruimte voor de data-label */
        position: relative;
        border: none; /* Geen individuele celranden meer */
        padding-bottom: 8px;
        padding-top: 8px;
    }

    .order-table td::before {
        /* Display the data-label as a pseudo-element */
        content: attr(data-label);
        position: absolute;
        left: 10px; /* Plaats de label links */
        width: calc(50% - 20px); /* Breedte van de label */
        padding-right: 10px;
        font-weight: 600;
        text-align: left;
        color: var(--dark-blue);
    }

    /* Specifieke data-labels voor de cellen (moeten overeenkomen met de data-label attributen in de HTML) */
    .order-table td[data-label="Bestelling ID"]::before { content: "Bestelling ID:"; }
    .order-table td[data-label="Datum"]::before { content: "Datum:"; }
    .order-table td[data-label="Producten"]::before { content: "Producten:"; }
    .order-table td[data-label="Totaalbedrag"]::before { content: "Totaalbedrag:"; }
    .order-table td[data-label="Status"]::before { content: "Status:"; }

    .order-table .status-badge {
        float: none;
        display: block;
        margin: 5px 0 0 auto;
        text-align: center;
    }
}

/* Voor zeer kleine schermen (telefoons, max-width: 480px) */
@media (max-width: 480px) {
    .my-orders-container h1 {
        font-size: 1.8rem;
    }

    .my-orders-container p {
        font-size: 0.9rem;
    }

    .order-table td {
        font-size: 0.9rem;
    }

    .order-table td::before {
        font-size: 0.85rem;
    }
}

/* Responsive Design (algemeen, al aanwezig in je code) */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 1rem 1rem;
    }

    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
        position: absolute; /* Position it below the navbar */
        top: 60px; /* Adjust based on your navbar height */
        left: 0;
        background-color: var(--primary-blue); /* Same background as navbar */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: 1rem;
    }

    .nav-links.active {
        display: flex; /* Show when active class is added by JS */
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    .admin-btn {
        margin-left: auto; /* Push admin button to the right if needed */
    }

    .hero h1, .producten-hero h1, .cart-hero h1, .previous-orders-hero h1 {
        font-size: 3rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        margin-top: 1rem;
    }

    /* Product card buttons stacking on small screens */
    .product-card button {
        margin-bottom: 10px; /* Space between stacked buttons */
    }
    .product-card button:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        font-size: 2rem;
    }

    .hero h1, .producten-hero h1, .cart-hero h1, .previous-orders-hero h1 {
        font-size: 2.5rem;
    }

    .product-card h3 {
        font-size: 1.5rem;
    }

    .winkelmand-items {
        flex-direction: column;
        align-items: center;
    }

    #cart-items, .cart-summary {
        width: 90%;
    }
}
