/* Order Page Specific Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
    color: #333;
}

/* 언어별 폰트 적용 */
html[lang="ko"] body {
    font-family: 'Noto Sans KR', sans-serif;
}

html[lang="en"] body {
    font-family: 'Noto Sans', sans-serif;
}

html[lang="zh"] body {
    font-family: 'Noto Sans SC', sans-serif;
}

html[lang="ja"] body {
    font-family: 'Noto Sans JP', sans-serif;
}

/* Navigation */
.order-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-logo h2 {
    color: #2c5282;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2c5282;
}

.nav-link.active {
    color: #2c5282;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #2c5282;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Order Header */
.order-header {
    background: #667eea;
    color: white;
    padding: 1rem;
    position: fixed;
    top: 60px; /* Below navigation */
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.order-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.wifi-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.wifi-icon {
    font-size: 1.2rem;
    cursor: pointer;
}

.wifi-details {
    display: none;
    position: absolute;
    top: 50px;
    right: 10px;
    background: white;
    color: #333;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.8rem;
    min-width: 150px;
    pointer-events: none;
}

.wifi-info:hover .wifi-details {
    display: block;
}

.wifi-icon:hover {
    transform: scale(1.1);
    color: #4ecdc4;
}

/* Main Content */
.order-container {
    margin-top: 130px; /* Account for both nav and header */
    padding: 1rem;
}

/* Category Sections */
.category-section {
    margin-bottom: 2rem;
}

.category-title {
    background: #667eea;
    color: white;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

/* Menu Grid - 3 items per row */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* Simple Grid for Restaurant Order */
.simple-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .simple-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .simple-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
}

.menu-card {
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.menu-card:active {
    transform: translateY(0);
    background: #f0f8ff;
}

/* Large Card for Restaurant Order */
.large-card {
    padding: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

.large-card .menu-image {
    width: 100%;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.large-card .menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.large-card .menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.large-card .menu-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 0.5rem;
}

.large-card .menu-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.large-card .menu-detail {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;
}

.large-card .menu-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e53e3e;
    margin-bottom: 1rem;
}

.order-button {
    background: #2c5282;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: stretch;
}

.order-button:hover {
    background: #2a4365;
    transform: translateY(-1px);
}

.order-button:active {
    transform: translateY(0);
}

.menu-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.menu-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.menu-price {
    color: #e53e3e;
    font-weight: 700;
    font-size: 0.9rem;
}

.menu-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-weight: 500;
}

.menu-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #4ecdc4;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Order Summary */
.order-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.order-summary.active {
    display: block;
}

.summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.total-items {
    font-weight: 600;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e53e3e;
}

.order-btn {
    width: 100%;
    background: #2c5282;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-btn:hover {
    background: #2a4365;
}

/* Quantity Controls */
.quantity-controls {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-controls.active {
    display: flex;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-number {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

/* Special Styles for Different Categories */
.makhoé-series .menu-card {
    border-left: 4px solid #ff6b6b;
}

.mulhoe-series .menu-card {
    border-left: 4px solid #4ecdc4;
}

.hansang-series .menu-card {
    border-left: 4px solid #ffa726;
}

.drinks-series .menu-card {
    border-left: 4px solid #9c27b0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .menu-grid {
        gap: 0.5rem;
    }
    
    .menu-card {
        padding: 0.5rem;
    }
    
    .menu-image {
        height: 70px;
    }
    
    .menu-name {
        font-size: 0.8rem;
    }
    
    .menu-price {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .menu-image {
        height: 60px;
    }
    
    .menu-name {
        font-size: 0.75rem;
    }
}

/* WiFi Modal Styles */
.wifi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.wifi-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.wifi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.wifi-modal-header h3 {
    margin: 0;
    color: #2c5282;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.wifi-modal-body {
    padding: 1.5rem;
}

.wifi-info-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4ecdc4;
}

.connecting-animation {
    text-align: center;
    padding: 2rem 1rem;
}

.wifi-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

.success-message {
    text-align: center;
    padding: 2rem 1rem;
}

.manual-steps {
    background: #fff8dc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffa726;
}

.manual-steps ol,
.connection-steps ol,
.desktop-guide ol {
    margin: 0.5rem 0 0 1rem;
}

.manual-steps li,
.connection-steps li,
.desktop-guide li {
    margin-bottom: 0.5rem;
}

.connection-steps {
    background: #f0f8ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #2c5282;
}

.guide-message {
    text-align: center;
    padding: 1rem 0;
}

.desktop-guide {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.wifi-note {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #666;
}

.fallback-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.fallback-message p {
    margin: 0.25rem 0;
}

.quick-guide {
    text-align: center;
    padding: 1rem 0;
}

.highlight {
    background: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    color: #856404;
}

.wifi-info-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.success-btn {
    background: #28a745;
    color: white;
}

.success-btn:hover {
    background: #218838;
}

.manual-buttons, .connection-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wifi-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auto-btn {
    background: #4ecdc4;
    color: white;
}

.auto-btn:hover {
    background: #45b7b8;
}

.manual-btn, .settings-btn {
    background: #2c5282;
    color: white;
}

.manual-btn:hover, .settings-btn:hover {
    background: #2a4365;
}

.primary-btn {
    background: #2c5282;
    color: white;
}

.primary-btn:hover {
    background: #2a4365;
}

.secondary-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.secondary-btn:hover {
    background: #edf2f7;
}

.ios-instructions {
    background: #fff8dc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffa726;
}

.ios-instructions ol {
    margin: 0.5rem 0 0 1rem;
}

.ios-instructions li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .wifi-info {
        order: -1;
    }

    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo h2 {
        font-size: 1.1rem;
    }
}

/* Mobile responsiveness for modal */
@media (max-width: 480px) {
    .wifi-modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .wifi-modal-header, .wifi-modal-body {
        padding: 1rem;
    }
    
    .wifi-qr {
        width: 150px;
        height: 150px;
    }
    
    .manual-buttons, .connection-options {
        gap: 0.5rem;
    }
    
    .wifi-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}