:root {
    --primary: #C75B39;
    --primary-dark: #A44A2D;
    --primary-light: #E88B6B;
    --secondary: #2D2D2D;
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #E0E0E0;
    --success: #28A745;
    --error: #DC3545;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
}

.splash-hidden {
    opacity: 0;
}

#splash-screen {
    position: fixed;
    inset: 0;
    background-image: url('/imgapp/imgapp.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.splash-hide {
    opacity: 0;
    transform: scale(1.05);
}

.header {
    background: var(--surface);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.stepper-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.stepper-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stepper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    margin: 0 auto;
    transition: all 0.3s;
}

.stepper-item.active .stepper-label {
    color: var(--primary);
    font-weight: 600;
}

.stepper-item.active .stepper-dot {
    background: var(--primary);
    width: 10px;
    height: 10px;
}

.stepper-item.completed .stepper-dot {
    background: var(--success);
}

.stepper-item.completed .stepper-label {
    color: var(--success);
}

.stepper-line {
    position: absolute;
    top: 22px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: -1;
}

.stepper-item:last-child .stepper-line {
    display: none;
}

.main-content {
    padding: 16px;
}

.step-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-panel.active {
    display: block;
}

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

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.size-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.size-card:hover {
    border-color: var(--primary-light);
}

.size-card.selected {
    border-color: var(--primary);
    background: rgba(199, 91, 57, 0.05);
}

.size-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--background);
    color: var(--primary);
    font-size: 26px;
}

.size-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.size-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.size-info {
    font-size: 12px;
    color: var(--text-muted);
}

.flavor-mode-container {
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.flavor-mode-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.flavor-mode-options {
    display: flex;
    gap: 8px;
}

.flavor-mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.flavor-mode-btn:hover {
    border-color: var(--primary-light);
}

.flavor-mode-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 16px;
    background: var(--background);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    background: var(--primary-light);
    color: white;
}

.category-tab.active {
    background: var(--primary);
    color: white;
}
.category-tab .tab-counter {
    display:inline-block;
    background: #ffe9a3;
    color: #8a5a00;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    margin-left: 6px;
    vertical-align: middle;
}

.pizza-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pizza-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pizza-card:hover {
    box-shadow: var(--shadow);
}

.pizza-card.selected {
    border-color: var(--primary);
    background: rgba(199, 91, 57, 0.05);
}

.pizza-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #FFA07A, #FF6347);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
}

.pizza-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pizza-image i {
    color: #fff;
}

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

.pizza-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pizza-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pizza-prices {
    font-size: 12px;
    color: var(--text-muted);
}

.pizza-prices span {
    margin-right: 8px;
}

.pizza-prices .price-highlight {
    color: var(--primary);
    font-weight: 600;
}

.promo-badge {
    display: inline-block;
    background: #ffe9a3;
    color: #8a5a00;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    margin-left: 6px;
}

.promo-chip {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(199, 91, 57, 0.12);
    color: #C75B39;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.promo-card {
    background: var(--surface);
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}
.promo-card .promo-line + .promo-line {
    margin-top: 6px;
}
.promo-card .soft-bold {
    font-weight: 600;
    color: var(--text-primary);
}
.promo-section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}
.promo-section-title {
    font-weight: 700;
    margin-bottom: 8px;
    display:flex;
    align-items:center;
    gap:8px;
}
.promo-section-item {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 8px;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    margin-top: 8px;
}
.promo-section-item .promo-label {
    color: var(--text-secondary);
}
.promo-section-item .promo-value {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}
.promo-section-item .promo-hint {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 12px;
}
.promo-actions {
    grid-column: 1 / -1;
    display:flex;
    gap:8px;
    margin-top:4px;
}
.promo-warning {
    grid-column: 1 / -1;
    background: #fff8e1;
    color: #8a5a00;
    border: 1px dashed #e0c080;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin: 6px 0 2px 0;
    font-size: 12px;
}

.selection-counter {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.cart-section {
    margin-bottom: 24px;
}

.cart-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #FFA07A, #FF6347);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-details {
    font-size: 12px;
    color: var(--text-secondary);
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.qty-value {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.addon-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.addon-card:hover {
    border-color: var(--primary-light);
}

.addon-card.selected {
    border-color: var(--primary);
    background: rgba(199, 91, 57, 0.05);
}

.addon-image {
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.addon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.addon-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.addon-price {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
}

.beverage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.beverage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.beverage-image {
    width: 50px;
    height: 50px;
    background: var(--background);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.beverage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.beverage-info {
    flex: 1;
}

.beverage-name {
    font-size: 14px;
    font-weight: 600;
}

.beverage-volume {
    font-size: 12px;
    color: var(--text-muted);
}

.beverage-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-right: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(199, 91, 57, 0.1);
}

:focus-visible {
    outline: 3px solid rgba(199, 91, 57, 0.35);
    outline-offset: 2px;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.address-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.address-card:hover {
    border-color: var(--primary-light);
}

.address-card.selected {
    border-color: var(--primary);
    background: rgba(199, 91, 57, 0.05);
}

.address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.address-label {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.address-label i {
    color: var(--primary);
}

.address-change {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.address-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.new-address-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    background: transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.new-address-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.address-form {
    display: none;
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.address-form.visible {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.order-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
}

.summary-change {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.summary-items {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-item-name {
    color: var(--text-secondary);
}

.summary-item-value {
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 16px;
    font-weight: 700;
}

.summary-total .total-value {
    color: var(--primary);
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary-light);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(199, 91, 57, 0.05);
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: var(--background);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.payment-label {
    font-size: 14px;
    font-weight: 600;
}

.payment-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-actions {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    padding: 16px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    z-index: 100;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.footer-nav {
    display: flex;
    gap: 12px;
}

.footer-nav .btn {
    flex: 1;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 1000;
    display: none;
    animation: slideDown 0.3s ease;
}

.toast.show {
    display: block;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.success-screen {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.success-message {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.order-number {
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.order-number-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.order-number-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.delivery-time {
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.delivery-time-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.delivery-time-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

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

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

.help-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
}

.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.help-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.help-toggle {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.help-content {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    display: none;
}

.help-card.expanded .help-content {
    display: block;
}

@media (max-width: 360px) {
    .size-grid {
        grid-template-columns: 1fr;
    }
    
    .addon-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
