/* Colores de Escala */
:root {
    --primary-color: #f34f36;
    --primary-hover: #d43d26;
    --primary-light: rgba(243, 79, 54, 0.1);
    --secondary-color: #6C757D;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --border-color: #E0E0E0;
    --bg-light: #F8F9FA;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --white: #FFFFFF;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* URL Bar */
.url-bar {
    background: var(--white);
    border-radius: 0.3rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.url-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header */
.linktree-header {
    text-align: center;
    padding: 1.5rem 1rem 1rem;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

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

.avatar-placeholder {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#avatar-initial {
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.linktree-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Tab Switch */
.tab-switch {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--white);
}

.tab-button:hover:not(.active) {
    background: var(--bg-light);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0rem;
    padding: 0 1rem;
    background: var(--white);
    line-height: 1.6;
}

/* Products Container */
.products-container {
    margin-bottom: 1.5rem;
}

.products-container h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* No Products Message */
.no-products-message {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.no-products-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.product-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(243, 79, 54, 0.15);
    transform: translateY(-2px);
}

.product-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.product-icon svg {
    width: 28px;
    height: 28px;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.product-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-arrow {
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section,
.socials-section {
    margin-bottom: 2rem;
    background: var(--white);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-title,
.socials-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-title svg, .socials-title svg {
    opacity: 0.6;
}

.contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--primary-light);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.contact-button svg {
    fill: currentColor;
}

.contact-button.whatsapp {
    background: rgba(37, 211, 102, 0.05);
}

.contact-button.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: var(--white);
}

.contact-button.email {
    background: var(--primary-light);
}

.contact-button.email:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Legacy contact-info class for backwards compatibility */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.socials-section {
    display: none;
}

.socials-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.socials-buttons a {
    color: var(--primary-color);
    background: var(--bg-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.socials-buttons a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Back Button */
/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-bottom: 1rem;
    background: transparent;
    border: none;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
}

.back-button:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.back-button:active {
    background-color: #e9ecef;
}

.back-button svg {
    flex-shrink: 0;
}

/* Product Form Container */
.product-form-container {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.product-form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Styles */
.product-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .error {
    color: var(--danger-color);
    font-size: 0.813rem;
    margin-top: 0.25rem;
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--danger-color);
}

.submit-button {
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.submit-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 79, 54, 0.3);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Message */
.form-message {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.form-message.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.form-message.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer strong {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .linktree-header {
        padding: 1.5rem 1rem;
    }

    .linktree-header h1 {
        font-size: 1.5rem;
    }

    .product-form-container {
        padding: 1.5rem;
    }

    .product-card {
        padding: 1rem;
    }
}

@keyframes loading {
  0% {
    background-position: -100px;
  }
  100% {
    background-position: 200px;
  }
}


.skeleton {
    display: none;
    animation: loading 1500ms infinite linear;
    background: #dedfe1;
    background-image: -webkit-linear-gradient(
        to right,
        #dedfe1 0%,
        #f2f3f5 20%,
        #dedfe1 40%,
        #dedfe1 100%
    );
    background-image: linear-gradient(
        to right,
        #dedfe1 0%,
        #f2f3f5 20%,
        #dedfe1 40%,
        #dedfe1 100%
    );
    background-repeat: no-repeat;
}

.loading .skeleton {
    display: block!important;
}


.loading .not-skeleton {
    display: none !important;
}

body.product-page .tab-switch,
body.product-page #content-cotiza,
body.product-page .contact-section,
body.product-page .socials-section,
body.product-page .description {
    display: none!important;
}

body:not(.product-page) #form-container,
body:not(.product-page) #form-loader,
body:not(.product-page) #error-message,
body:not(.product-page) #back-button {
    display: none!important;
}