:root {
    --color-bg: #fffbf0;
    --color-text: #4a3b32;
    --color-accent: #a0522d;
    --color-secondary: #d2b48c;
    --color-white: #ffffff;

    --font-heading: 'Gowun Batang', serif;
    --font-body: 'Outfit', sans-serif;

    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: var(--color-text);
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background-color: rgba(255, 251, 240, 0.9);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list a {
    font-weight: 500;
    font-size: 1rem;
}

.nav-list a:hover {
    color: var(--color-accent);
}

.nav-list a.active {
    font-weight: 700;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../assets/bam_cake_hero.jpg');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.about-image-container {
    flex: 1 1 300px;
    max-width: 400px;
}

.about-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-text-container {
    flex: 1 1 300px;
}

.about-text {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text);
}

/* Menu Section */
.menu-category h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.menu-category {
    margin-bottom: var(--spacing-lg);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background-color: var(--color-white);
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-item:hover {
    transform: translateY(-5px);
}

.menu-img-box {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.menu-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.menu-item:hover .menu-img-box img {
    transform: scale(1.05);
}

.menu-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.menu-info h4 {
    font-size: 1.2rem;
    color: var(--color-accent);
    margin: 0;
}

.price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    font-size: 1.1rem;
}

.menu-info p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Seasonal */
.seasonal {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.seasonal .section-title {
    color: var(--color-text);
}

.seasonal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.seasonal-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.seasonal-item h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.seasonal-price {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.5);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* Location Section */
.location {
    background-color: var(--color-bg);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.info-item p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.location-map {
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.map-placeholder p {
    font-size: 1.2rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .location-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .map-placeholder {
        height: 200px;
    }
}

/* Footer */
.footer {
    background-color: var(--color-text);
    color: var(--color-secondary);
    padding: 2rem 0;
    text-align: center;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    margin: 0 10px;
    color: var(--color-secondary);
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
}

.auth-box {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.full-width {
    width: 100%;
    border: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--color-accent);
    font-weight: 600;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background-color: var(--color-secondary);
    color: #fff;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-control button {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.remove-btn {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: right;
}

.total-row {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* My Page */
.mypage-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.profile-card,
.order-history {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.order-card {
    border: 1px solid #eee;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.order-status {
    color: var(--color-accent);
    font-weight: bold;
}

.order-items {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.order-total {
    font-weight: bold;
    color: var(--color-text);
}

.order-number {
    color: #888;
    margin-bottom: 0.5rem;
}

/* Header badge */
.cart-icon-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Add to Cart Button */
.add-btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.6rem;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--color-white);
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.modal-items li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.modal-total {
    padding: 1rem 0;
    border-top: 2px solid var(--color-accent);
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    text-align: center;
}

/* ========== Admin Page Styles ========== */
.admin-badge {
    font-size: 0.7rem;
    background: var(--color-accent);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.admin-section {
    padding-top: 100px;
    min-height: 100vh;
    background: #f5f5f5;
}

/* Order Filters */
.order-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--color-secondary);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Order Stats */
.order-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    font-family: var(--font-heading);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

/* Admin Order List */
.admin-order-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.admin-order-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.admin-order-card[data-status="주문 완료"] {
    border-left: 5px solid #e74c3c;
    animation: pulse 2s infinite;
}

.admin-order-card[data-status="준비 중"] {
    border-left: 5px solid #f39c12;
}

.admin-order-card[data-status="준비 완료"] {
    border-left: 5px solid #27ae60;
}

.admin-order-card[data-status="수령 완료"] {
    border-left: 5px solid #95a5a6;
    opacity: 0.7;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4); }
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.order-number-large {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.order-status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.order-card-body {
    padding: 1.2rem;
}

.customer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #eee;
}

.customer-info strong {
    font-size: 1.1rem;
    color: var(--color-text);
}

.customer-info span {
    color: #888;
    font-size: 0.9rem;
}

.order-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.order-item-tag {
    background: #f0f0f0;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #555;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.order-time {
    color: #888;
}

.wait-time {
    color: var(--color-accent);
    font-weight: 500;
}

.order-total {
    font-weight: 700;
    color: var(--color-text);
}

.order-card-actions {
    padding: 1rem 1.2rem;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.status-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.status-btn:hover {
    opacity: 0.9;
}

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

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

.completed-badge {
    display: block;
    text-align: center;
    padding: 0.9rem;
    background: #ecf0f1;
    border-radius: 10px;
    color: #95a5a6;
    font-weight: 600;
}

.loading-text, .empty-text {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mypage-layout {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .nav-list a {
        font-size: 1.5rem;
    }

    /* Admin mobile */
    .order-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-order-list {
        grid-template-columns: 1fr;
    }

    .order-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .filter-btn {
        flex-shrink: 0;
    }
}