/* ==========================
   CSS VARIABLES (THEME)
========================== */
:root {
    --lr-green: #0f3d2e;
    --lr-green-light: #1f5e45;
    --lr-black: #0b0b0b;
    --lr-grey: #f2f3f4;
    --lr-border: #d6d6d6;
    --lr-accent: #c8aa6e;
}

/* ==========================
   RESET & BASE
========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--lr-grey);
    color: #222;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================
   LAYOUT
========================== */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
}

header {
    background: var(--lr-black);
    color: #fff;
    padding: 1rem;
}

header h1 {
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

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

/* ==========================
   BUTTONS & LINKS
========================== */
button,
.btn {
    background: var(--lr-green);
    color: #fff;
    border: none;
    padding: 0.65rem 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

button:hover,
.btn:hover {
    background: var(--lr-green-light);
}

.btn.secondary {
    background: #444;
}

.btn.secondary:hover {
    background: #222;
}

/* ==========================
   FORMS
========================== */
form {
    max-width: 520px;
    margin: 1.5rem auto;
    background: #fff;
    padding: 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--lr-border);
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.55rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--lr-border);
    border-radius: 4px;
    font-size: 1rem;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--lr-green);
}

/* ==========================
   PRODUCT GRID
========================== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.product-card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid var(--lr-border);
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
}

.product-card .price {
    font-weight: bold;
    margin-top: auto;
    color: var(--lr-green);
}

/* ==========================
   CART & ORDERS
========================== */
.card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--lr-border);
}

.order-status {
    font-weight: bold;
    text-transform: capitalize;
}

.order-status.paid {
    color: #b7791f;
}

.order-status.processing {
    color: #005fcc;
}

.order-status.completed {
    color: var(--lr-green);
}

/* ==========================
   ADMIN
========================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--lr-border);
    text-align: left;
}

.admin-table th {
    background: #e8e8e8;
    color: #111;
}

/* ==========================
   FOOTER
========================== */
footer {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--lr-black);
    color: #aaa;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================
   RESPONSIVE
========================== */
@media (min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header h1 {
        font-size: 1.6rem;
    }
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    nav {
        justify-content: flex-end;
    }
}

/* ==========================
   NAV BAR LAYOUT
========================== */
.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.brand a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

/* ==========================
   NAV TOGGLE (MOBILE)
========================== */
#nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

/* ==========================
   NAV MENU
========================== */
.nav-menu {
    display: block;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a,
.nav-menu span {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.nav-menu a:hover,
.nav-menu span:hover {
    text-decoration: underline;
}

/* ==========================
   DROPDOWN MENU
========================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--lr-black);
    border: 1px solid var(--lr-border);
    min-width: 200px;
    z-index: 1000;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--lr-green);
}

/* Show dropdown on hover (desktop) */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* ==========================
   MOBILE NAV STYLES
========================== */
@media (max-width: 800px) {

    .nav-toggle-label {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--lr-black);
        border-top: 1px solid var(--lr-border);
    }

    /* Checkbox toggle */
    #nav-toggle:checked + .nav-toggle-label + .nav-menu {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }

    .dropdown-menu {
        position: static;
        border: none;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* ==========================
   BASKET ITEMS
========================== */
.basket-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.basket-item-actions {
    margin-top: 0.5rem;
}

.basket-total {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: right;
}
