:root {
    --primary-red: #fe2c55;
    --primary-black: #161823;
    --secondary-gray: #f1f1f2;
    --text-main: #161823;
    --text-muted: #757575;
    --price-red: #ff3b30;
    --flash-deal-gradient: linear-gradient(90deg, #ff1e5e 0%, #ff5c2c 100%);
    --bg-white: #ffffff;
    --border-color: #f1f1f2;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: #f8f8f8;
    color: var(--text-main);
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
    max-width: 450px; /* More mobile-like */
    margin: 0 auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    background: var(--bg-white);
    min-height: 100vh;
    padding-bottom: 100px; /* Space for sticky bar */
}

/* Header */
header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.back-icon {
    font-size: 24px;
}

.search-bar {
    flex: 1;
    background: var(--secondary-gray);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-muted);
}

.search-bar i {
    margin-right: 8px;
}

.header-icons {
    display: flex;
    gap: 16px;
    font-size: 20px;
}

.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-red);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
}

/* Product Gallery */
.gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.gallery-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-container img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    pointer-events: none;
}

/* Flash Deal */
.flash-deal {
    background: var(--flash-deal-gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.discount-tag {
    background: white;
    color: var(--primary-red);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 8px;
}

.current-price {
    font-size: 24px;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.8;
    font-size: 14px;
}

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

.timer-label {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.timer-countdown {
    font-weight: bold;
    font-size: 14px;
}

/* Product Info */
.product-content {
    padding: 16px;
}

.installments {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 12px;
}

.promotion-banner {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.promo-tag {
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(254, 44, 85, 0.05);
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.product-title span {
    flex: 1;
}

.bookmark-icon {
    margin-left: 12px;
    font-size: 20px;
}

.stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.rating {
    display: flex;
    align-items: center;
    color: #ffb800;
}

.sold-count {
    color: var(--text-muted);
}

/* Sections */
.info-section {
    padding: 16px;
    border-top: 8px solid #f8f8f8;
}

.section-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-item:last-child {
    margin-bottom: 0;
}

.item-left {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.item-icon {
    color: var(--text-muted);
    font-size: 18px;
}

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

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

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #444;
}

.check-item i {
    color: #ff8a00;
}

/* Creator Videos */
.creator-videos {
    padding: 16px;
    border-top: 8px solid #f8f8f8;
}

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

.video-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.video-card {
    min-width: 120px;
    aspect-ratio: 9/16;
    background: #eee;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 20px;
}

.video-author {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.author-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid white;
}

/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background: white;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: var(--text-main);
    gap: 4px;
}

.nav-item i {
    font-size: 20px;
}

.btn-add {
    flex: 1;
    background: #f1f1f2;
    border: none;
    height: 48px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:active {
    background: #e5e5e6;
}

.btn-buy {
    flex: 1.2;
    background: linear-gradient(90deg, #ff0050 0%, #ff2c55 100%);
    color: white;
    border: none;
    height: 48px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-buy:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.buy-text {
    font-weight: 700;
    font-size: 15px;
}

.buy-subtext {
    font-size: 10px;
    opacity: 0.9;
}

/* Modal / Checkout Flow */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-end;
}

.checkout-modal {
    background: white;
    width: 100%;
    max-width: 500px;
    height: 92vh;
    border-radius: 24px 24px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f1f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header .close-btn {
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-header .close-btn:hover {
    background: #f1f1f2;
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    background: #fffafb;
    border-bottom: 1px solid #ffecf0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.progress-dot {
    width: 24px;
    height: 24px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s;
}

.progress-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.active .progress-dot {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 0 0 4px #ffecf0;
}

.progress-step.active .progress-label {
    color: var(--primary-red);
}

.progress-step.completed .progress-dot {
    background: #00c950;
    color: white;
}

.checkout-steps-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 100px;
}

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

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

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

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fcfcfc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: #fff;
    box-shadow: 0 0 0 4px #ffecf0;
}

.btn-primary {
    width: 100%;
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.3);
    transition: all 0.2s;
}

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

.checkout-footer-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    opacity: 0.6;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
}

.badge-item i {
    font-size: 18px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    animation: fadeIn 0.2s ease;
}

.lightbox-img {
    max-width: 95%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.review-photo {
    cursor: zoom-in;
    transition: transform 0.2s;
}

.review-photo:hover {
    filter: brightness(0.9);
}

.show-more-btn {
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    margin-left: 4px;
}

.show-more-btn:hover {
    text-decoration: underline;
}

/* Coupon Claimed State */
.btn-resgatar.claimed {
    background: #f1f1f2 !important;
    color: var(--text-muted) !important;
    pointer-events: none;
}

.coupon-item.claimed {
    border-color: #ddd !important;
    background: #f9f9f9 !important;
}

/* Reviews Section */
.reviews-section {
    padding: 16px;
    border-top: 8px solid #f8f8f8;
}

.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 20px;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    background: #f1f1f2;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #161823;
}

.chip.active {
    background: #161823;
    color: white;
}

.chip i {
    font-size: 10px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review-item {
    border-bottom: 1px solid #f1f1f2;
    padding-bottom: 16px;
}

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

.review-user {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.default-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f1f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 18px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #161823;
}

.review-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
}

.review-stars i {
    color: #ffbc0d;
    font-size: 12px;
}

.review-item-type {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.review-content {
    font-size: 14px;
    line-height: 1.5;
    color: #161823;
    margin-bottom: 12px;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.review-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.review-actions i {
    color: var(--text-muted);
    font-size: 16px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.review-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.review-images::-webkit-scrollbar {
    display: none;
}

.review-photo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #f1f1f2;
}
