* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #1a1a1a;          /* Black background */
    --secondary-bg: #2a2a2a;        /* Dark charcoal */
    --accent-bg: #3a3a3a;           /* Medium gray */
    --text-primary: #ffffff;         /* White text */
    --text-secondary: #cccccc;       /* Light gray text */
    --old-gold: #b8860b;            /* Old gold accent */
    --dark-red: #8b0000;            /* Dark red accent */
    --border-color: #444444;        /* Dark border */
    --hover-bg: #333333;            /* Hover state */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

header {
    background-color: var(--secondary-bg);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 100;
}

header.collapsed {
    padding: 15px 30px;
    border-radius: 0;
    margin-bottom: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    transition: all 0.3s ease;
}

.logo {
    max-height: 160px;
    width: auto;
    margin-right: 20px;
    transition: all 0.3s ease;
}

header.collapsed .logo {
    max-height: 40px;
    margin-right: 15px;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header h1 {
    font-family: "Diplomata SC", serif;
    font-weight: 400;
    font-style: normal;
    color: var(--old-gold);
    font-size: 4rem;
    text-transform: none;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

header.collapsed h1 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

header h4 {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    margin: 0;
}

header.collapsed h4 {
    display: none;
}

main {
    margin-right: 320px;
}

.sidebar-container {
    position: absolute;
    right: 0;
    top: 0;
    width: 280px;
    height: 100%;
    min-height: 100vh;
    pointer-events: none;
}

.sidebar-container .order-sidebar {
    pointer-events: auto;
}

.customer-info {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.customer-info h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--old-gold);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    background-color: var(--accent-bg);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--old-gold);
}

.form-group input.invalid {
    border-color: var(--dark-red);
}

.error-message {
    color: var(--dark-red);
    font-size: 14px;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

.field-note {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
    margin-top: 3px;
    display: block;
}

.products-section {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.products-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--old-gold);
    padding-bottom: 10px;
}

.loading {
    padding: 20px;
    text-align: center;
    color: var(--old-gold);
    font-size: 16px;
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.category-section {
    margin-bottom: 30px;
}

.category-header {
    color: var(--old-gold);
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--old-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--accent-bg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border-color: var(--old-gold);
}

.product-image {
    width: 100%;
    height: 150px;
    background-color: var(--secondary-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.price {
    color: var(--old-gold);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.min-qty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #3498db;
    background-color: #fff;
    color: #3498db;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background-color: #3498db;
    color: #fff;
}

.qty-input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.order-sidebar {
    position: fixed;
    bottom: 20px;
    right: max(20px, calc(50% - 700px + 20px));
    width: 280px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 20px;
    z-index: 100;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.order-total {
    margin-bottom: 20px;
}

.order-total h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.delivery-options {
    margin: 15px 0;
}

.radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--old-gold);
}

.radio-option:hover {
    color: var(--text-primary);
}

.total-amount {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    color: var(--dark-red);
    font-weight: bold;
    text-align: center;
    padding: 15px;
    background-color: #d0d0d0;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--old-gold);
    color: var(--primary-bg);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover:not(:disabled) {
    background-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
}

.submit-btn:disabled {
    background-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content {
    color: #2a2a2a;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.modal-content h3 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-content p {
    color: #2a2a2a;
}

.modal-content .totals-section {
    text-align: right;
    margin-top: 15px;
}

.modal-content .totals-section p,
.modal-content .totals-section h3 {
    text-align: right;
}

.order-summary {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.order-summary thead {
    background-color: #f8f9fa;
}

.order-summary th,
.order-summary td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #2a2a2a;
}

.order-summary th {
    font-weight: 600;
    color: #2c3e50;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.modal-buttons button {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#confirmSubmit {
    background-color: #27ae60;
    color: #fff;
}

#confirmSubmit:hover {
    background-color: #229954;
}

#cancelSubmit {
    background-color: #e74c3c;
    color: #fff;
}

#cancelSubmit:hover {
    background-color: #c0392b;
}

/* Special Requests Styling */
.special-request-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--old-gold);
    color: var(--primary-bg);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.special-request-btn:hover {
    background-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
}

.special-request-card {
    border: 2px solid var(--old-gold);
}

.special-request-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.2);
}

#specialRequestForm textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

#specialRequestForm textarea:focus {
    outline: none;
    border-color: var(--old-gold);
}

#submitSpecialRequest {
    background-color: var(--old-gold);
    color: var(--primary-bg);
}

#submitSpecialRequest:hover {
    background-color: #d4af37;
}

#cancelSpecialRequest {
    background-color: #6c757d;
    color: #fff;
}

#cancelSpecialRequest:hover {
    background-color: #5a6268;
}

/* Phone Call Card Styling */
.phone-call-card {
    border: 2px solid var(--old-gold);
}

.phone-call-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.2);
}

.phone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--old-gold);
}

.phone-symbol {
    font-size: 3rem;
    color: var(--primary-bg);
}

.phone-call-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--old-gold);
    color: var(--primary-bg);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    display: block;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.phone-call-btn:hover {
    background-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
    color: var(--primary-bg);
    text-decoration: none;
}

.site-footer {
    background-color: var(--secondary-bg);
    padding: 15px 30px;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.site-footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
    text-align: center;
}

.site-footer a {
    color: var(--old-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #d4af37;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .logo {
        max-height: 70px;
    }

    header h1 {
        font-size: 1.5rem;
        line-height: 100%;
    }

    header h4 {
        display: none;
    }

    main {
        margin-right: 0;
        margin-bottom: 150px;
    }

    .order-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        border-radius: 0;
        display: flex;
        align-items: center;
        padding: 15px;
    }

    .order-total {
        flex: 1;
        margin-bottom: 0;
        margin-right: 15px;
    }

    .order-total h3 {
        display: none;
    }

    .total-amount {
        font-size: 1.5rem;
        padding: 10px;
    }

    .submit-btn {
        width: auto;
        padding: 12px 30px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}