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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #FFF0FA;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 100, 180, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(160, 80, 255, 0.08) 0%, transparent 40%);
    color: #2D1B4E;
    font-size: 18px;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.kiosk-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

/* Header */
.kiosk-header {
    background: linear-gradient(135deg, #FF2D78, #C020E0);
    color: white;
    padding: 20px 24px;
    border-radius: 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 24px rgba(255, 45, 120, 0.35);
    position: relative;
    overflow: hidden;
}

.kiosk-header::before {
    content: '✦ ✦ ✦';
    position: absolute;
    right: 20px;
    top: 6px;
    font-size: 11px;
    opacity: 0.3;
    letter-spacing: 4px;
}

.kiosk-header::after {
    content: '⭐ 🌟 ⭐';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    font-size: 10px;
    opacity: 0.25;
    letter-spacing: 6px;
}

.kiosk-header h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.kiosk-header .cart-link {
    background: rgba(255,255,255,0.2);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}

/* Promotion Banner */
.promotion-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.promotion-card {
    min-width: 300px;
    background: linear-gradient(135deg, #7B2FBE, #C020E0);
    color: white;
    padding: 24px;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(123, 47, 190, 0.3);
    position: relative;
    overflow: hidden;
}

.promotion-card::after {
    content: '🎊';
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 32px;
    opacity: 0.3;
}

.promotion-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.promotion-card p {
    font-size: 15px;
    opacity: 0.9;
}

/* Section Title */
.section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #2D1B4E;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 22px;
    background: linear-gradient(180deg, #FF2D78, #C020E0);
    border-radius: 3px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, #FF2D78, #FFD700, #C020E0);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-card:active {
    transform: scale(0.96);
}

.category-card:active::before {
    opacity: 1;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2D1B4E;
}

.category-card p {
    font-size: 13px;
    color: #9B7EC8;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    transition: transform 0.15s;
    cursor: pointer;
    border: 2px solid #F3E8FF;
}

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

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #F9E8FF, #FFE8F4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    position: relative;
}

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

.badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #FF2D78, #FF6CAE);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 45, 120, 0.4);
}

.badge-soldout {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #C8C0D0;
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 16px;
}

.product-info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2D1B4E;
}

.product-info .age {
    font-size: 12px;
    color: #9B7EC8;
    margin-bottom: 8px;
}

.product-info .price {
    font-size: 20px;
    font-weight: 800;
    color: #FF2D78;
}

/* Product Detail */
.product-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.12);
    border: 2px solid #F3E8FF;
}

.product-detail-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #F9E8FF, #FFE8F4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-body {
    padding: 24px;
}

.product-detail-body h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #2D1B4E;
}

.product-detail-body .age {
    font-size: 14px;
    color: #9B7EC8;
    margin-bottom: 12px;
}

.product-detail-body .description {
    font-size: 16px;
    color: #6B5A82;
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-detail-body .price {
    font-size: 30px;
    font-weight: 800;
    color: #FF2D78;
    margin-bottom: 8px;
}

.stock-info {
    font-size: 14px;
    color: #9B7EC8;
    margin-bottom: 20px;
}

.stock-info .in-stock {
    color: #28C76F;
    font-weight: 700;
}

.stock-info .out-of-stock {
    color: #FF2D78;
    font-weight: 700;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-size: 18px;
    font-weight: 700;
    color: #2D1B4E;
}

.quantity-selector input {
    width: 80px;
    height: 48px;
    text-align: center;
    font-size: 20px;
    border: 2px solid #E8D5FF;
    border-radius: 16px;
    outline: none;
    color: #2D1B4E;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    width: 100%;
}

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

.btn-primary {
    background: linear-gradient(135deg, #FF2D78, #C020E0);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 45, 120, 0.35);
}

.btn-secondary {
    background: #F3E8FF;
    color: #7B2FBE;
    border: 2px solid #E8D5FF;
}

.btn-danger {
    background: linear-gradient(135deg, #FF2D78, #FF6CAE);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28C76F, #00CFB4);
    color: white;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    width: auto;
}

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

/* Cart */
.cart-list {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    margin-bottom: 20px;
    border: 2px solid #F3E8FF;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #F3E8FF;
    gap: 16px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F9E8FF, #FFE8F4);
    border-radius: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

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

.cart-item-info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2D1B4E;
}

.cart-item-info .price {
    font-size: 16px;
    color: #FF2D78;
    font-weight: 700;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-actions input {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 16px;
    border: 2px solid #E8D5FF;
    border-radius: 12px;
}

.cart-total {
    background: white;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #F3E8FF;
}

.cart-total .label {
    font-size: 20px;
    font-weight: 700;
    color: #2D1B4E;
}

.cart-total .amount {
    font-size: 26px;
    font-weight: 800;
    color: #FF2D78;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    color: #9B7EC8;
    font-size: 18px;
    border: 2px solid #F3E8FF;
}

/* Order Complete */
.order-complete {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 40px 24px;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    border: 2px solid #F3E8FF;
}

.order-complete .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.order-complete h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #2D1B4E;
}

.order-complete .order-number {
    font-size: 16px;
    color: #9B7EC8;
    margin-bottom: 8px;
}

.order-complete .total {
    font-size: 24px;
    font-weight: 800;
    color: #FF2D78;
    margin-bottom: 8px;
}

.order-complete .status {
    font-size: 18px;
    margin-bottom: 24px;
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-paid {
    background: #D4EDDA;
    color: #155724;
}

.status-cancelled {
    background: #F8D7DA;
    color: #721C24;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #9B7EC8;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-group .btn {
    flex: 1;
}

/* Error Page */
.error-container {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    margin-top: 20px;
    border: 2px solid #F3E8FF;
}

.error-container h2 {
    color: #FF2D78;
    margin-bottom: 12px;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #2D1B4E, #7B2FBE);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(45, 27, 78, 0.3);
}

.admin-header h1 {
    font-size: 22px;
    font-weight: 800;
}

.admin-nav {
    display: flex;
    gap: 8px;
}

.admin-nav a {
    color: rgba(255,255,255,0.7);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    transition: background 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.admin-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.08);
    margin-bottom: 20px;
    border: 2px solid #F3E8FF;
}

.admin-card h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #2D1B4E;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.08);
    border: 2px solid #F3E8FF;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 800;
    color: #7B2FBE;
}

.stat-card .label {
    font-size: 14px;
    color: #9B7EC8;
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #F3E8FF;
}

th {
    font-weight: 700;
    color: #9B7EC8;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 15px;
    color: #2D1B4E;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 14px;
    color: #7B2FBE;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E8D5FF;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    color: #2D1B4E;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #C020E0;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.btn-admin {
    padding: 10px 20px;
    font-size: 14px;
    width: auto;
}

.text-right {
    text-align: right;
}

/* Tag Grid (home) */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.tag-card {
    background: white;
    border-radius: 20px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    transition: transform 0.15s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 2px solid #F3E8FF;
}

.tag-card:active {
    transform: scale(0.93);
    background: linear-gradient(135deg, #FFF0FA, #F3E8FF);
}

.tag-emoji {
    font-size: 36px;
}

.tag-name {
    font-size: 14px;
    font-weight: 700;
    color: #7B2FBE;
}

/* Tag Tabs (tag products page) */
.tag-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.tag-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    border-radius: 50px;
    background: #F3E8FF;
    color: #7B2FBE;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s;
}

.tag-tab.active {
    background: linear-gradient(135deg, #FF2D78, #C020E0);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 45, 120, 0.3);
}

/* Product Tags (detail page) */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #F3E8FF;
    font-size: 14px;
    font-weight: 600;
    color: #7B2FBE;
    transition: background 0.2s;
}

.product-tag:hover {
    background: #E8D5FF;
}

/* Upcoming Banner (home) */
.upcoming-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #FFD700, #FFAA00);
    color: #2D1B00;
    padding: 20px 24px;
    border-radius: 20px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 4px 16px rgba(255, 170, 0, 0.35);
}

.upcoming-banner:active {
    transform: scale(0.98);
}

.upcoming-icon {
    font-size: 36px;
}

.upcoming-banner h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
}

.upcoming-banner p {
    font-size: 14px;
    opacity: 0.75;
}

.upcoming-arrow {
    margin-left: auto;
    font-size: 24px;
    font-weight: 800;
}

/* Upcoming List (page) */
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upcoming-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(160, 80, 255, 0.1);
    display: flex;
    border: 2px solid #F3E8FF;
}

.upcoming-card-image {
    width: 120px;
    min-height: 120px;
    background: linear-gradient(135deg, #FFE8F4, #F3E8FF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
}

.upcoming-card-body {
    padding: 16px;
    flex: 1;
}

.upcoming-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2D1B4E;
}

.upcoming-card-body .description {
    font-size: 13px;
    color: #6B5A82;
    margin-bottom: 8px;
    line-height: 1.4;
}

.upcoming-date {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFAA00);
    color: #2D1B00;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.upcoming-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.upcoming-meta .age,
.upcoming-meta .category {
    font-size: 12px;
    color: #9B7EC8;
    background: #F3E8FF;
    padding: 2px 10px;
    border-radius: 50px;
}

.price-tbd {
    color: #9B7EC8 !important;
    font-weight: 600 !important;
}

.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
