/* Design System Variables */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 0 84% 50%;
    --primary-foreground: 0 0% 100%;
    --secondary: 45 100% 50%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 45 100% 95%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 0 84% 50%;
    --radius: 0.5rem;
    --gradient-primary: linear-gradient(135deg, hsl(0 84% 50%), hsl(0 84% 45%));
    --shadow-card: 0 4px 20px -4px hsl(0 84% 50% / 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* Promotional Banner */
.promo-banner {
    background: linear-gradient(to right, hsl(0 84% 50%), hsl(0 84% 45%));
    color: white;
    padding: 0.375rem 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 50;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    .promo-banner {
        padding: 0.5rem 0;
        font-size: 0.875rem;
    }
}

/* Header */
.header {
    border-bottom: 1px solid hsl(var(--border));
    position: sticky;
    top: 1.5rem;
    z-index: 40;
    height: 3.5rem;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('src/assets/header-bg.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .header {
        top: 2rem;
        height: 4rem;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    width: 2.75rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition-smooth);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-icon {
    height: 1.25rem;
    width: 1.25rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

@media (min-width: 768px) {
    .logo-section {
        gap: 0.75rem;
    }
}

.ifood-logo {
    flex-shrink: 0;
}

.ifood-logo img {
    height: 1.75rem;
    width: auto;
    object-fit: contain;
}

@media (min-width: 768px) {
    .ifood-logo img {
        height: 2.25rem;
    }
}

.dona-coxinhas-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.dona-logo {
    flex-shrink: 0;
}

.dona-logo-img {
    height: 2.25rem;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
}

@media (min-width: 768px) {
    .dona-logo-img {
        height: 2.5rem;
    }
}

.restaurant-info {
    min-width: 0;
    flex: 1;
}

.restaurant-name-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .restaurant-name-container {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
}

.restaurant-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .restaurant-name {
        font-size: 1.125rem;
    }
}

.location-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .location-text {
        font-size: 0.875rem;
    }
}

.restaurant-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: none;
}

@media (min-width: 768px) {
    .restaurant-subtitle {
        display: block;
    }
}

/* Navigation Section */
.nav-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .nav-section {
        gap: 1rem;
    }
}

.desktop-nav {
    display: none;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
}

.desktop-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.desktop-nav a:hover {
    color: #fed7aa;
}

/* Location Button */
.location-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .location-btn {
        height: 2.5rem;
        padding: 0 0.75rem;
    }
}

.location-icon {
    height: 0.75rem;
    width: 0.75rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .location-icon {
        height: 1rem;
        width: 1rem;
    }
}

.location-btn-text {
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 6rem;
}

@media (min-width: 640px) {
    .location-btn-text {
        display: inline;
    }
}

@media (min-width: 768px) {
    .location-btn-text {
        max-width: 8rem;
    }
}

.location-btn-mobile {
    display: inline;
}

@media (min-width: 640px) {
    .location-btn-mobile {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: hsl(var(--background));
    padding: 1.5rem;
    transform: translateX(-100%);
    transition: var(--transition-smooth);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

@media (min-width: 640px) {
    .mobile-menu-content {
        width: 400px;
    }
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: hsl(var(--foreground));
    padding: 0.5rem;
}

.mobile-menu-close svg {
    height: 1rem;
    width: 1rem;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.mobile-nav a {
    font-size: 1.125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: var(--transition-smooth);
}

.mobile-nav a:hover {
    color: hsl(var(--primary));
}

/* Hero Section */
.hero {
    background: hsl(var(--accent));
    padding: 3rem 0;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .hero-container {
        padding: 0 1rem;
    }
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

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

.hero-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 2rem;
    }
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

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

.section-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1rem;
    }
}

/* Best Sellers Section */
.best-sellers {
    padding: 1.5rem 0;
}

@media (min-width: 768px) {
    .best-sellers {
        padding: 3rem 0;
    }
}

.best-sellers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .best-sellers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Product Cards */
.product-card {
    background: hsl(var(--card));
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
}

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

@media (min-width: 768px) {
    .product-image {
        height: 12rem;
    }
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius);
}

.product-badge.best-seller {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.product-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 768px) {
    .product-content {
        padding: 1rem;
    }
}

.product-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-name {
        font-size: 1rem;
    }
}

.product-description {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-description {
        font-size: 0.875rem;
    }
}

.product-pricing {
    margin-bottom: 1rem;
}

.original-price {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}

.current-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

@media (min-width: 768px) {
    .current-price {
        font-size: 1.25rem;
    }
}

.limited-offer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #ea580c;
    margin-bottom: 1rem;
}

.buy-button {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: auto;
    display: block;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.buy-button:hover {
    background: hsl(0 84% 45%);
}

@media (min-width: 768px) {
    .buy-button {
        height: 3rem;
        font-size: 0.875rem;
    }
}

/* Product Catalog Section */
.product-catalog {
    padding: 1.5rem 0;
}

@media (min-width: 768px) {
    .product-catalog {
        padding: 3rem 0;
    }
}

/* Tabs */
.tabs {
    width: 100%;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 1.5rem;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 0.25rem;
}

@media (min-width: 768px) {
    .tabs-list {
        margin-bottom: 2rem;
    }
}

.tab-trigger {
    background: transparent;
    border: none;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    transition: var(--transition-smooth);
}

.tab-trigger:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--background));
}

.tab-trigger.active {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .tab-trigger {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Reviews Section */
.reviews {
    background: hsl(var(--muted));
    padding: 1.5rem 0;
}

@media (min-width: 768px) {
    .reviews {
        padding: 3rem 0;
    }
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.review-card {
    background: hsl(var(--background));
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.review-stars {
    color: #fbbf24;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.review-text {
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.review-author {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: hsl(var(--background));
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 28rem;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
}

.modal-logo {
    height: 2rem;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.modal-title .location-icon {
    height: 1.25rem;
    width: 1.25rem;
    color: hsl(var(--primary));
}

.modal-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
}

.modal-close svg {
    height: 1rem;
    width: 1rem;
}

.modal-body {
    margin-top: 1rem;
}

.modal-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    text-align: center;
}

.location-detect-btn {
    width: 100%;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
}

.location-detect-btn:hover {
    background: hsl(0 84% 45%);
}

.location-detect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.location-detect-btn .location-icon {
    height: 1rem;
    width: 1rem;
}

.confirmation-content {
    text-align: center;
    padding: 1rem 0;
}

.confirmation-icon {
    width: 4rem;
    height: 4rem;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.confirmation-icon svg {
    height: 2rem;
    width: 2rem;
    color: #16a34a;
}

.confirmation-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.confirmation-content p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.location-display {
    background: hsl(var(--accent));
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: hsl(var(--foreground));
}

.location-note {
    font-size: 0.75rem !important;
}

.confirmation-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-secondary {
    flex: 1;
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: hsl(var(--muted));
}

.btn-primary {
    flex: 1;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: hsl(0 84% 45%);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: var(--transition-smooth);
    z-index: 70;
    max-width: 20rem;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.toast-icon.error {
    background: #fef2f2;
    color: #dc2626;
}

.toast-text {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.toast-description {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Print Styles */
@media print {
    .promo-banner,
    .mobile-menu-overlay,
    .modal-overlay,
    .toast {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid hsl(var(--border));
    }
    
    .buy-button {
        border: 2px solid hsl(var(--primary));
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}