/* =========================================================
   GLOBAL RESET & BASE STYLES
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    background: #f5f5f5;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding-top: 20px;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    background: #2e7d32;
    color: white;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}


/* ==========================
ADMIN HEADER
========================== */

.admin-header {
    background: #1b5e20;
    color: white;
    padding: 15px 0;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
}

.admin-header .logo a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.admin-header .logo a:visited {
    color: #ffffff;
}

.admin-header .logo a:hover {
    color: #e8f5e9;
    text-decoration: none;
}

.admin-header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.admin-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.admin-header nav a:hover {
    color: #ffcc80;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../images/hero.jpg') center/cover no-repeat;
    color: white;
    padding: 120px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero p {
    margin-bottom: 15px;
    font-size: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   GENERAL BUTTON
   ========================================================= */

.btn {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e68900;
}


/* =========================================================
   FEATURES
   ========================================================= */

.features {
    padding: 60px 0;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* =========================================================
   SHOP / PRODUCTS
   ========================================================= */

.products {
    padding: 50px 0;
}

.shop-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.shop-header h2 {
    color: #173f2a;
    font-size: 34px;
    line-height: 1.15;
}

.shop-header p {
    color: #5f6f64;
    font-weight: 700;
}

.shop-eyebrow {
    display: block;
    color: #ff9800;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.products h2 {
    margin-bottom: 0;
}

.shop-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(170px, 220px) auto auto;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
}

.shop-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dfe5e8;
    border-radius: 12px;
    background: #fff;
    color: #26352a;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}

.clear-filter,
.details-btn,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2e7d32;
    text-decoration: none;
    font-weight: 700;
}

.clear-filter {
    padding: 12px 4px;
}

.category-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #dbe7d7;
    border-radius: 999px;
    background: #fff;
    color: #24452c;
    text-decoration: none;
    font-weight: 700;
}

.category-chip span {
    min-width: 26px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #1b5e20;
    text-align: center;
    font-size: 12px;
}

.category-chip.active,
.category-chip:hover {
    background: #1b5e20;
    color: #fff;
    border-color: #1b5e20;
}

.category-chip.active span,
.category-chip:hover span {
    background: #fff;
    color: #1b5e20;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    margin-bottom: 14px;
    padding: 14px;
    background: #f8faf8;
    border: 1px solid #eef3ec;
    border-radius: 8px;
    overflow: hidden;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.product-category {
    color: #6b776d;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-card h4 {
    margin: 10px 0;
}

.product-card h4 a {
    color: #173f2a;
    text-decoration: none;
}

.product-card h4 a:hover {
    color: #2e7d32;
}

.product-description {
    color: #5f6f64;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 63px;
}

.stock-row {
    margin-bottom: 12px;
}

.price {
    color: #2e7d32;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.details-btn {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid #cfe3d0;
    border-radius: 5px;
    background: #f8fbf8;
}

.details-btn:hover,
.back-link:hover,
.clear-filter:hover {
    color: #1b5e20;
}

.add-cart {
    background: #ff9800;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.add-cart:hover {
    background: #f57c00;
}

.category-title {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 15px;
    color: #2e7d32;
    border-left: 6px solid #ff9800;
    padding-left: 12px;
    font-weight: 600;
}

.empty-shop {
    background: #fff;
    border: 1px solid #e3eadf;
    border-radius: 8px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .06);
}

.empty-shop h3 {
    color: #173f2a;
    margin-bottom: 8px;
}

.product-detail-section {
    padding: 50px 0;
}

.back-link {
    margin-bottom: 20px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    gap: 36px;
    align-items: start;
    background: #fff;
    border: 1px solid #e3eadf;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(20, 46, 28, 0.07);
}

.product-detail-image {
    background: #f8faf8;
    border-radius: 8px;
    padding: 20px;
}

.product-detail-image img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.product-detail-content h2 {
    color: #173f2a;
    font-size: 34px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.detail-price {
    color: #2e7d32;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 14px;
}

.product-detail-description {
    margin: 24px 0;
}

.product-detail-description h3 {
    color: #173f2a;
    margin-bottom: 8px;
}

.product-detail-description p {
    color: #4d5d51;
    line-height: 1.7;
}

.detail-actions {
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .shop-toolbar {
        grid-template-columns: 1fr 1fr;
    }
    .shop-toolbar .search-input {
        grid-column: 1 / -1;
    }
    .product-detail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .shop-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .shop-toolbar {
        grid-template-columns: 1fr;
    }
    .product-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .details-btn,
    .add-cart,
    .out-stock-btn {
        width: 100%;
    }
    .product-detail {
        padding: 18px;
    }
    .product-detail-content h2 {
        font-size: 28px;
    }
}


/* =========================================================
   CART
   ========================================================= */

.cart-section {
    padding: 50px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.cart-table th {
    background: #2e7d32;
    color: white;
}

#cart-total {
    margin-top: 20px;
    font-size: 22px;
    color: #2e7d32;
}


/* =========================================================
   CHECKOUT
   ========================================================= */

.checkout-section {
    padding: 50px 0;
}

.checkout-section .container {
    max-width: 760px;
}

.checkout-section h2 {
    color: #173f2a;
    margin-bottom: 20px;
}

.payment-info {
    background: #fff3cd;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
}

.checkout-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.checkout-form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.checkout-form textarea {
    height: 80px;
    resize: none;
}

.checkout-form button {
    margin-top: 20px;
    width: 100%;
}


/* =========================================================
   ADMIN LOGIN
   ========================================================= */

.login-section {
    background: url('../images/hero.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2e7d32;
}

.login-container label {
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0 18px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.login-container button:hover {
    background: #1b5e20;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}


/* =========================================================
   ADMIN ORDERS PAGE
   ========================================================= */

.admin-orders {
    padding: 60px 0;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-top h2 {
    color: #2e7d32;
    font-size: 28px;
    margin: 0;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2e7d32;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

.admin-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
}

.order-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.order-card h3 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.order-meta {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

.admin-table th {
    background: #2e7d32;
    color: white;
    padding: 14px;
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:hover {
    background: #f8faf8;
}

.admin-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.admin-table th {
    background: #2e7d32;
    color: white;
}

.order-total {
    background: #f1f8e9;
    font-weight: bold;
}

.no-orders {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-top: 40px;
}


/* =========================================================
   ADMIN AUTH (LOGIN / CHANGE PASSWORD)
   ========================================================= */

.admin-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: #f4f6f8;
    padding: 20px;
}

.auth-card {
    background: #fff;
    padding: 35px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 20px;
    color: #2e7d32;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.auth-card input:focus {
    outline: none;
    border-color: #2e7d32;
}

.full-btn {
    width: 100%;
    margin-top: 10px;
}

.auth-message {
    margin-bottom: 15px;
    font-weight: bold;
    color: #2e7d32;
}

.back-link {
    display: block;
    margin-top: 15px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #2e7d32;
}


/* =========================================================
   ORDER STATUS BADGES
   ========================================================= */

.status,
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.status-pending {
    background: #f57c00;
}

.status-paid {
    background: #1976d2;
}

.status-delivered {
    background: #2e7d32;
}


/* =========================================================
   ACTION BUTTONS (ORDER MANAGEMENT)
   ========================================================= */

.action-btn {
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 13px;
    font-weight: bold;
    display: inline-block;
    margin: 2px;
}

.btn-paid,
.paid-btn {
    background: #1976d2;
}

.btn-delivered,
.delivered-btn {
    background: #2e7d32;
}

.btn-delete,
.delete-btn {
    background: #c62828;
}

.action-btn:hover,
.paid-btn:hover,
.delivered-btn:hover,
.delete-btn:hover {
    opacity: 0.9;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.paid-btn,
.delivered-btn,
.delete-btn {
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: bold;
}


/* =========================================================
   ADD PRODUCT FORM
   ========================================================= */

.product-form-card {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-form-card h2 {
    margin-bottom: 25px;
    color: #2e7d32;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.save-btn {
    background: #2e7d32;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.save-btn:hover {
    background: #1b5e20;
}


/* =========================================================
   ADMIN DASHBOARD
   ========================================================= */

.admin-dashboard {
    background: #f3f6f1;
    min-height: 80vh;
    padding: 24px;
}

.admin-shell {
    width: min(1400px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 160px);
    background: #173f2a;
    color: #fff;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 12px 30px rgba(23, 63, 42, 0.16);
}

.sidebar-brand {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-kicker,
.dashboard-eyebrow {
    display: block;
    color: #ffb74d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.sidebar-brand h2 {
    font-size: 24px;
    line-height: 1.2;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a,
.sidebar-logout {
    display: flex;
    align-items: center;
    color: #eef7f0;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #ffffff;
    color: #1b5e20;
}

.sidebar-logout {
    margin-top: auto;
    background: #c62828;
    color: #fff;
    justify-content: center;
}

.sidebar-logout:hover {
    background: #8e0000;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    color: #173f2a;
    font-size: 30px;
    line-height: 1.2;
}

.dashboard-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff9800;
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-action:hover {
    background: #e68900;
}

.revenue-card {
    background: #ffffff;
    border-left: 6px solid #2e7d32;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(20, 46, 28, 0.08);
}

.revenue-card p {
    color: #5f6f64;
    font-weight: 700;
    margin-bottom: 8px;
}

.revenue-card h3 {
    color: #173f2a;
    font-size: 34px;
    line-height: 1.1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    text-align: left;
    border: 1px solid #e3eadf;
    box-shadow: 0 6px 18px rgba(20, 46, 28, 0.06);
}

.stat-card:hover {
    transform: none;
}

.stat-card h3 {
    font-size: 24px;
    color: #173f2a;
    margin-bottom: 0;
    line-height: 1.15;
}

.stat-card p {
    color: #6c786d;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 20px;
}

.dashboard-panel {
    min-width: 0;
    background: #fff;
    border: 1px solid #e3eadf;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(20, 46, 28, 0.07);
}

.chart-panel {
    grid-row: span 2;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-header h3 {
    color: #173f2a;
    font-size: 20px;
    line-height: 1.2;
}

.chart-panel canvas {
    width: 100% !important;
    min-height: 360px;
}

.compact-table {
    margin-top: 0;
    box-shadow: none;
    border: 1px solid #edf1eb;
    border-radius: 8px;
}

.compact-table th {
    padding: 12px;
    background: #2e7d32;
    font-size: 14px;
}

.compact-table td {
    padding: 12px;
    border-left: 0;
    border-right: 0;
    text-align: left;
}

.compact-table td:last-child,
.compact-table th:last-child {
    text-align: right;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.admin-link {
    background: #2e7d32;
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.admin-link:hover {
    background: #1b5e20;
    transform: translateY(-3px);
}

.logout-link {
    background: #c62828;
}

.logout-link:hover {
    background: #8e0000;
}

@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
        min-height: auto;
    }
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .chart-panel {
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    .admin-dashboard {
        padding: 16px;
    }
    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .dashboard-action {
        width: 100%;
    }
    .sidebar-nav,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .revenue-card h3 {
        font-size: 28px;
    }
}


/* =========================================================
   add product
   ========================================================= */

.add-product-card {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
}

.add-product-card h2 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.add-product-card input,
.add-product-card textarea,
.add-product-card select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.add-product-card textarea {
    min-height: 100px;
}

.save-btn {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.save-btn:hover {
    background: #1b5e20;
}


/* =====================
 Product Action Buttons 
 ======================*/

.edit-btn,
.delete-btn,
.toggle-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    margin: 2px;
}

.edit-btn {
    background: #1976d2;
}

.edit-btn:hover {
    background: #0d47a1;
}

.delete-btn {
    background: #d32f2f;
}

.delete-btn:hover {
    background: #b71c1c;
}

.toggle-btn {
    background: #f57c00;
}

.toggle-btn:hover {
    background: #e65100;
}


/*============
manage products save button
=============*/

.save-btn {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.save-btn:hover {
    background: #1b5e20;
}


/* ==========
stock display and search
========== */

.low-stock {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid #ffcdd2;
}


/* Admin action group for top-right buttons */

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* ============
Search form styles 
===================*/

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 30px;
    max-width: 700px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #dfe5e8;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    transition: .3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}

.search-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, .12);
}

.search-btn {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.search-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
}


/* ===============
Inventory Status 
==================*/

.in-stock {
    display: inline-block;
    padding: 6px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #81c784;
}

.low-stock {
    display: inline-block;
    padding: 6px 12px;
    background: #fff3e0;
    color: #ef6c00;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #ffb74d;
}

.out-stock {
    display: inline-block;
    padding: 6px 12px;
    background: #ffebee;
    color: #c62828;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #ef9a9a;
}


/* ============================
low stock highlight in product list
============================ */

.out-stock-btn {
    background: #ccc;
    color: #666;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: not-allowed;
}


/* ============================
order status badges
============================= */

.status-processing {
    background: #2196f3;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
}

.status-cancelled {
    background: #d32f2f;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
}

.processing-btn {
    background: #2196f3;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.processing-btn:hover {
    background: #1565c0;
}


/* ============================
Invoice print button
============================= */

@media print {
    .print-controls {
        display: none;
    }
    body {
        background: #fff;
    }
    .invoice {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
    }
}

.print-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.dashboard-btn {
    text-decoration: none;
}


/* ============================
Invoice header styles
============================ */

.invoice-header {
    text-align: center;
    margin-bottom: 25px;
}

.invoice-header h1 {
    color: #2e7d32;
    margin-bottom: 5px;
}

.invoice-header p {
    color: #666;
}


/* ============================
Order timeline
============================ */

.order-timeline {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    border-radius: 8px;
}

.order-timeline h3 {
    margin: 0 0 14px;
    color: #1f3d2b;
    font-size: 18px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 0 0 22px;
    position: relative;
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 30px;
    bottom: 4px;
    width: 2px;
    background: #d1d5db;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-marker {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.timeline-pending .timeline-marker {
    color: #ca8a04;
}

.timeline-processing .timeline-marker {
    color: #2563eb;
}

.timeline-delivered .timeline-marker {
    color: #16a34a;
}

.timeline-cancelled .timeline-marker {
    color: #dc2626;
}

.timeline-item strong {
    display: block;
    color: #1f2937;
    margin-bottom: 3px;
}

.timeline-item p {
    margin: 0 0 3px;
    color: #374151;
    font-size: 14px;
}

.timeline-item span {
    color: #6b7280;
    font-size: 14px;
}

.timeline-row td {
    background: #fff;
}

.timeline-row:hover {
    background: transparent;
}

.timeline-row .order-timeline {
    margin: 8px 0 18px;
}


/* =========================================================
   RESPONSIVE LAYOUT
   ========================================================= */

img,
canvas,
input,
select,
textarea,
button {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

@media (max-width: 640px) {
    .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    header .container,
    .admin-header-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
    .logo {
        font-size: 21px;
    }
    nav,
    nav ul {
        width: 100%;
    }
    nav ul {
        flex-wrap: wrap;
        gap: 8px 16px;
    }
    nav a {
        display: inline-block;
        padding: 4px 0;
    }
    .hero {
        min-height: 0;
        padding: 72px 16px;
    }
    .hero h2 {
        font-size: 32px;
        line-height: 1.15;
    }
    .hero p {
        font-size: 16px;
        line-height: 1.55;
    }
    .features,
    .products,
    .product-detail-section,
    .cart-section,
    .checkout-section,
    .admin-orders {
        padding-top: 32px;
        padding-bottom: 32px;
    }
    .features .container,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .product-image-link {
        height: 220px;
    }
    .empty-shop,
    .checkout-form,
    .login-container,
    .auth-card,
    .product-form-card,
    .add-product-card,
    .order-card {
        padding: 20px 16px;
    }
    .product-detail-image {
        padding: 12px;
    }
    .cart-table,
    .admin-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    .cart-table th,
    .cart-table td,
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    .admin-dashboard {
        padding: 16px 0;
    }
    .admin-sidebar {
        padding: 18px 16px;
    }
    .dashboard-panel {
        padding: 16px;
    }
    .chart-panel canvas {
        min-height: 260px;
    }
    .search-form,
    .admin-actions,
    .order-header,
    .print-controls {
        align-items: stretch;
        flex-direction: column;
    }
    .search-form,
    .search-form input,
    .search-form select,
    .search-form button,
    .admin-actions>*,
    .print-controls>* {
        width: 100%;
    }
    .admin-top {
        align-items: stretch;
        flex-direction: column;
    }
    .admin-btn,
    .admin-link,
    .save-btn,
    .btn {
        text-align: center;
    }
}