/* DoorDash-Inspired UI Components - Enhanced */

/* Restaurant Cards - Premium Enhanced */
.restaurant-card-enhanced {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 0.0625em solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.restaurant-card-enhanced:hover {
    box-shadow:
        0 0.75em 2em rgba(0, 0, 0, 0.12),
        0 0.25em 0.5em rgba(0, 0, 0, 0.08);
    transform: translateY(-0.25em);
    border-color: var(--border-medium);
}

.restaurant-card-enhanced .card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.restaurant-card-enhanced .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-normal);
}

.restaurant-card-enhanced:hover .card-image {
    transform: scale(1.08);
}

.restaurant-card-enhanced .card-badge {
    position: absolute;
    top: 0.75em;
    left: 0.75em;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0.625em);
    padding: 0.375em 0.75em;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.1);
    border: 0.0625em solid rgba(255, 255, 255, 0.5);
}

.restaurant-card-enhanced .card-content {
    padding: 1.25em;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.restaurant-card-enhanced .card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.25em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restaurant-card-enhanced .card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 0.75em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restaurant-card-enhanced .card-info {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.restaurant-card-enhanced .card-rating {
    display: flex;
    align-items: center;
    gap: 0.25em;
    font-weight: 600;
}

.restaurant-card-enhanced .card-rating.high {
    color: var(--success);
}

.restaurant-card-enhanced .card-divider {
    width: 0.0625em;
    height: 0.875em;
    background: var(--border-medium);
}

/* Delivery Info Pills */
.delivery-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.375em 0.75em;
    background: var(--bg-secondary);
    border-radius: 1.25em;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.delivery-pill.free {
    background: #E8F5E9;
    color: var(--success);
}

.delivery-pill.fast {
    background: #FFF8E1;
    color: #F57C00;
}

/* Cuisine Chips */
.cuisine-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.25em;
    background: var(--bg-primary);
    border: 0.125em solid var(--border-medium);
    border-radius: 1.5em;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cuisine-chip:hover {
    border-color: var(--text-primary);
}

.cuisine-chip.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.cuisine-chip .emoji {
    margin-right: 0.5em;
    font-size: 1.25rem;
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 0.0625em solid var(--border-light);
}

.skeleton-image {
    width: 100%;
    height: 11.25em;
    background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.skeleton-content {
    padding: 1em;
}

.skeleton-title {
    height: 1em;
    width: 70%;
    margin-bottom: 0.5em;
}

.skeleton-subtitle {
    height: 0.875em;
    width: 50%;
    margin-bottom: 0.75em;
}

.skeleton-info {
    height: 0.75em;
    width: 40%;
}

/* Promotional Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25em 1.5em;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5em;
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.08);
}

.promo-banner .promo-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25em;
}

.promo-banner .promo-content p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin: 0;
}

.promo-banner .promo-action {
    background: white;
    color: var(--primary);
    padding: 0.625em 1.25em;
    border-radius: var(--radius-md);
    font-weight: 600;
    white-space: nowrap;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 1em 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.625em 1em;
    background: var(--bg-primary);
    border: 0.0625em solid var(--border-medium);
    border-radius: 1.5em;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-button:hover {
    border-color: var(--text-primary);
}

.filter-button.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.filter-button svg {
    width: 1em;
    height: 1em;
}

/* Menu Item Card - Enhanced */
.menu-item-enhanced {
    display: flex;
    gap: 1em;
    padding: 1.25em;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 0.0625em solid var(--border-light);
    transition: all 0.2s ease;
    cursor: pointer;
}

.menu-item-enhanced:hover {
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.08);
}

.menu-item-enhanced .item-image-wrapper {
    width: 8em;
    height: 8em;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

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

.menu-item-enhanced .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-enhanced .item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5em;
}

.menu-item-enhanced .item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-item-enhanced .item-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.menu-item-enhanced .item-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-enhanced .item-tags {
    display: flex;
    gap: 0.5em;
    margin-top: auto;
}

.menu-item-enhanced .item-tag {
    padding: 0.25em 0.5em;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.menu-item-enhanced .item-tag.vegetarian {
    background: #E8F5E9;
    color: var(--success);
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    background: var(--primary);
    color: white;
    padding: 1em 1.5em;
    border-radius: 1.75em;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 999;
}

.floating-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-0.125em);
    box-shadow: 0 0.5em 2em rgba(235, 23, 0, 0.3);
}

.floating-cart .cart-icon {
    font-size: 1.5rem;
}

.floating-cart .cart-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.floating-cart .cart-count {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
}

.floating-cart .cart-total {
    font-size: 1rem;
    font-weight: 600;
}

/* Info Pills (Rating, Time, Fee) */
.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    font-size: 0.875rem;
}

.info-pill.rating {
    color: var(--text-primary);
    font-weight: 600;
}

.info-pill.rating .star {
    color: #FFB800;
}

.info-pill.time,
.info-pill.fee {
    color: var(--text-secondary);
}

/* Category Navigation */
.category-nav {
    position: sticky;
    top: 4.375em;
    background: var(--bg-primary);
    padding: 1em 0;
    border-bottom: 0.0625em solid var(--border-light);
    z-index: 100;
}

.category-nav-list {
    display: flex;
    gap: 2em;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-nav-list::-webkit-scrollbar {
    display: none;
}

.category-nav-item {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    padding-bottom: 0.75em;
    border-bottom: 0.125em solid transparent;
    transition: all 0.2s ease;
}

.category-nav-item:hover {
    color: var(--text-primary);
}

.category-nav-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

/* Address Input */
.address-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 31.25em;
}

.address-input {
    width: 100%;
    padding: 0.875em 1em 0.875em 2.75em;
    border: 0.0625em solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.address-input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 0.1875em rgba(25, 25, 25, 0.05);
}

.address-input-icon {
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 48em) {
    .restaurant-card-enhanced .card-content {
        padding: 0.75em;
    }

    .menu-item-enhanced {
        flex-direction: column;
    }

    .menu-item-enhanced .item-image-wrapper {
        width: 100%;
        height: 12.5em;
    }

    .floating-cart {
        bottom: 1em;
        right: 1em;
        left: 1em;
        justify-content: center;
    }

    .promo-banner {
        flex-direction: column;
        gap: 0.75em;
        text-align: center;
    }

    .promo-banner .promo-action {
        width: 100%;
    }
}