
/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes blob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.2); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

@keyframes blob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 40px) scale(1.3); }
    66% { transform: translate(40px, -40px) scale(0.8); }
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95); /* Starts slightly smaller */
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1); /* Ends at full size */
    }
}


/* BUTTONS */

.order-btn-container {
    display: flex;
    justify-content: center;
    margin-top: -2rem;
    padding-bottom: 3rem;
    animation: fadeIn 0.7s 0.3s both;
}

.vendor-btn-container {
    display: flex;
    justify-content: center;
    margin-top: -6rem;
    padding-bottom: 3rem;
    animation: fadeIn 0.7s 0.3s both;
}

.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    animation: fadeIn 0.7s 0.3s both;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(to right, #ea580c, #dc2626);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px var(--shadow);

}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px var(--shadow);
    font-weight: 600;
}


/* Search Container */
.search-container {
    position: relative;
    max-width: 672px;
    margin: 0 auto 3rem;
    animation: fadeIn 0.6s 0.5s both;
}

.search-input {
    width: 100%;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    border: 2px solid;
    box-shadow: 0 20px 25px -5px var(--shadow);
    transition: all 0.3s;
}

.light-theme .search-input {
    background: white;
    border-color: white;
    color: #111827;
}

.dark-theme .search-input {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.light-theme .search-input:focus {
    border-color: #fb923c;
}

.dark-theme .search-input:focus {
    border-color: #f97316;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, #f97316, #ef4444);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.search-button:hover {
    background: linear-gradient(to right, #ea580c, #dc2626);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.search-text {
    display: none;
}


/* Categories */
.categories-sticky {
    position: sticky;
    top: 80px;
    z-index: 30;
    box-shadow: 0 2px 4px -1px var(--shadow);
    transition: background-color 0.3s;
    animation: fadeIn 0.5s;
}

.light-theme .categories-sticky {
    background: white;
    border-bottom: 2px solid #f3f4f6;
}

.dark-theme .categories-sticky {
    background: #1f2937;
    border-bottom: 2px solid #374151;
}

.categories-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
}

.categories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    white-space: nowrap;
    border: 2px solid;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    animation: fadeIn 0.4s both;
}

.category-btn:hover {
    transform: scale(1.05) translateY(-2px);
}

.light-theme .category-btn {
    background: #f9fafb;
    color: #374151;
    border-color: #e5e7eb;
}

.dark-theme .category-btn {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

.light-theme .category-btn:hover {
    background: #f3f4f6;
}

.dark-theme .category-btn:hover {
    background: #4b5563;
}

.category-btn.active {
    background: linear-gradient(to right, #f97316, #ef4444);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.category-emoji {
    font-size: 1.25rem;
}

/* Modal Styling */
dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 20px 25px -5px var(--shadow);
    position: fixed;
    top: 50%;                /* Move top edge to middle */
    left: 50%;               /* Move left edge to middle */
    transform: translate(-50%, -50%);
    margin: 0;
    animation: fadeInModal 0.3s ease-out forwards;
    overflow: hidden;    
}

light-theme dialog {
    background: white;
    border-color: #f3f4f6;
}

.dark-theme dialog {
    background: #1f2937;
    border-color: #374151;
}

#closeModal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    animation: fadeIn 0.7s 0.3s both;
    box-shadow: 0 10px 15px -3px var(--shadow);
    
}

#closeModal:hover {
    background: #d9534f;
    color: white;
    transform: scale(1.5);
    box-shadow: 0 10px 15px -3px var(--shadow);
    font-weight: 900;
}


/* Background Dimming */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Content Container */
.modal-detail {
    padding: 2rem;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.7s 0.3s both;
}

.modal-detail p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.modal-detail strong {
    color: var(--text-primary);
}

.modal-detail hr {
    border: 0;
    border-top: 1px solid var(--text-secondary);
    opacity: 0.2;
    margin: 1rem 0;
}

/* Modal Title */

#mytitle {
    padding: 2rem;
    padding-bottom: 0;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #f97316, #ef4444, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.5;
    animation: fadeIn 0.7s 0.3s both;
}

.dark-theme #mytitle {
    background: linear-gradient(to right, #fb923c, #f87171, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-wrapper {
    grid-column: 1 / -1; 
    text-align: center; 
    padding: 50px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 75, 75, 0.2);
    margin: 10px;
}
.error-wrapper span {
    font-size: 3rem;
}

.error-wrapper  h2{
    margin-top: 15px; color: #f97316;
}



@media (min-width: 1024px) {
    .view-all-container {
        display: flex;
        justify-content: flex-start;
        margin-top: 3rem;
        padding-bottom: 0.5rem;
        animation: fadeIn 0.7s 0.3s both;
    }
}

