/* Main CSS file for Servo website */

/* General Styles */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #ffc107;
    --white-color: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --font-family: 'Cairo', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--white-color);
    color: var(--dark-gray);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    font-family: var(--font-family);
}

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

/* Header Styles */
.site-header {
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.cart-icon a {
    position: relative;
    font-size: 24px;
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--secondary-color);
    color: var(--dark-gray);
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Main Content Styles */
.site-main {
    min-height: calc(100vh - 150px);
    padding: 30px 0;
}

/* Footer Styles */
.site-footer {
    background-color: var(--light-gray);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 20px;
    color: var(--primary-color);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Home Page Styles */
.city-selection {
    text-align: center;
    margin-bottom: 40px;
}

.city-selection h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.city-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.city-btn {
    padding: 12px 25px;
    background-color: var(--light-gray);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.city-btn:hover, .city-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.branches-container {
    margin-top: 40px;
}

.branches-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.branch-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.branch-card:hover {
    transform: translateY(-5px);
}

.branch-header {
    padding: 15px;
    background-color: var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.branch-header h3 {
    margin: 0;
    color: var(--dark-gray);
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status.open {
    background-color: #4CAF50;
    color: white;
}

.status.closed {
    background-color: #F44336;
    color: white;
}

.branch-details {
    padding: 15px;
}

.branch-details p {
    margin-bottom: 10px;
}

.branch-details i {
    margin-left: 5px;
    color: var(--primary-color);
}

.branch-social {
    margin: 15px 0;
}

.branch-social a {
    display: inline-block;
    margin-left: 15px;
    font-size: 18px;
}

.menu-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.menu-btn:hover {
    background-color: #b71c1c;
    color: var(--white-color);
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--dark-gray);
}

.no-branches {
    text-align: center;
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

/* Menu Page Styles */
.menu-container {
    margin-bottom: 40px;
}

.menu-header {
    margin-bottom: 30px;
    text-align: center;
}

.branch-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.branch-info h2 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.branch-logo {
    height: 60px;
}

.menu-categories {
    margin-bottom: 30px;
}

.category-tabs {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.category-tabs li {
    margin-left: 15px;
    white-space: nowrap;
}

.category-tabs li a {
    display: block;
    padding: 10px 15px;
    color: var(--dark-gray);
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s;
}

.category-tabs li.active a {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.product-category {
    display: none;
}

.product-category.active {
    display: block;
}

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

.product-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 180px;
    overflow: hidden;
}

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

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.product-price {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    height: 40px;
    overflow: hidden;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #b71c1c;
}

.quantity-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: var(--light-gray);
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity {
    font-weight: bold;
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: var(--white-color);
    margin: 10% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-gray);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-product-image {
    height: 250px;
    overflow: hidden;
}

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

.modal-product-info {
    padding: 20px;
}

.modal-product-price {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.modal-product-description {
    margin-bottom: 20px;
}

.modal-quantity-control {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.modal-quantity-control .quantity-btn {
    width: 40px;
    height: 40px;
    margin: 0 15px;
}

/* Cart Page Styles */
.cart-container {
    max-width: 800px;
    margin: 0 auto;
}

.cart-container h1 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

.empty-cart {
    text-align: center;
    padding: 50px 0;
}

.empty-cart i {
    font-size: 60px;
    color: var(--light-gray);
    margin-bottom: 20px;
}

.empty-cart p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #666;
}

.continue-shopping {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 5px;
    font-weight: bold;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 5px;
    margin-left: 15px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    margin-bottom: 5px;
}

.item-price {
    color: #666;
}

.item-quantity {
    display: flex;
    align-items: center;
    margin: 0 20px;
}

.item-quantity .quantity-btn {
    margin: 0 10px;
}

.item-total {
    font-weight: bold;
    margin-left: 20px;
    min-width: 80px;
    text-align: left;
}

.item-remove button {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.item-remove button:hover {
    color: var(--primary-color);
}

.cart-summary {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #b71c1c;
}

/* Checkout Page Styles */
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
}

.checkout-container h1 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: calc(-50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background-color: var(--light-gray);
    z-index: 1;
}

.step.active:not(:last-child)::after {
    background-color: var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--light-gray);
    color: #666;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.step-text {
    font-size: 14px;
    color: #666;
}

.step.active .step-text {
    color: var(--primary-color);
    font-weight: bold;
}

.checkout-section {
    display: none;
    margin-bottom: 30px;
}

.checkout-section.active {
    display: block;
}

.checkout-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.delivery-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.delivery-option {
    flex: 1;
    min-width: 200px;
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.delivery-option input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.delivery-option label i {
    font-size: 30px;
    margin-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-family);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.back-btn,
.next-btn,
.complete-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.back-btn {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.next-btn,
.complete-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.back-btn:hover {
    background-color: #ddd;
}

.next-btn:hover,
.complete-btn:hover {
    background-color: #b71c1c;
}

.order-summary {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.delivery-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.delivery-info p {
    margin-bottom: 10px;
}
