/**
 * Çiğköfteci Kiosk - Animated Red Theme
 * Performance: GPU-accelerated animations, reduced layout thrashing
 * Responsive: Mobile-first, touch-optimized
 */

:root {
    --primary: #E63946;
    --primary-dark: #c12936;
    --primary-light: #ff6b6b;
    --secondary: #fff0f0;
    --accent: #ffd700;
    --dark: #8b0000;
    --darker: #5c0000;
    --text: #2c2c2c;
    --text-light: #666666;
    --white: #ffffff;
    --shadow: rgba(139, 0, 0, 0.2);

    /* Breakpoints */
    --mobile-max: 480px;
    --tablet-max: 768px;
    --desktop-min: 1024px;

    /* Touch targets */
    --touch-target: 44px;
}

/* ==================== PERFORMANCE BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Safe area support for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .header {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: env(safe-area-inset-top);
    }

    .cart-drawer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .products-section {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .categories {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}

/* GPU acceleration for transforms */
.will-animate {
    will-change: transform, opacity;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #E63946 0%, #c12936 25%, #8b0000 50%, #c12936 75%, #E63946 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* Reduce paint on scroll */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #E63946 0%, #c12936 25%, #8b0000 50%, #c12936 75%, #E63946 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== WELCOME SCREEN - Responsive ==================== */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E63946 0%, #8b0000 100%);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.6s ease;
    padding: 0.75rem;
    overflow: hidden;
}

.welcome-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    color: white;
    z-index: 2;
    animation: welcomeContentIn 1s ease forwards;
    max-width: 100%;
    width: 100%;
    padding: 0.5rem;
}

@media (min-width: 340px) {
    .welcome-content {
        padding: 0.75rem;
    }
}

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

@media (min-width: 400px) {
    .welcome-content {
        padding: 1.25rem;
    }
}

@media (min-width: 480px) {
    .welcome-content {
        max-width: 380px;
        padding: 1.5rem;
    }
}

@media (min-width: 600px) {
    .welcome-content {
        max-width: 420px;
    }
}

@media (min-width: 768px) {
    .welcome-content {
        max-width: 480px;
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .welcome-content {
        max-width: 520px;
    }
}

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

.welcome-logo {
    margin-bottom: 1rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@media (min-width: 480px) {
    .welcome-logo {
        margin-bottom: 1.5rem;
    }
}

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

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.welcome-logo img {
    width: 80px;
    height: auto;
    max-width: 80px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: logoPulse 2s ease-in-out infinite;
}

@media (min-width: 360px) {
    .welcome-logo img {
        width: 90px;
        max-width: 90px;
    }
}

@media (min-width: 400px) {
    .welcome-logo img {
        width: 100px;
        max-width: 100px;
    }
}

@media (min-width: 480px) {
    .welcome-logo img {
        width: 120px;
        max-width: 120px;
    }
}

@media (min-width: 768px) {
    .welcome-logo img {
        width: 150px;
        max-width: 150px;
    }
}

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

.welcome-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 5px 20px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
    animation: titleSlide 1s ease 0.3s forwards;
    opacity: 0;
    line-height: 1.2;
}

@media (min-width: 360px) {
    .welcome-title {
        font-size: 1.75rem;
    }
}

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

@media (min-width: 480px) {
    .welcome-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
}

@media (min-width: 600px) {
    .welcome-title {
        font-size: 3rem;
        letter-spacing: -1.5px;
    }
}

@media (min-width: 768px) {
    .welcome-title {
        font-size: 3.5rem;
        letter-spacing: -2px;
    }
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 1.25rem;
    font-weight: 400;
    animation: subtitleFade 1s ease 0.5s forwards;
    opacity: 0;
}

@media (min-width: 360px) {
    .welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 480px) {
    .welcome-subtitle {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }
}

@media (min-width: 600px) {
    .welcome-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
}

@media (min-width: 768px) {
    .welcome-subtitle {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
    }
}

@keyframes subtitleFade {
    to { opacity: 0.9; }
}

.start-order-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.875rem 1.75rem;
    min-height: 48px;
    min-width: 48px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: btnPopIn 0.6s ease 0.8s forwards;
    opacity: 0;
    transform: scale(0.9);
}

@media (min-width: 360px) {
    .start-order-btn {
        padding: 0.9rem 2rem;
        font-size: 1.05rem;
        gap: 0.6rem;
    }
}

@media (min-width: 480px) {
    .start-order-btn {
        padding: 1rem 2.5rem;
        font-size: 1.15rem;
        min-height: 52px;
        gap: 0.75rem;
    }
}

@media (min-width: 600px) {
    .start-order-btn {
        padding: 1.1rem 3rem;
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) {
    .start-order-btn {
        padding: 1.25rem 3.5rem;
        font-size: 1.4rem;
        min-height: 56px;
    }
}

@keyframes btnPopIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (hover: hover) {
    .start-order-btn:hover {
        transform: scale(1.05) translateY(-3px);
        box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    }
}

.start-order-btn:active {
    transform: scale(0.98);
}

.start-order-btn:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

.btn-icon {
    font-size: 1.2rem;
    animation: iconBounce 1s ease infinite;
}

@media (min-width: 360px) {
    .btn-icon {
        font-size: 1.3rem;
    }
}

@media (min-width: 480px) {
    .btn-icon {
        font-size: 1.5rem;
    }
}

@media (min-width: 600px) {
    .btn-icon {
        font-size: 1.7rem;
    }
}

@media (min-width: 768px) {
    .btn-icon {
        font-size: 1.8rem;
    }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    75% { transform: translateY(-3px) rotate(5deg); }
}

/* Floating Items - Responsive */
.floating-items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Hide floating items on very small mobile screens */
@media (max-width: 360px) {
    .floating-items {
        display: none;
    }
}

.float-item {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.08;
    animation: floatAround 20s linear infinite;
}

@media (min-width: 400px) {
    .float-item {
        font-size: 1.8rem;
        opacity: 0.1;
    }
}

@media (min-width: 480px) {
    .float-item {
        font-size: 2.2rem;
        opacity: 0.12;
    }
}

@media (min-width: 600px) {
    .float-item {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .float-item {
        font-size: 3rem;
        opacity: 0.15;
    }
}

/* Mobile: Fewer visible items, positioned away from center */
@media (max-width: 480px) {
    .float-item:nth-child(1) { top: 5%; left: 5%; animation-delay: var(--delay); }
    .float-item:nth-child(2) { top: 10%; right: 5%; animation-delay: var(--delay); animation-direction: reverse; }
    .float-item:nth-child(3) { bottom: 15%; left: 8%; animation-delay: var(--delay); }
    .float-item:nth-child(4) { bottom: 10%; right: 8%; animation-delay: var(--delay); animation-direction: reverse; }
    .float-item:nth-child(5) { display: none; }
}

@media (min-width: 481px) {
    .float-item:nth-child(1) { top: 10%; left: 10%; animation-delay: var(--delay); }
    .float-item:nth-child(2) { top: 20%; right: 15%; animation-delay: var(--delay); animation-direction: reverse; }
    .float-item:nth-child(3) { bottom: 30%; left: 20%; animation-delay: var(--delay); }
    .float-item:nth-child(4) { bottom: 20%; right: 10%; animation-delay: var(--delay); animation-direction: reverse; }
    .float-item:nth-child(5) { top: 50%; left: 5%; animation-delay: var(--delay); }
}

@keyframes floatAround {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.15;
    }
    50% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
        opacity: 0.15;
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
}
    }
    25% {
        transform: translateY(-30px) rotate(10deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }
    75% {
        transform: translateY(30px) rotate(-10deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }
}

/* ==================== MAIN APP ==================== */
.main-app {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    min-height: 100vh;
}

.main-app.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

@media (min-width: 1280px) {
    .main-app {
        max-width: 1400px;
        margin: 0 auto;
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.1);
    }
}

@media (min-width: 1920px) {
    .main-app {
        max-width: 1600px;
    }
}

/* Header - Responsive & Performance */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    box-shadow: 0 4px 30px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: headerSlideDown 0.6s ease forwards;
    min-height: 52px;
}

@media (min-width: 360px) {
    .header {
        padding: 0.6rem 0.875rem;
        gap: 0.5rem;
    }
}

@media (min-width: 480px) {
    .header {
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
        min-height: 56px;
    }
}

@media (min-width: 600px) {
    .header {
        padding: 0.875rem 1.5rem;
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 1rem 2rem;
        min-height: 60px;
    }
}

@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 32px;
    width: auto;
    max-width: 40px;
    filter: brightness(0) saturate(100%) hue-rotate(350deg) saturate(3);
}

@media (min-width: 360px) {
    .header-logo img {
        height: 36px;
        max-width: 45px;
    }
}

@media (min-width: 400px) {
    .header-logo img {
        height: 40px;
        max-width: 50px;
    }
}

@media (min-width: 480px) {
    .header-logo img {
        height: 45px;
    }
}

@media (min-width: 600px) {
    .header-logo img {
        height: 50px;
    }
}

.header-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Hide subtitle on small mobile */
@media (max-width: 420px) {
    .header-title p {
        display: none;
    }
}

/* Hide entire title on very small screens */
@media (max-width: 320px) {
    .header-title {
        display: none;
    }
}

.header-title h1 {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.header-title p {
    font-size: 0.6rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 340px) {
    .header-title h1 {
        font-size: 0.8rem;
    }
}

@media (min-width: 360px) {
    .header-title h1 {
        font-size: 0.85rem;
    }
    .header-title p {
        font-size: 0.62rem;
    }
}

@media (min-width: 400px) {
    .header-title h1 {
        font-size: 0.9rem;
    }
    .header-title p {
        font-size: 0.65rem;
    }
}

@media (min-width: 480px) {
    .header-title h1 {
        font-size: 1.1rem;
    }
    .header-title p {
        font-size: 0.7rem;
    }
}

@media (min-width: 600px) {
    .header-title h1 {
        font-size: 1.2rem;
    }
    .header-title p {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .header-title {
        display: block;
    }
    .header-title h1 {
        font-size: 1.3rem;
    }
}

/* Header Timer */
.header-timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.08));
    padding: 0.3rem 0.5rem;
    border-radius: 50px;
    border: 2px solid rgba(230, 57, 70, 0.2);
    flex-shrink: 0;
}

.timer-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.timer-countdown {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    min-width: 2rem;
    text-align: center;
}

@media (min-width: 360px) {
    .header-timer {
        padding: 0.35rem 0.6rem;
        gap: 0.3rem;
    }
    .timer-icon {
        font-size: 0.9rem;
    }
    .timer-countdown {
        font-size: 0.85rem;
        min-width: 2.2rem;
    }
}

@media (min-width: 400px) {
    .header-timer {
        padding: 0.4rem 0.75rem;
        gap: 0.35rem;
    }
    .timer-icon {
        font-size: 1rem;
    }
    .timer-countdown {
        font-size: 0.9rem;
        min-width: 2.5rem;
    }
}

.header-timer.warning {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    border-color: rgba(255, 107, 107, 0.4);
    animation: timerPulse 1s ease-in-out infinite;
}

.header-timer.warning .timer-countdown {
    color: #ff6b6b;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

@media (min-width: 480px) {
    .header-timer {
        padding: 0.5rem 1rem;
    }

    .timer-icon {
        font-size: 1.1rem;
    }

    .timer-countdown {
        font-size: 1.1rem;
        min-width: 3rem;
    }
}

/* Home Button */
.back-home-btn {
    width: var(--touch-target);
    height: var(--touch-target);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.back-home-btn:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
}

@media (min-width: 480px) {
    .back-home-btn {
        width: calc(var(--touch-target) + 8px);
        height: calc(var(--touch-target) + 8px);
        min-width: calc(var(--touch-target) + 8px);
        min-height: calc(var(--touch-target) + 8px);
        font-size: 1.4rem;
    }
}

/* Checkout Button */
.cart-checkout-btn {
    position: relative;
    background: var(--primary);
    border: none;
    padding: 0.5rem 0.6rem;
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    min-width: 40px;
}

.cart-checkout-btn .cart-icon {
    font-size: 1.1rem;
    filter: brightness(0) invert(1);
}

.cart-checkout-btn .btn-text {
    font-size: 0.75rem;
}

@media (min-width: 340px) {
    .cart-checkout-btn {
        padding: 0.55rem 0.7rem;
        min-height: 42px;
        min-width: 42px;
    }
    .cart-checkout-btn .cart-icon {
        font-size: 1.2rem;
    }
}

@media (min-width: 360px) {
    .cart-checkout-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    .cart-checkout-btn .cart-icon {
        font-size: 1.25rem;
    }
    .cart-checkout-btn .btn-text {
        font-size: 0.8rem;
    }
}

/* Hide button text on smaller screens */
@media (max-width: 380px) {
    .cart-checkout-btn .btn-text {
        display: none;
    }
    .cart-checkout-btn {
        padding: 0.55rem;
        min-width: 40px;
        justify-content: center;
    }
}

@media (min-width: 420px) {
    .cart-checkout-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }
    .cart-checkout-btn .cart-icon {
        font-size: 1.3rem;
    }
    .cart-checkout-btn .btn-text {
        font-size: 0.85rem;
    }
}

@media (min-width: 480px) {
    .cart-checkout-btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .cart-checkout-btn .cart-icon {
        font-size: 1.35rem;
    }

    .cart-checkout-btn .btn-text {
        font-size: 0.9rem;
    }
}

.cart-checkout-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
    background: var(--primary-dark);
}

.cart-checkout-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.cart-checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cart-checkout-btn .btn-text {
    font-size: 0.95rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-badge.bump {
    animation: badgeBump 0.3s ease;
}

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

/* Category Tabs - Responsive */
.categories {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

@media (min-width: 360px) {
    .categories {
        gap: 0.4rem;
        padding: 0.6rem 0.875rem;
    }
}

@media (min-width: 400px) {
    .categories {
        gap: 0.5rem;
        padding: 0.65rem 1rem;
    }
}

@media (min-width: 480px) {
    .categories {
        gap: 0.6rem;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 600px) {
    .categories {
        gap: 0.75rem;
        padding: 0.875rem 1.5rem;
    }
}

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

.category-tab {
    flex-shrink: 0;
    padding: 0.5rem 0.875rem;
    min-height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    animation: tabPopIn 0.4s ease forwards;
    opacity: 0;
    scroll-snap-align: start;
}

@media (min-width: 340px) {
    .category-tab {
        padding: 0.55rem 0.95rem;
        font-size: 0.825rem;
        gap: 0.35rem;
    }
}

@media (min-width: 380px) {
    .category-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-height: 42px;
    }
}

@media (min-width: 420px) {
    .category-tab {
        padding: 0.65rem 1.1rem;
        font-size: 0.875rem;
        gap: 0.4rem;
    }
}

@media (min-width: 480px) {
    .category-tab {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
        gap: 0.45rem;
    }
}

@media (min-width: 600px) {
    .category-tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }
}

.category-tab:nth-child(1) { animation-delay: 0.1s; }
.category-tab:nth-child(2) { animation-delay: 0.2s; }
.category-tab:nth-child(3) { animation-delay: 0.3s; }
.category-tab:nth-child(4) { animation-delay: 0.4s; }

@keyframes tabPopIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (hover: hover) {
    .category-tab:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 20px var(--shadow);
    }
}

.category-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.5);
    transform: scale(1.05);
}

.category-tab:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.category-icon {
    font-size: 1rem;
}

@media (min-width: 360px) {
    .category-icon {
        font-size: 1.05rem;
    }
}

@media (min-width: 400px) {
    .category-icon {
        font-size: 1.1rem;
    }
}

@media (min-width: 480px) {
    .category-icon {
        font-size: 1.2rem;
    }
}

@media (min-width: 600px) {
    .category-icon {
        font-size: 1.3rem;
    }
}

/* Products Section - Responsive */
.products-section {
    padding: 0.5rem 0.75rem 90px;
}

@media (min-width: 340px) {
    .products-section {
        padding: 0.6rem 0.875rem 95px;
    }
}

@media (min-width: 380px) {
    .products-section {
        padding: 0.65rem 1rem 100px;
    }
}

@media (min-width: 480px) {
    .products-section {
        padding: 0.75rem 1.25rem 105px;
    }
}

@media (min-width: 600px) {
    .products-section {
        padding: 1rem 1.75rem 110px;
    }
}

@media (min-width: 768px) {
    .products-section {
        padding: 1.25rem 2rem 120px;
    }
}

@media (min-width: 768px) {
    .products-section {
        padding: 1.5rem 2rem 120px;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    contain: layout style;
}

@media (min-width: 320px) {
    .products-grid {
        gap: 0.6rem;
    }
}

@media (min-width: 340px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }
}

@media (min-width: 360px) {
    .products-grid {
        gap: 0.7rem;
    }
}

@media (min-width: 400px) {
    .products-grid {
        gap: 0.75rem;
    }
}

@media (min-width: 480px) {
    .products-grid {
        gap: 0.875rem;
    }
}

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

@media (min-width: 768px) {
    .products-grid {
        gap: 1.25rem;
    }
}

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

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: productCardIn 0.5s ease forwards;
    opacity: 0;
    position: relative;
    contain: layout style paint;
}

@media (min-width: 360px) {
    .product-card {
        border-radius: 14px;
    }
}

@media (min-width: 480px) {
    .product-card {
        border-radius: 18px;
    }
}

@media (min-width: 768px) {
    .product-card {
        border-radius: 24px;
    }
}

@keyframes productCardIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 50px var(--shadow);
    }
}

.product-card:active {
    transform: scale(0.97);
}

.product-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, var(--secondary) 0%, #ffe0e0 100%);
}

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

@media (min-width: 480px) {
    .product-image.placeholder {
        font-size: 3.5rem;
    }
}

@media (min-width: 768px) {
    .product-image.placeholder {
        font-size: 4rem;
    }
}

.product-info {
    padding: 0.5rem 0.6rem 0.6rem;
    position: relative;
    /* Ensure space for add button */
    padding-bottom: 3rem;
    min-height: 4rem;
}

@media (min-width: 340px) {
    .product-info {
        padding: 0.55rem 0.65rem 0.65rem;
        min-height: 4.25rem;
    }
}

@media (min-width: 380px) {
    .product-info {
        padding: 0.6rem 0.7rem 0.7rem;
        min-height: 4.5rem;
    }
}

@media (min-width: 420px) {
    .product-info {
        padding: 0.65rem 0.75rem 3rem;
        min-height: 4.75rem;
    }
}

@media (min-width: 480px) {
    .product-info {
        padding: 0.75rem 0.875rem 3.25rem;
        min-height: 5rem;
    }
}

@media (min-width: 600px) {
    .product-info {
        padding: 0.875rem 1rem 3.5rem;
        min-height: 5.5rem;
    }
}

.product-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.2;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    hyphens: auto;
}

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

@media (min-width: 420px) {
    .product-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
}

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

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

.product-description {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 380px) {
    .product-description {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 480px) {
    .product-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
}

.product-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 0.25rem;
}

@media (min-width: 380px) {
    .product-price {
        font-size: 0.95rem;
    }
}

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

@media (min-width: 600px) {
    .product-price {
        font-size: 1.1rem;
    }
}

@media (min-width: 480px) {
    .product-price {
        font-size: 1.2rem;
    }
}

.product-price::after {
    content: '₺';
}

.add-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    z-index: 10;
}

@media (min-width: 340px) {
    .add-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        bottom: 0.55rem;
        right: 0.55rem;
        font-size: 1.05rem;
    }
}

@media (min-width: 380px) {
    .add-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        bottom: 0.6rem;
        right: 0.6rem;
        font-size: 1.1rem;
    }
}

@media (min-width: 420px) {
    .add-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        bottom: 0.7rem;
        right: 0.7rem;
        font-size: 1.15rem;
    }
}

@media (min-width: 480px) {
    .add-btn {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        bottom: 0.875rem;
        right: 0.875rem;
        font-size: 1.25rem;
    }
}

@media (min-width: 600px) {
    .add-btn {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.35rem;
    }
}

@media (hover: hover) {
    .add-btn:hover {
        transform: scale(1.15) rotate(90deg);
    }
}

.add-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.add-btn:active {
    transform: scale(0.9);
}

/* Cart Drawer - Responsive */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 200;
}

.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh; /* Dynamic viewport height for mobile */
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
    contain: layout style;
}

@media (min-width: 480px) {
    .cart-drawer {
        max-width: 400px;
    }
}

@media (min-width: 768px) {
    .cart-drawer {
        max-width: 450px;
    }
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--secondary);
    min-height: 60px;
}

@media (min-width: 480px) {
    .cart-drawer-header {
        padding: 1.5rem;
    }
}

.cart-drawer-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

@media (min-width: 480px) {
    .cart-drawer-header h2 {
        font-size: 1.25rem;
    }
}

.close-cart {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) {
    .close-cart:hover {
        background: var(--primary);
        color: white;
        transform: rotate(90deg);
    }
}

.close-cart:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

@media (min-width: 480px) {
    .cart-items {
        padding: 1rem;
    }
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--secondary);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    animation: cartItemSlide 0.3s ease;
}

@media (min-width: 480px) {
    .cart-item {
        gap: 1rem;
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 0.75rem;
    }
}

@keyframes cartItemSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-image {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

@media (min-width: 480px) {
    .cart-item-image {
        width: 60px;
        height: 60px;
        min-width: 60px;
        border-radius: 12px;
        font-size: 1.5rem;
    }
}

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

.cart-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 480px) {
    .cart-item-name {
        font-size: 0.9rem;
    }
}

.cart-item-price {
    font-size: 0.75rem;
    color: var(--text-light);
}

@media (min-width: 480px) {
    .cart-item-price {
        font-size: 0.8rem;
    }
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 480px) {
    .cart-item-controls {
        gap: 0.5rem;
    }
}

.qty-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    background: white;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) {
    .qty-btn:hover {
        background: var(--primary);
        color: white;
        transform: scale(1.1);
    }
}

.qty-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-display {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.cart-drawer-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    background: var(--secondary);
    text-align: center;
    position: sticky;
    bottom: 0;
}

@media (min-width: 480px) {
    .cart-drawer-footer {
        padding: 1.5rem;
    }
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .cart-total {
        margin-bottom: 1rem;
    }
}

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

@media (min-width: 480px) {
    .cart-total-label {
        font-size: 1.125rem;
    }
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

@media (min-width: 480px) {
    .cart-total-amount {
        font-size: 1.8rem;
    }
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    min-height: 52px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.4);
}

@media (min-width: 480px) {
    .checkout-btn {
        padding: 1.2rem;
        font-size: 1.125rem;
        border-radius: 16px;
    }
}

@media (hover: hover) {
    .checkout-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 10px 35px rgba(230, 57, 70, 0.5);
    }
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.checkout-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Modal - Responsive */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    background: rgba(139, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 300;
    padding: 1rem;
}

@media (min-width: 480px) {
    .modal-overlay {
        padding: 1.5rem;
    }
}

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

.modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 70px rgba(0,0,0,0.3);
    contain: layout style;
}

@media (min-width: 480px) {
    .modal {
        border-radius: 24px;
    }
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1rem 1rem;
    border-bottom: 1px solid #eee;
    text-align: center;
    background: var(--secondary);
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

@media (min-width: 480px) {
    .modal-header {
        padding: 1.5rem;
        border-radius: 24px 24px 0 0;
    }
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

@media (min-width: 480px) {
    .modal-header h2 {
        font-size: 1.5rem;
    }
}

.modal-body {
    padding: 1rem;
}

@media (min-width: 480px) {
    .modal-body {
        padding: 1.5rem;
    }
}

.order-summary {
    background: var(--secondary);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .order-summary {
        border-radius: 16px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #ffe0e0;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .summary-item {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
}

.summary-item:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

@media (min-width: 480px) {
    .summary-item:last-child {
        font-size: 1.125rem;
    }
}

.form-group {
    margin-bottom: 0.875rem;
}

@media (min-width: 480px) {
    .form-group {
        margin-bottom: 1rem;
    }
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .form-group label {
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ffe0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

@media (min-width: 480px) {
    .form-group input,
    .form-group textarea {
        padding: 0.875rem 1rem;
        border-radius: 12px;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-footer {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        gap: 1rem;
    }
}

.modal-btn {
    flex: 1;
    padding: 0.875rem;
    min-height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 480px) {
    .modal-btn {
        padding: 1rem;
        border-radius: 12px;
        font-size: 1rem;
    }
}

.modal-btn-cancel {
    background: var(--secondary);
    color: var(--text);
}

@media (hover: hover) {
    .modal-btn-cancel:hover {
        background: #ffe0e0;
    }
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

@media (hover: hover) {
    .modal-btn-confirm:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
    }
}

.modal-btn:active {
    transform: scale(0.98);
}

.modal-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Toast - Responsive */
.toast-container {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    width: calc(100% - 2rem);
    max-width: 400px;
}

@media (min-width: 480px) {
    .toast-container {
        bottom: 1.5rem;
        width: auto;
    }
}

@media (min-width: 768px) {
    .toast-container {
        bottom: 2rem;
    }
}

.toast {
    background: white;
    color: var(--text);
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .toast {
        padding: 1rem 1.5rem;
        border-radius: 16px;
        gap: 0.75rem;
        font-size: 1rem;
    }
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, var(--accent) 0%, #ffed4e 100%);
    color: var(--dark);
}

.toast.error {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

/* Empty State - Responsive */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

@media (min-width: 480px) {
    .empty-state {
        padding: 2.5rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .empty-state {
        padding: 3rem 2rem;
    }
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

@media (min-width: 480px) {
    .empty-state-icon {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .empty-state-icon {
        font-size: 4rem;
    }
}

.empty-state-text {
    font-size: 1rem;
}

@media (min-width: 480px) {
    .empty-state-text {
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .empty-state-text {
        font-size: 1.125rem;
    }
}

/* Loading - Responsive */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 200px;
}

@media (min-width: 480px) {
    .loading {
        padding: 2.5rem;
        min-height: 250px;
    }
}

@media (min-width: 768px) {
    .loading {
        padding: 3rem;
        min-height: 300px;
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--secondary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media (min-width: 480px) {
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
}

@media (min-width: 768px) {
    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 5px;
    }
}
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-info {
    padding: 0.75rem;
}

.skeleton-title {
    height: 16px;
    width: 80%;
    margin-bottom: 0.5rem;
}

.skeleton-desc {
    height: 12px;
    width: 60%;
    margin-bottom: 0.5rem;
}

.skeleton-price {
    height: 20px;
    width: 40%;
}

/* Touch feedback improvements */
@media (pointer: coarse) {
    /* Better touch feedback for touch devices */
    .category-tab:active {
        transform: scale(0.95);
        background: rgba(230, 57, 70, 0.2);
    }

    .product-card:active {
        transform: scale(0.97);
    }

    .add-btn:active {
        transform: scale(0.9);
        background: var(--primary-dark);
    }

    .qty-btn:active {
        transform: scale(0.9);
        background: var(--primary);
        color: white;
    }

    .cart-checkout-btn:active {
        transform: scale(0.95);
    }

    .back-home-btn:active {
        transform: scale(0.9);
    }

    .modal-btn:active {
        transform: scale(0.97);
    }
}

/* Reduced motion for better accessibility */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: #e0e0e0;
    }
}

/* ==================== SUCCESS SCREEN - Responsive ==================== */
.success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    padding: 1rem;
}

.success-screen.visible {
    opacity: 1;
    visibility: visible;
}

.success-content {
    text-align: center;
    color: white;
    z-index: 2;
    animation: successContentIn 0.6s ease forwards;
    max-width: 100%;
    width: 100%;
}

@media (min-width: 480px) {
    .success-content {
        max-width: 400px;
    }
}

@media (min-width: 768px) {
    .success-content {
        max-width: 500px;
    }
}

@keyframes successContentIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    animation: successIconPop 0.5s ease 0.2s forwards;
    transform: scale(0);
}

@media (min-width: 480px) {
    .success-icon {
        width: 100px;
        height: 100px;
        margin: 0 auto 2rem;
        font-size: 3.5rem;
    }
}

@media (min-width: 768px) {
    .success-icon {
        width: 120px;
        height: 120px;
        font-size: 4rem;
    }
}

@keyframes successIconPop {
    to {
        transform: scale(1);
    }
}

.success-content h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    text-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

@media (min-width: 480px) {
    .success-content h2 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .success-content h2 {
        font-size: 3rem;
    }
}

.success-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.4rem;
}

@media (min-width: 480px) {
    .success-content p {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .success-content p {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
}

.success-content strong {
    color: var(--accent);
}

.success-message {
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .success-message {
        margin-bottom: 2rem;
    }
}

.new-order-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.9rem 2rem;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 480px) {
    .new-order-btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .new-order-btn {
        padding: 1rem 3rem;
        font-size: 1.2rem;
    }
}

@media (hover: hover) {
    .new-order-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    }
}

.new-order-btn:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

/* Confetti */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--accent);
    top: -20px;
    opacity: 0;
}

.confetti-piece:nth-child(1) {
    left: 10%;
    animation: confettiFall 3s linear 0.5s infinite;
    background: var(--accent);
    border-radius: 50%;
}

.confetti-piece:nth-child(2) {
    left: 20%;
    animation: confettiFall 3s linear 0.7s infinite;
    background: white;
    border-radius: 2px;
}

.confetti-piece:nth-child(3) {
    left: 30%;
    animation: confettiFall 3s linear 0.9s infinite;
    background: var(--accent);
    border-radius: 50%;
}

.confetti-piece:nth-child(4) {
    left: 40%;
    animation: confettiFall 3s linear 1.1s infinite;
    background: white;
    border-radius: 2px;
}

.confetti-piece:nth-child(5) {
    left: 50%;
    animation: confettiFall 3s linear 1.3s infinite;
    background: var(--accent);
    border-radius: 50%;
}

.confetti-piece:nth-child(6) {
    left: 60%;
    animation: confettiFall 3s linear 1.5s infinite;
    background: white;
    border-radius: 2px;
}

.confetti-piece:nth-child(7) {
    left: 70%;
    animation: confettiFall 3s linear 1.7s infinite;
    background: var(--accent);
    border-radius: 50%;
}

.confetti-piece:nth-child(8) {
    left: 80%;
    animation: confettiFall 3s linear 1.9s infinite;
    background: white;
    border-radius: 2px;
}

.confetti-piece:nth-child(9) {
    left: 90%;
    animation: confettiFall 3s linear 2.1s infinite;
    background: var(--accent);
    border-radius: 50%;
}

.confetti-piece:nth-child(10) {
    left: 95%;
    animation: confettiFall 3s linear 2.3s infinite;
    background: white;
    border-radius: 2px;
}

@keyframes confettiFall {
    0% {
        top: -20px;
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(100px) rotate(720deg);
    }
}

/* ==================== UTILITY & ACCESSIBILITY ==================== */
.hidden {
    display: none !important;
}

/* Focus visible for better accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link for keyboard navigation */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow: rgba(0, 0, 0, 0.4);
    }

    .product-card,
    .cart-item,
    .modal {
        border: 2px solid var(--text);
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --text: #f0f0f0;
        --text-light: #a0a0a0;
        --white: #1a1a1a;
    }

    .header,
    .cart-drawer,
    .modal {
        background: #2a2a2a;
    }

    .product-card {
        background: #2a2a2a;
    }

    .category-tab,
    .qty-btn {
        background: #3a3a3a;
        color: var(--text);
    }
    */
}

/* Print styles */
@media print {
    .welcome-screen,
    .header,
    .categories,
    .cart-drawer,
    .modal,
    .toast-container,
    .success-screen,
    .floating-items {
        display: none !important;
    }

    .products-grid {
        display: block;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-content {
        transform: scale(0.8);
    }

    .welcome-logo {
        margin-bottom: 1rem;
    }

    .welcome-logo img {
        width: 100px;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .start-order-btn {
        padding: 0.8rem 2rem;
        min-height: 48px;
    }

    /* Header adjustments for landscape */
    .header {
        min-height: 50px;
        padding: 0.5rem 1rem;
    }

    .header-logo img {
        height: 35px;
    }

    /* Products section padding for landscape */
    .products-section {
        padding: 0.5rem 1rem 80px;
    }

    /* Modal adjustments for landscape */
    .modal {
        max-height: 95vh;
    }

    /* Success screen for landscape */
    .success-content {
        transform: scale(0.85);
    }
}

/* Ultra small mobile (iPhone SE, etc.) */
@media (max-width: 340px) {
    .category-tab {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .category-icon {
        font-size: 1rem;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .add-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.2rem;
    }
}

/* Large desktop (1440px+) */
@media (min-width: 1440px) {
    .products-grid {
        gap: 1.75rem;
    }

    .product-card {
        border-radius: 28px;
    }

    .product-info {
        padding: 1.25rem;
    }
}

/* Ultra wide desktop (1920px+) */
@media (min-width: 1920px) {
    body {
        font-size: 18px;
    }

    .header {
        padding: 1.25rem 3rem;
    }

    .categories {
        padding: 1.25rem 3rem;
    }

    .products-section {
        padding: 2rem 3rem 140px;
    }

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

    .welcome-title {
        font-size: 5rem;
    }

    .welcome-subtitle {
        font-size: 1.8rem;
    }
}
        margin-bottom: 1rem;
    }

    .start-order-btn {
        padding: 0.75rem 2rem;
    }
}

/* Small mobile devices */
@media (max-width: 320px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .category-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
}

/* Large desktop */
@media (min-width: 1440px) {
    .products-section {
        padding: 2rem 3rem 140px;
    }

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

/* Ultra-wide */
@media (min-width: 1920px) {
    .products-grid {
        max-width: 1800px;
        margin: 0 auto;
    }

    .categories {
        max-width: 1800px;
        margin: 0 auto;
    }
}
