:root {
    --primary-color: #e07234;
    --primary-gradient: linear-gradient(135deg, #e07234 0%, #ff8c42 100%);
    --secondary-color: #3e9da1;
    --secondary-gradient: linear-gradient(135deg, #3e9da1 0%, #56c5c9 100%);
    --background-color: #f7f9fc;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --font-family: 'Outfit', sans-serif;
    --border-radius-sm: 12px;
    --border-radius: 20px;
    --border-radius-lg: 32px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-subtle {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    background-image:
        radial-gradient(at 10% 10%, rgba(224, 114, 52, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(62, 157, 161, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.main-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.delivery-info {
    margin-top: 40px;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
    opacity: 0.8;
}

.linktree-subtitle.seller-info {
    margin-bottom: 5px;
    font-size: 1rem;
    color: var(--text-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.seller-badge {
    background: rgba(62, 157, 161, 0.1);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border: 1px solid rgba(62, 157, 161, 0.2);
}

/* Hero */
.hero {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.hero-buttons {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.3px;
}

.btn i,
.close-modal i,
#close-cart-btn i,
.btn svg,
.close-modal svg,
#close-cart-btn svg {
    pointer-events: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(224, 114, 52, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(224, 114, 52, 0.4);
}

.btn-secondary {
    background-color: var(--white);
    border: 1px solid #ddd;
    color: var(--text-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.product-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    background-color: #f0f0f0;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.product-actions .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background-color: #ffffff;
    color: var(--text-color);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid #eee;
}

.whatsapp-btn-footer {
    color: #25d366;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 30px;
    transition: var(--transition);
}

.whatsapp-btn-footer:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: translateY(-2px);
}

/* Catalog Styles */
.catalog-section {
    padding: 3rem 20px;
    max-width: 900px;
    margin: 0 auto;
}

.catalog-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    padding: 14px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    flex-grow: 1;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(224, 114, 52, 0.15);
}

.search-form button {
    padding: 0 24px;
}

/* Linktree / Biosite Styles */
.linktree-container {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    border: var(--glass-border);
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    border: 4px solid var(--white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.linktree-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.linktree-subtitle {
    color: var(--text-light);
    margin-bottom: 35px;
    font-weight: 500;
    font-size: 1.05rem;
}

.link-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    gap: 10px;
}

.link-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.link-btn:hover::after {
    transform: translateX(100%);
}

.btn-orange {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(224, 114, 52, 0.25);
}

.btn-teal {
    background: var(--secondary-gradient);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(62, 157, 161, 0.25);
}

.link-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Cart Drawer Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: var(--white);
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

#close-cart-btn {
    background: #f7f9fc;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#close-cart-btn:hover {
    background: #e4e6eb;
    transform: rotate(90deg);
}

.cart-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid #f0f0f0;
    background: #ffffff;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.cart-drawer-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.cart-drawer-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-info h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.remove-item-btn {
    background: rgba(255, 107, 107, 0.1);
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: var(--transition);
}

.remove-item-btn:hover {
    background: #ff6b6b;
    color: white;
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 900px;
    max-width: 95%;
    max-height: 90vh;
    background: var(--white);
    z-index: 1100;
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: none;
    opacity: 0;
    transition: var(--transition);
    overflow: hidden;
}

.product-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.product-modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    height: 100%;
    overflow-y: auto;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#main-product-image-container {
    height: 450px;
    width: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

#modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
}

.product-info-modal {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    width: 44px;
    height: 44px;
    z-index: 10;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    transform: rotate(90deg);
    background: #fff;
}

.thumbnails-grid {
    position: relative;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    /* Align left to match flow, or center if preferred. Center is usually nice for galleries. */
    justify-content: center;
    padding: 10px 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    scroll-behavior: smooth;
    margin-top: 10px;
}

.thumbnails-grid::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.thumb-img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
    object-fit: cover;
    flex-shrink: 0;
}

.thumb-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.thumb-img.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(224, 114, 52, 0.1);
}

.product-info-modal h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a1a;
}

#modal-product-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 10px 0 20px;
}

#modal-product-description {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
    flex-grow: 1;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #b0b3b8;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
    position: relative;
}

.bottom-nav-item .nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: var(--transition);
    filter: grayscale(100%);
    opacity: 0.7;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    transform: translateY(-5px);
    filter: grayscale(0%);
    opacity: 1;
}

.bottom-nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .main-header {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 90px;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .product-modal-content {
        grid-template-columns: 1fr;
        overflow-y: visible;
    }

    .product-modal {
        padding: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        transform: translateY(100%);
        border-radius: 0;
        overflow-y: auto;
    }

    .product-modal.active {
        transform: translateY(0);
    }

    #main-product-image-container {
        height: 350px;
    }

    .product-info-modal {
        padding: 24px;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Global Utilities */
.container--narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--secondary-color);
    color: white;
}

.text-gradient {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Receipt Printing Styles */
@media print {
    body * {
        visibility: hidden;
    }

    #receipt-print-area,
    #receipt-print-area * {
        visibility: visible;
    }

    #receipt-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        font-family: 'Courier New', Courier, monospace;
        font-size: 12px;
        color: #000;
        background: #fff;
        padding: 5mm;
    }

    @page {
        margin: 0;
        size: auto;
    }
}

#receipt-print-area {
    display: none;
    width: 80mm;
    background: white;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    color: black;
}

.receipt-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
}

.receipt-header h2 {
    margin: 0;
    font-size: 18px;
}

.receipt-header p {
    margin: 2px 0;
    font-size: 12px;
}

.receipt-body {
    margin-bottom: 10px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.receipt-table th {
    text-align: left;
    border-bottom: 1px solid #000;
    font-size: 12px;
}

.receipt-table td {
    padding: 4px 0;
    font-size: 12px;
}

.receipt-total {
    border-top: 1px dashed #000;
    padding-top: 10px;
    font-weight: bold;
    text-align: right;
    font-size: 14px;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}