@font-face {
    font-family: 'Barionette';
    src: url('../fonts/primary/BarionetteScript.otf') format('opentype');
}

:root {
    --primary-font: 'Barionette', sans-serif;
    /* --primary-color: #9c7c5b; */
    --secondary-color: #e8d5b5;
    --dark-color: #3a3226;
    --light-color: #f8f4e9;
    --accent-color: #d4a373;
    --text-color: #333;
    --text-light: #777;
    --white: #fff;
    --black: #000;
    --transition: all 0.3s ease;
}

:root {
    --primary-color: #c26f33;
    /* بني محروق */
    --accent-color: #D4AF37;
    /* ذهبي */
    --backColor: #fff;
    /* لون الخلفية */
    --FontColor: #000;
    /* لون الخط الفرعي */
    --darkback-color: #3f3c3c;
    /* لون الخلفية */
    --darkFontColor: #fff;
    /* لون الخط الفرعي */
}

:root {
    /* --primary-color: #cd8219; */
    --backColor: #fff;
    --FontColor: #000;

    --darkback-color: #3f3c3c;
    --darkbachChild-color: #535151;
    --darkFontColor: #fff;
}



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

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-color);
    direction: ltr;
}

.menu-section {
    padding: 30px 0;
    background-color: var(--white);
    margin-top: 30px;
}



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

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-color);
    direction: ltr;
}

.menu-section {
    padding: 30px 0;
    background-color: var(--white);
    margin-top: 30px;
    color: #000;
}


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

.section-title {
    font-family: var(--primary-font);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    color: var(--dark-color);
    padding-top: 30px;
}

.section-title span {
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

body.dark .menu-section {
    background-color: var(--darkback-color);
    color: #fff;
}

.menu-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 10px;
}

.tab-btn,
.item-info h3 {
    font-family: var(--secondary-font);
}

.tab-btn,
.menu-item button {
    padding: 10px 25px;
    background-color: transparent;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bolder;
}

body.dark .tab-btn,
body.dark .menu-item .cart_add {
    color: var(--darkFontColor);
}

.menu-item button {
    width: 100%;
}

.tab-btn:hover,
.tab-btn.active,
.menu-item .cart_add:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    align-items: stretch;
}


.menu-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}


.menu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}


.account-section .menu-item:hover {
    transform: translateY(10px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}


.item-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.menu-item:hover .item-image img {
    transform: scale(1.1);
}

.price {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 700;
}

.menu-section .item-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.dark-mode .menu-item {
    background-color: #3a3226;
    color: #fff;
}

.dark .item-info p,
.dark .item-info h3 {
    color: var(--darkFontColor);
}

.item-info h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.item-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: auto;
}

.item-info button {
    margin-top: 20px;
}

.favoriteForm {
    position: fixed;
    top: 10px;
    right: 10px;
}

.favoriteForm .fav-btn {
    background: none;
    padding: 0;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    background-color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.favoriteForm .fav-btn:hover {
    background-color: #fff;
}


.favoriteForm .fav-btn.active,
.favoriteForm .fav-btn i.fa-solid {
    color: red;
}

body.dark .section-subtitle {
    color: var(--darkFontColor);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .menu-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 80%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }

    body {
        padding: 10px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 10%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-in-out;
}


.modal-content {
    background-color: var(--light-color);
    border-radius: 15px;
    width: 60%;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: -2% auto;
    padding: 30px;
    height: 100%;
}


.modal {
    transition: width 0.3s ease;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 968px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }
}

@media (max-width: 620px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

body.dark .menu-item {
    background-color: var(--darkbachChild-color);
    color: var(--darkFontColor);
}

.close {
    color: var(--primary-color);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close {
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #ff6b6b;
}

.close:hover {
    color: var(--accent-color);
}

.modal-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: center;
}

.modal-body #modal-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    max-height: 400px;
}

.modal-details {
    padding-left: 25px;
}


.modal-details h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.modal-details p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}


.price del {
    color: #c5c5c5;
}

.modal-price del {
    font-size: 1rem;
    color: #999;
    margin-left: 10px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.modal-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.modal-btn:hover {
    background-color: var(--dark-color);
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


body.dark .modal-content {
    background-color: #333;
    color: #fff;
}

body.dark .modal-details h3 {
    color: #fff;
}

body.dark .modal-details p {
    color: #fff;
}

body.dark .modal-price {
    color: #fff;
}

body.dark .modal-actions {
    color: #fff;
}

body.dark .modal-actions {
    color: #fff;
}

body.dark .fav-btn.active {
    color: #fff;
}

body.dark .close {
    color: #fff;
}

body.dark .close:hover {
    color: #fff;
}

body.dark .modal-actions {
    color: #fff;
}

body.dark .modal-btn {
    color: #fff;
}

/* Review System Styles */
.reviews-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    /* background-color: #f9f9f9; */
    direction: ltr;
    text-align: left;
}

.reviews-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    text-align: left;
}

/* Single Review Item */
.review-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

/* Review Header (User info + Date) */
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* User Profile Image */
.review-user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* User Info Container */
.review-user-info {
    display: flex;
    flex-direction: column;
}

/* User Name */
.review-user-name {
    font-weight: bold;
    color: #333;
    margin-right: auto;
    font-size: 14px;
}

/* Review Date */
.review-date {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    white-space: nowrap;
}

/* Star Rating Display */
.review-rating,
.rating-stars {
    display: flex;
    color: #FFD700;
    /* Gold color for stars */
    margin-bottom: 10px;
    font-size: 16px;
}

.review-rating i,
.rating-stars i {
    margin-right: 2px;
    color: inherit;
}

/* Review Text */
.review-text,
.review-comment {
    color: #333;
    line-height: 1.5;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 5px;
}

/* Pagination for Reviews */
.review-pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.review-pagination button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 3px;
    font-size: 14px;
}

.review-pagination button.active {
    background-color: #4CAF50;
    color: white;
}

.review-pagination button:hover:not(.active) {
    background-color: #f0f0f0;
}

/* Review Submission Form */
.add-review-form {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    text-align: left;
    border: 1px solid #eee;
}

/* Rating Stars for Form */
.rating-stars {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 20px;
}

.stars-container {
    display: flex;
    margin-left: 10px;
}

.star-rating {
    color: #ddd;
    cursor: pointer;
    margin-right: 5px;
    transition: color 0.2s;
}

.star-rating:hover,
.star-rating.active {
    color: #FFD700;
}

/* Review Textarea */
#review-comment {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

#review-comment:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Submit Button */
.review-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.review-btn:hover {
    background-color: var(--primary-color);
}

/* Login Prompt */
.login-to-review {
    text-align: center;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin-top: 20px;
}

.login-to-review a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.login-to-review a:hover {
    text-decoration: underline;
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-user-name {
        margin-bottom: 5px;
    }

    .review-date {
        margin-left: 0;
        margin-top: 5px;
    }

    .rating-stars {
        font-size: 18px;
    }

    .review-text {
        font-size: 13px;
    }
}


.reviews-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.reviews-carousel {
    flex: 1;
    overflow: hidden;
}

.review-nav {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 2;
    margin: 0 10px;
}

.review-nav:hover {
    background: rgba(0, 0, 0, 0.2);
}

.review-nav i {
    font-size: 16px;
}

/* Make sure only one review is visible at a time */
.review-item {
    display: none;
}

.review-item.active {
    display: block;
}

/* Navigation arrows in dark mode */
body.dark .review-nav {
    background: rgba(255, 255, 255, 0.1);
    color: var(--darkFontColor);
}

body.dark .review-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Review System Styles */
body.dark .reviews-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    /* background-color: var(--darkback-color); */
    direction: ltr;
    text-align: left;
    color: var(--darkFontColor);
}

body.dark .reviews-container h4 {
    margin-bottom: 15px;
    color: var(--darkFontColor);
    font-size: 18px;
    text-align: left;
}

/* Single Review Item */
body.dark .review-item {
    /* display: flex;
    flex-direction: column; */
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--darkbachChild-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--darkback-color);
}

/* Review Header (User info + Date) */
body.dark .review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* User Profile Image */
body.dark .review-user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* User Info Container */
body.dark .review-user-info {
    display: flex;
    flex-direction: column;
}

/* User Name */
body.dark .review-user-name {
    font-weight: bold;
    color: var(--darkFontColor);
    margin-right: auto;
    font-size: 14px;
}

/* Review Date */
body.dark .review-date {
    color: #aaa;
    font-size: 0.9em;
    margin-left: 10px;
    white-space: nowrap;
}

/* Star Rating Display */
body.dark .review-rating,
body.dark .rating-stars {
    display: flex;
    color: #FFD700;
    /* Gold color for stars */
    margin-bottom: 10px;
    font-size: 16px;
}

body.dark .review-rating i,
body.dark .rating-stars i {
    margin-right: 2px;
    color: inherit;
}

/* Review Text */
body.dark .review-text,
body.dark .review-comment {
    color: var(--darkFontColor);
    line-height: 1.5;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--darkback-color);
    border-radius: 5px;
}

/* Pagination for Reviews */
body.dark .review-pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

body.dark .review-pagination button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 3px;
    font-size: 14px;
}

body.dark .review-pagination button.active {
    background-color: var(--primary-color);
    color: white;
}

body.dark .review-pagination button:hover:not(.active) {
    background-color: #4f4d4d;
}

/* Review Submission Form */
body.dark .add-review-form {
    background-color: var(--darkbachChild-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    text-align: left;
    border: 1px solid var(--darkback-color);
}

/* Rating Stars for Form */
body.dark .rating-stars {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 20px;
}

body.dark .stars-container {
    display: flex;
    margin-left: 10px;
}

body.dark .star-rating {
    color: #666;
    cursor: pointer;
    margin-right: 5px;
    transition: color 0.2s;
}

body.dark .star-rating:hover,
body.dark .star-rating.active {
    color: #FFD700;
}

/* Review Textarea */
body.dark #review-comment {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: var(--darkback-color);
    color: var(--darkFontColor);
}

body.dark #review-comment:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Submit Button */
body.dark .review-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    font-weight: 500;
}

body.dark .review-btn:hover {
    background-color: #b37417;
}

/* Login Prompt */
body.dark .login-to-review {
    text-align: center;
    padding: 15px;
    background-color: var(--darkback-color);
    border-radius: 8px;
    margin-top: 20px;
}

body.dark .login-to-review a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

body.dark .login-to-review a:hover {
    text-decoration: underline;
}

/* No Reviews Message */
body.dark .no-reviews {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-style: italic;
}


body.dark .review-item {
    background-color: var(--darkbachChild-color) !important;
    color: var(--darkFontColor) !important;
    border: 1px solid var(--darkback-color) !important;
}

body.dark .review-user-name {
    color: var(--darkFontColor) !important;
}

body.dark .review-comment {
    background-color: var(--darkback-color) !important;
    color: var(--darkFontColor) !important;
}



/* Cart Notification Styles */
.cart-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cart-notification .card {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.cart-notification .card-body {
    padding: 1rem;
}

.cart-notification .btn-close-notification {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.cart-notification .btn-close-notification:hover {
    opacity: 1;
}

.cart-notification .btn-close-notification::before {
    content: "×";
    font-size: 1.5rem;
    line-height: 1;
}

.cart-notification img {
    border: 1px solid #e9ecef;
}

.cart-notification .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.cart-notification .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.cart-notification .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.cart-notification .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.cart-notification .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.cart-notification .text-success {
    color: #198754 !important;
}

.cart-notification .alert {
    border-radius: 8px;
    font-weight: 500;
}

/* Animation enhancements */
.cart-notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .cart-notification.show {
        transform: translateY(0);
    }

    .cart-notification .card {
        max-width: none;
    }

    .cart-notification .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

.cart_add:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    font-size: 14px;
}