/* Cute & Cozy v3.0 - Styles */
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&family=Kosugi+Maru&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-warm: #fffbf0;
    /* Cream */
    --primary: #ff8e72;
    /* Salmon/Coral */
    --secondary: #ffc478;
    /* Soft Orange */
    --accent: #92d050;
    /* Fresh Green */
    --text-dark: #5d4037;
    /* Brown */
    --card-bg: #ffffff;

    --font-cute: 'Varela Round', 'Kosugi Maru', sans-serif;

    --shadow-soft: 0 4px 15px rgba(93, 64, 55, 0.1);
    --shadow-float: 0 10px 25px rgba(93, 64, 55, 0.15);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-warm);
    background-image: radial-gradient(var(--secondary) 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: var(--font-cute);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-y: hidden;
    user-select: none;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
}

/* Header */
header {
    background: var(--card-bg);
    padding: 15px 20px;
    border-bottom: 2px dashed rgba(93, 64, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: var(--shadow-soft);
    z-index: 10;
}

.brand {
    font-size: 1.4rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 30px;
    height: 30px;
}

/* Main */
main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px;
}

/* Category Pills */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 5px;
}

.pill {
    background: #fff;
    border: 2px solid var(--secondary);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-weight: bold;
}

.pill.active {
    background: var(--secondary);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 196, 120, 0.4);
}

/* Cute Cards */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cute-card {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cute-card:active {
    transform: scale(0.95);
}

.cute-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.card-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.1));
}

.price-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    transform: rotate(15deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stock-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* Nav Bar (Bottom) */
.nav-bar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: 50px;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    box-shadow: var(--shadow-float);
    border: 2px solid rgba(93, 64, 55, 0.05);
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn.active {
    background: var(--bg-warm);
    transform: translateY(-5px);
}

/* Cart Button */
.cart-btn {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: var(--shadow-float);
    cursor: pointer;
    border: 4px solid #fff;
    transition: 0.3s;
    z-index: 100;
}

.cart-btn:hover {
    transform: scale(1.1) rotate(-10deg);
}

.cart-bubble {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Drawer & Modals (Custom Cute Style) */
.drawer {
    position: fixed;
    inset: 0;
    background: rgba(93, 64, 55, 0.5);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.drawer.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: #fff;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
}

.drawer.open .drawer-content {
    transform: translateX(-50%) translateY(0);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    box-shadow: 0 4px 0 #e07055;
    transition: 0.1s;
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Admin Grid */
.admin-list .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    border: 1px solid #EEE;
}

/* Batch View Styles */
.batch-container {
    padding-bottom: 200px;
    /* Space for footer */
}

.batch-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.batch-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px;
    text-align: left;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
}

.batch-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.batch-table tr:nth-child(even) {
    background: #fafafa;
}

.batch-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    outline: none;
}

.batch-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 126, 103, 0.2);
}

.batch-footer {
    position: fixed;
    bottom: 60px;
    /* Above nav bar */
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.batch-summ {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.batch-summ-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.batch-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.batch-btn-checkout {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(255, 126, 103, 0.4);
    cursor: pointer;
}