:root {
    --primary-color: #6c5ce7;
    --secondary-color: #e84393;
    --gradient-start: #6c5ce7;
    --gradient-end: #e84393;
    --dark-bg: #121212;
    --dark-card: #1e1e1e;
    --light-bg: #f8f9fa;
    --light-card: #ffffff;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --header-text-spacing: 20px; /* Variable para controlar el espacio entre header y texto */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    transition: background-color 0.3s ease;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

body.light-mode {
    background-color: var(--light-bg);
    color: var(--text-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ff9966, #ff5e62, #6c5ce7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Hero Section */
.hero {
    background: url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: var(--header-text-spacing); /* Usa la variable para controlar el espaciado */
    padding: 0 20px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50px;
    padding: 3px;
    background: linear-gradient(90deg, #ff9966, #ff5e62, #6c5ce7, #e84393, #ff9966);
    background-size: 400% 400%;
    animation: btn-glow 3s linear infinite;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.6);
}

@keyframes btn-glow {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(108, 92, 231, 0.6);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px rgba(232, 67, 147, 0.8);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(108, 92, 231, 0.6);
    }
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    background-clip: padding-box;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.6);
}

.btn:hover {
    transform: translateY(-3px);
    animation: btn-glow 1.5s linear infinite;
    box-shadow: 0 0 25px rgba(232, 67, 147, 0.8);
}

/* Products Section */
.products {
    padding: 20px 0 80px 0; /* Reducido el padding superior */
    margin-top: -20px; /* Acercar más a la sección hero */
}

.products h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #ff9966, #ff5e62, #6c5ce7, #e84393);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    animation: gradient-animation 8s ease infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    letter-spacing: 1px;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card-wrapper {
    position: relative;
    padding: 1.8px;
    border-radius: 30px;
    margin-bottom: 30px;
    border: 1.2px solid transparent;
    background-image: linear-gradient(#000, #000), linear-gradient(90deg, #ff9966, #ff5e62, #6c5ce7, #e84393, #ff9966);
    background-origin: border-box;
    background-clip: content-box, border-box;
    background-size: 400% 400%;
    animation: animate-border 10s ease-in-out infinite; /* Más lento (3s → 10s) y más suave (linear → ease-in-out) */
    box-shadow: none;
    display: inline-block;
    width: 100%;
    transition: all 0.7s ease-in-out; /* Transición más suave */
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    margin: 0;
}

.product-card-wrapper:hover {
    animation: animate-border 5s ease-in-out infinite; /* Más lento (1.5s → 5s) y más suave (linear → ease-in-out) */
    box-shadow: none;
}

.product-card-wrapper::after {
    animation-delay: -1s;
}

/* تم تعديل التنسيقات لجعل الإطار ظاهرًا دائمًا */

@keyframes animate-border {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes glowing-line {
    0% {
        background-position: -400% 0;
    }
    100% {
        background-position: 400% 0;
    }
}

/* Este keyframe ya no se usa, se usa btn-glow para ambos elementos */
@keyframes glowing-border {
    0% {
        background-position: 0% 0;
        box-shadow: 0 0 10px rgba(255, 94, 98, 0.7);
    }
    50% {
        background-position: 100% 0;
        box-shadow: 0 0 15px rgba(255, 153, 102, 1);
    }
    100% {
        background-position: 0% 0;
        box-shadow: 0 0 10px rgba(255, 94, 98, 0.7);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.product-price {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.original-price {
    font-size: 1rem;
    text-decoration: line-through;
    color: #888;
    margin-bottom: 5px;
}

.payment-type {
    font-size: 0.8rem;
    color: #888;
    display: block;
}

.discount-price-container {
    background: linear-gradient(to right, #e67e22, #e74c3c);
    border-radius: 10px;
    padding: 15px;
    width: 100%;
    margin-top: -10px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #d35d90, #f56b7c);
}

.discount-price-container .price-info {
    display: flex;
    flex-direction: column;
}

.discount-price-container .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    display: block;
    line-height: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.discount-price-container .original-price {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: block;
    margin-top: -5px;
}

.discount-price-container .payment-type {
    color: white;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    margin-bottom: 10px;
}

.promotion-countdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: white;
    position: relative;
    width: 45%;
}

.promotion-countdown span {
    font-size: 0.7rem;
    color: white;
    margin-bottom: 5px;
    text-align: right;
    width: 100%;
}

.countdown {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
    direction: rtl;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.countdown::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    margin-left: 5px;
}

.countdown .time-value {
    font-weight: bold;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 2px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.product-description {
    color: #aaa;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Product Features Preview in Card */
.product-features-preview {
    margin-bottom: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.product-features-preview h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

.features-list li i {
    margin-left: 8px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Light mode styles for features */
body.light-mode .product-features-preview h4 {
    color: #333;
}

body.light-mode .features-list li {
    color: #666;
}

/* Product buttons container */
.product-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.view-details {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    transition: opacity 0.3s ease;
}

.view-details:hover {
    opacity: 0.9;
}

.visit-site {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    flex: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Eliminado el pseudo-elemento ::before que ya no es necesario */

.visit-site:hover {
    opacity: 0.9;
}

/* Estilo para el botón de visitar sitio en la ventana emergente */
.visit-site-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1;
    min-width: 120px;
    font-size: 14px;
}

.visit-site-button:hover {
    opacity: 0.9;
}

.visit-site-button .button-text {
    margin-right: 8px;
}

.modal-buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: #888;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: rgba(25, 25, 25, 0.5);
}

.features h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
}

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: linear-gradient(145deg, rgba(108, 92, 231, 0.1), rgba(232, 67, 147, 0.1));
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-light);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.feature-content p {
    color: #ddd;
    line-height: 1.6;
}

.no-features {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: #888;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: rgba(30, 30, 30, 0.5);
}

.about h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.company-logo {
    flex: 1;
    text-align: center;
}

.company-logo img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
}

.company-info {
    flex: 2;
}

.company-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #6c5ce7, #e84393);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.company-info p {
    line-height: 1.6;
    color: #ddd;
}

/* Footer */
footer {
    background-color: rgba(18, 18, 18, 0.9);
    padding: 20px 0;
    text-align: center;
}

.hero {
    background-color: var(--hero-bg);
    padding: 80px 0 30px 0; /* Reducido el padding inferior */
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px; /* Reducida la altura mínima */
}

.animated-tagline {
    margin-bottom: 40px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.text-animation {
    position: relative;
    height: 60px;
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-line {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    color: var(--text-color);
    opacity: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    display: none;
    transition: opacity 0.3s ease;
}

.text-line.active {
    display: block;
    opacity: 1;
}

.text-line.typing::after {
    content: '|';
    animation: cursor-blink 0.7s infinite;
    font-weight: 100;
    color: var(--text-color);
}

@keyframes cursor-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--dark-card);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--secondary-color);
}

.modal-product-image {
    text-align: center;
    margin-bottom: 20px;
}

.modal-product-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
}

.modal-product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.modal-product-price {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Modal discount container styles */
.modal-product-info .discount-price-container {
    width: 100%;
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
}

.modal-product-info .countdown {
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start;
}

.modal-product-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Product Features in Modal */
.modal-product-features {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.modal-product-features h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #fff;
}

.features-list-detailed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list-detailed li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.features-list-detailed li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.feature-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.feature-header i {
    margin-left: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.feature-header h5 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.features-list-detailed li p {
    margin: 0;
    padding-right: 34px;
    color: #aaa;
    line-height: 1.5;
}

/* Light mode styles for modal features */
body.light-mode .modal-product-features {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .modal-product-features h4,
body.light-mode .feature-header h5 {
    color: #333;
}

body.light-mode .features-list-detailed li {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

body.light-mode .features-list-detailed li p {
    color: #666;
}

.promotion-timer {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    text-align: center;
}

.promotion-timer h4 {
    margin-bottom: 10px;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.timer-label {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Light Mode Styles */
body.light-mode header {
    background-color: rgba(248, 249, 250, 0.9);
}

body.light-mode nav ul li a {
    color: var(--text-dark);
}

body.light-mode .theme-toggle {
    color: var(--text-dark);
}

body.light-mode .product-card {
    background-color: var(--light-card);
}

body.light-mode .product-description {
    color: #666;
}

body.light-mode .about {
    background-color: rgba(240, 240, 240, 0.5);
}

body.light-mode .company-info p {
    color: #555;
}

body.light-mode footer {
    background-color: rgba(240, 240, 240, 0.9);
}

body.light-mode .modal-content {
    background-color: var(--light-card);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero {
        height: 400px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        display: none;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}
