/* Frontend Styles - RTL & Responsive */

:root {
    --nakhlak-primary: #8B4513;
    --nakhlak-secondary: #D2691E;
    --nakhlak-accent: #DAA520;
    --nakhlak-bg: #FDF5E6;
    --nakhlak-card-bg: #FFFFFF;
    --nakhlak-text: #333;
}

.nakhlak-cake-menu {
    direction: rtl;
    font-family: Tahoma, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Category Navigation */
.nakhlak-category-nav {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.nakhlak-cat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid var(--nakhlak-primary);
    color: var(--nakhlak-primary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

/* Position classes for image */
.nakhlak-cat-btn.nakhlak-cat-pos-left {
    flex-direction: row-reverse;
}

.nakhlak-cat-btn.nakhlak-cat-pos-right {
    flex-direction: row;
}

.nakhlak-cat-btn.nakhlak-cat-pos-top {
    flex-direction: column;
}

.nakhlak-cat-btn.nakhlak-cat-pos-bottom {
    flex-direction: column-reverse;
}

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

.nakhlak-cat-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

/* Larger images for top/bottom position */
.nakhlak-cat-btn.nakhlak-cat-pos-top .nakhlak-cat-img,
.nakhlak-cat-btn.nakhlak-cat-pos-bottom .nakhlak-cat-img {
    width: 48px;
    height: 48px;
}

.nakhlak-cat-btn.active .nakhlak-cat-img,
.nakhlak-cat-btn:hover .nakhlak-cat-img {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Products Grid */
.nakhlak-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.nakhlak-product-card {
    background: var(--nakhlak-card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.nakhlak-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nakhlak-product-img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

.nakhlak-no-image {
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.nakhlak-product-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nakhlak-product-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: var(--nakhlak-primary);
}

.nakhlak-product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.nakhlak-order-btn {
    background-color: var(--nakhlak-secondary);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
}

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

/* Modal Overlay */
.nakhlak-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.nakhlak-modal-overlay.active {
    display: flex;
}

.nakhlak-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: nakhlakSlideUp 0.3s ease;
    direction: rtl;
}

@keyframes nakhlakSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nakhlak-close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.nakhlak-close-modal:hover {
    color: #333;
}

.nakhlak-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.nakhlak-modal-cake-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid var(--nakhlak-accent);
}

.nakhlak-modal-header h3 {
    margin: 10px 0 5px;
    color: var(--nakhlak-primary);
    font-size: 1.3rem;
}

.nakhlak-modal-cake-id {
    font-size: 0.8rem;
    color: #777;
    margin: 0;
}

/* Form Styles */
.nakhlak-form-group {
    margin-bottom: 15px;
    text-align: right;
}

.nakhlak-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
    font-weight: bold;
}

.nakhlak-form-group input {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
    direction: rtl;
}

.nakhlak-form-group input:focus {
    border-color: var(--nakhlak-accent);
}

.nakhlak-submit-btn {
    background-color: var(--nakhlak-primary);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
    font-family: inherit;
}

.nakhlak-submit-btn:hover {
    background-color: var(--nakhlak-secondary);
}

.nakhlak-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Notification */
.nakhlak-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000000;
    animation: nakhlakFadeIn 0.3s ease;
    direction: rtl;
}

.nakhlak-notification.active {
    display: block;
}

.nakhlak-notification.error {
    background-color: #f44336;
}

@keyframes nakhlakFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* No Products Message */
.nakhlak-no-products {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nakhlak-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .nakhlak-category-nav {
        justify-content: flex-start;
    }
    
    .nakhlak-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .nakhlak-product-img-wrapper {
        height: 200px;
    }
}

@media screen and (max-width: 480px) {
    .nakhlak-products-grid {
        grid-template-columns: 1fr;
    }
    
    .nakhlak-cat-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .nakhlak-notification {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Hidden class for filtering */
.nakhlak-product-card.hidden {
    display: none;
}
