/* Define CSS Variables for Light and Dark Modes */
:root {
    --primary-color: #218838;
    --secondary-color: #ff9d00;
    --accent-color: #003f6a;
    --background-color: #f4f4f4;
    --text-color: #333;
    --button-radius: 5px;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: #006f69;
    --header-text: #ffffff;
    --nav-link: #ffffff;
    --nav-hover-bg: #ffffff;
    --nav-hover-text: #2E3A59;
    --section-title-bg: #006f69;
    --section-title-text: #ffffff;
    --section-text: #006f69;
    --item-bg: rgba(255, 255, 255, 0.322);
    --button-bg: #ff9d00;
    --button-text: white;
    --button-hover-bg: #003f6a;
    --cart-bg: #f4f4f4;
    --footer-bg: #006f69;
    --footer-text: white;
    --social-icon: white;
    --social-icon-hover: #ff9d00;
    --map-border: #ccc;
    --confirm-button-bg: #28a745;
    --confirm-button-hover: #218838;
    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #006f69;
    --scrollbar-thumb-hover: #004c49;
}

body.dark-mode {
    --background-color: #001f3f;
    --text-color: #f5f5f5;
    --header-bg: #001833;
    --header-text: #ff9d00;
    --nav-link: #f5f5f5;
    --nav-hover-bg: #ff9d00;
    --nav-hover-text: #001f3f;
    --section-title-bg: #001833;
    --section-title-text: #ff9d00;
    --section-text: #f5f5f5;
    --item-bg: #003f6a;
    --item-text: #f5f5f5;
    --button-bg: #ff9d00;
    --button-text: #001f3f;
    --button-hover-bg: #e68a00;
    --cart-bg: #003f6a;
    --footer-bg: #001833;
    --footer-text: #ff9d00;
    --social-icon: #ff9d00;
    --social-icon-hover: #f5f5f5;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --map-border: #555;
    --confirm-button-bg: #28a745;
    --confirm-button-hover: #218838;
    --scrollbar-track: #001833;
    --scrollbar-thumb: #ff9d00;
    --scrollbar-thumb-hover: #e68a00;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    margin-left: 20px;
}

.theme-toggle-btn:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: var(--header-bg);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px var(--shadow-color);
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    width: 55px;
    height: 55px;
}

header .logo h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
    color: var(--header-text);
    text-transform: uppercase;
    margin-left: 10px;
}

header h1 {
    color: var(--header-text);
    font-weight: 800;
    font-style: italic;
    font-size: 25px;
}

/* Container */
.container {
    padding: 2rem;
}

/* Checkout Section */
.checkout-section {
    background-color: var(--cart-bg);
    border-radius: 18px;
    box-shadow: 0 4px 10px var(--shadow-color);
    padding: 30px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.checkout-section h2 {
    color: var(--section-title-text);
    font-size: 22px;
    width: 90px;
    padding: 20px;
    margin-bottom: 2rem;
    background-color: var(--section-title-bg);
    border-radius: 18px;
}

#cart-items {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

#total-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.3rem;
}

body.dark-mode #total-price {
    color: var(--secondary-color);
}

/* Form Inputs */
#checkout-form input {
    width: 90%;
    padding: 10px 15px;
    margin: 10px 0;
    border: 2px solid var(--map-border);
    border-radius: 13px;
    font-size: 1em;
    box-sizing: border-box;
    background: var(--item-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

#checkout-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--shadow-color);
}

body.dark-mode #checkout-form input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(255, 157, 0, 0.5);
}

/* Map */
#map {
    border: 2px solid var(--map-border);
    border-radius: 13px;
    width: 90%;
    transition: border-color 0.3s ease;
}

/* Buttons */
#confirm-location, #checkout-form button[type="submit"] {
    width: 90%;
    padding: 12px;
    margin: 15px 0;
    background: var(--confirm-button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 13px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    transition: all 0.3s ease;
}

#confirm-location:hover, #checkout-form button[type="submit"]:hover {
    background: var(--confirm-button-hover);
    transform: scale(1.05);
}

body.dark-mode #confirm-location, body.dark-mode #checkout-form button[type="submit"] {
    background: var(--confirm-button-bg);
}

body.dark-mode #confirm-location:hover, body.dark-mode #checkout-form button[type="submit"]:hover {
    background: var(--confirm-button-hover);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 25px;
    text-align: center;
    margin-top: 50px;
}

footer p {
    font-size: 18px;
    font-weight: 400;
}

/* Social Icons */
.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    text-decoration: none;
    color: var(--social-icon);
    font-size: 30px;
    transition: color 0.5s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--social-icon-hover);
    transform: scale(1.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid var(--scrollbar-track);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}