/* Base Reset & Variables */
:root {
    --bg-primary: #FDFBF7;
    --bg-secondary: #EFE8DF;
    --text-main: #2D1E15;
    --text-muted: #8A7B71;
    --accent: #FF5A36;
    --accent-dark: #E84D2C;
}

body, html {
    margin: 0; 
    padding: 0;
    width: 100%; 
    height: 100dvh; /* Mobile viewport lock */
    overflow: hidden; /* No scrolling */
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at 50% 30%, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
header {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    z-index: 10;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
}

.cart-btn {
    position: relative;
    width: 48px; height: 48px;
    display: flex; justify-content: center; align-items: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cart-btn:active {
    transform: scale(0.92);
}

.cart-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
}

/* 3D Swipe Window Area */
.view-window {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    touch-action: none;
}

.bg-text {
    position: absolute;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 38vw;
    font-weight: 900;
    color: rgba(45, 30, 21, 0.03);
    pointer-events: none;
    letter-spacing: -0.05em;
}

.track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.25, 1);
}

.slide {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 35vh; /* Lift above bottom sheet */
    box-sizing: border-box;
}

.slide img {
    width: 75%;
    max-width: 340px;
    object-fit: contain;
    filter: drop-shadow(0 30px 35px rgba(0,0,0,0.2));
    animation: float 5s ease-in-out infinite;
}

/* Interactive Bottom Sheet */
.bottom-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40vh;
    background: #fff;
    border-radius: 32px 32px 0 0;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.08);
    z-index: 20;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #E0D6CB;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.25, 1);
}

.dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

.info-content {
    flex: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.info-content h1 {
    margin: 0 0 4px 0;
    font-size: 26px;
    font-weight: 700;
}

.info-content .price {
    font-size: 20px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 12px;
}

.info-content .desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.add-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.2s ease;
    font-family: inherit;
    box-shadow: 0 8px 20px rgba(255, 90, 54, 0.25);
}

.add-btn:active {
    transform: scale(0.96);
    background: var(--accent-dark);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-16px) rotate(2deg); }
}

@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.bump { animation: bump 0.3s ease-out; }

@keyframes floatUpFade {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) scale(1.5); }
}

.floating-plus {
    position: absolute;
    color: var(--accent);
    font-weight: 900;
    font-size: 26px;
    pointer-events: none;
    animation: floatUpFade 1s cubic-bezier(0.25, 1, 0.25, 1) forwards;
    z-index: 100;
}

/* Progressive Disclosure: Cart Modal */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45, 30, 21, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 40;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-modal {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 80vh;
    background: #fff;
    border-radius: 32px 32px 0 0;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
}

.cart-modal.active {
    transform: translateY(0);
}

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

.cart-header h2 {
    margin: 0;
    font-size: 24px;
}

.icon-btn {
    background: #F4F0EB; 
    border: none; 
    padding: 10px; 
    border-radius: 50%;
    cursor: pointer; 
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    touch-action: pan-y;
}

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

.cart-item img {
    width: 64px; height: 64px;
    object-fit: contain;
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 8px;
}

.cart-item-details h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
}

.cart-item-details p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.cart-item-qty {
    margin-left: auto;
    font-weight: 700;
    background: #F4F0EB;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.empty-cart {
    text-align: center;
    color: var(--text-muted);
    margin-top: 60px;
    font-size: 18px;
}

.cart-footer {
    padding-top: 24px;
    margin-top: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 800;
}

.cart-footer .add-btn {
    margin-top: 0;
}