:root {
    /* Colors */
    --bg-color: #E6E8F0; /* Off-white / light blueish gray as in reference */
    --card-bg: #F4F5F9;
    --text-main: #1A1A1A;
    --text-secondary: #737373;
    --accent: #61001D; /* Deep burgundy for adega theme */
    --accent-red: #E63946; /* For hearts */
    --white: #FFFFFF;
    
    /* Typography */
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #333; /* Dark background for desktop to highlight the mobile container */
    font-family: var(--font-family);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 400px;
    height: 100vh; /* Full viewport height on mobile */
    max-height: 850px;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    /* Soft rounded corners for app look on desktop */
    border-radius: 40px; 
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    background-color: var(--bg-color);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 100px; /* Extra space so the WhatsApp button doesn't block the bottom content */
}

/* Hide scrollbar for entire screen but keep functionality */
.screen::-webkit-scrollbar { display: none; }
.screen { -ms-overflow-style: none; scrollbar-width: none; }

#home-screen {
    transform: translateX(0);
    opacity: 1;
    z-index: 1;
}

#home-screen.hidden {
    transform: translateX(-30%);
    opacity: 0;
    pointer-events: none;
}

#details-screen {
    transform: translateX(100%);
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    background-color: var(--bg-color);
}

#details-screen.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px 16px;
    z-index: 20;
}

.app-header.transparent {
    position: absolute;
    top: 0;
    width: 100%;
    background: transparent;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn.bg-white {
    background-color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.text-red {
    color: var(--accent-red);
}

.notification-btn {
    position: relative;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
    border: 2px solid var(--bg-color);
}

.brand-logo {
    font-size: 20px;
    font-weight: 600;
}

/* Highlight Card */
.main-highlight {
    background-color: var(--white);
    border-radius: 24px;
    margin: 10px 20px;
    padding: 20px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    /* For the Nike reference style, it looks like a large card with image on top */
    display: flex;
    flex-direction: column;
}

@keyframes pulse-attention {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.main-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    animation: pulse-attention 2s infinite ease-in-out;
}

.badge-text {
    font-size: 11px;
    font-weight: 900;
    color: #e60023;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(230, 0, 35, 0.2);
}

.badge-discount {
    background: linear-gradient(135deg, #ff0f7b, #f89b29);
    color: white;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 15, 123, 0.4);
}

.highlight-info h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.old-price {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.highlight-image-wrapper {
    width: 100%;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.highlight-image {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.3));
    transform: rotate(-15deg);
}

.favorite-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
}

/* Special Deals */
.special-deals {
    margin-top: 24px;
}

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

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.see-all {
    background: none;
    border: none;
    color: var(--accent-red);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

/* Carousel */
.carousel {
    display: flex;
    gap: 16px;
    padding: 12px 20px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

/* Hide Scrollbar */
.carousel::-webkit-scrollbar { display: none; }
.carousel { -ms-overflow-style: none; scrollbar-width: none; }

.product-card {
    min-width: 140px;
    background-color: var(--white);
    border-radius: 20px;
    padding: 16px;
    position: relative;
    scroll-snap-align: start;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    cursor: pointer;
}

.discount-tag {
    position: absolute;
    top: -8px;
    right: 10px;
    background-color: var(--accent-red);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.card-img-wrapper {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.card-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(0,0,0,0.2));
    transform: rotate(-10deg);
}

.card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-rating {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 8px;
}

.card-rating i {
    color: #FFB800;
}

.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    font-weight: 700;
    font-size: 14px;
}

.card-fav-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
}

.card-fav-btn.active {
    color: var(--accent-red);
}




/* DETAILS SCREEN */
.product-hero {
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.circles-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background-color: transparent;
}

.circle-1 { width: 220px; height: 220px; border-width: 25px; }
.circle-2 { width: 330px; height: 330px; border-width: 35px; }
.circle-3 { width: 450px; height: 450px; border-width: 45px; }

.product-image-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    height: auto;
    align-items: center;
    z-index: 2;
}

.product-image-carousel::-webkit-scrollbar {
    display: none;
}

.product-large-image {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    scroll-snap-align: center;
    z-index: 2;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
}

.indicator-dot.active {
    background-color: var(--accent);
    transform: scale(1.2);
}

.product-details-content {
    background-color: var(--bg-color);
    flex: 1;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    padding: 24px 20px 40px;
    z-index: 3;
    display: flex;
    flex-direction: column;
}

.product-details-content h2 {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 12px;
}

.price-rating-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price.large {
    font-size: 24px;
}

.rating {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
}

.rating i {
    color: #FFB800;
}

.reviews {
    color: var(--text-secondary);
    font-weight: 400;
}

.shipping-info {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

.options-section {
    margin-bottom: auto;
}

.options-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 12px;
}

.guide-link {
    color: var(--text-secondary);
    text-decoration: none;
}

.options-buttons {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.options-buttons::-webkit-scrollbar { display: none; }

.option-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: var(--white);
    font-family: inherit;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

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

/* Tabs Content */
.tab-content {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.variant-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 13px;
}

.variant-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--white);
    color: var(--text-main);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-btn.active {
    border-color: var(--accent);
    background-color: rgba(97, 0, 29, 0.05);
    color: var(--accent);
}

.action-footer {
    margin-top: 30px;
}

.primary-btn {
    width: 100%;
    padding: 18px;
    border-radius: 30px;
    background-color: #1A1C20; /* Very dark grayish blue */
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: transform 0.1s;
}

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

/* CHECKOUT SCREEN */
#checkout-screen {
    transform: translateX(100%);
    opacity: 0;
    z-index: 15;
    pointer-events: none;
    background-color: var(--card-bg);
}

#checkout-screen.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.checkout-content {
    flex: 1;
    padding: 0 20px 20px;
}

.checkout-summary-card {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.checkout-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.1));
    margin-right: 16px;
}

.checkout-summary-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

#checkout-qty {
    font-weight: 600;
    font-size: 14px;
}

.checkout-step {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--text-main);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
}

.step-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 12px;
}

.input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.input-row .input-group {
    margin-bottom: 0;
    flex: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    font-family: inherit;
    font-size: 14px;
    background-color: #FAFAFA;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--text-main);
}

.freight-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.upsell-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px dashed var(--accent);
    border-radius: 12px;
    background-color: rgba(97, 0, 29, 0.02);
    margin-bottom: 20px;
    cursor: pointer;
}

.upsell-title {
    font-weight: 500;
    font-size: 14px;
    display: block;
}

.upsell-price {
    font-weight: 600;
    color: var(--accent);
    font-size: 13px;
}

.totals-summary {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 16px;
}

.tot-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.tot-row.final {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
}

.freight-options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.freight-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.freight-option:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background-color: rgba(97, 0, 29, 0.02);
}

.freight-option-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-main);
}

.freight-option-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* Reviews Screen */
#reviews-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
    z-index: 20;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
}

#reviews-screen.active {
    display: block;
    transform: translateY(0);
}

.reviews-summary-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.03);
}

.reviews-big-rating {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 8px;
}

.reviews-stars {
    font-size: 20px;
    margin-bottom: 8px;
}

.reviews-total {
    font-size: 13px;
    color: var(--text-secondary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.review-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.02);
}

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

.review-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.review-stars {
    font-size: 14px;
    color: #FFB800;
}

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

.review-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* WhatsApp Floating Button */
.whatsapp-floating-container {
    position: absolute;
    top: 170px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse; /* Tooltip goes below the button */
    align-items: flex-start;
    gap: 8px;
    animation: popIn 0.5s ease-out;
}

.whatsapp-tooltip {
    background: #fff;
    color: #333;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0; /* Hidden by default on mobile to save space */
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.whatsapp-floating-container:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: -6px; /* Arrow pointing UP */
    left: 12px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0,0,0,0.05);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.whatsapp-float-btn {
    background-color: #25D366;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 19px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.whatsapp-float-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}
