:root {
    --color-dark-brown: rgb(54, 39, 6);
    --color-olive: rgb(70, 78, 46);
    --color-sage: rgb(172, 185, 146);
    --color-cream: rgb(233, 229, 214);
    --color-new: #4caf50;
    --color-seasonal: #ff9800;
    --color-shipping: #2196f3;
}

/* Estilos para la sección de cupones cuando el usuario está logueado */
.discounts-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.discounts-container h1 {
    text-align: center;
    color: var(--color-dark-brown);
    margin-bottom: 2rem;
}

.discounts-container h2 {
    color: var(--color-dark-brown);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Grid de cupones */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Estilos de las tarjetas de cupones */
.coupon-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.coupon-card.new {
    border-top: 5px solid var(--color-new);
}

.coupon-card.seasonal {
    border-top: 5px solid var(--color-seasonal);
}

.coupon-card.shipping {
    border-top: 5px solid var(--color-shipping);
}

.coupon-content {
    padding: 1.5rem;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.coupon-type {
    background: var(--color-sage);
    color: var(--color-dark-brown);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.discount-amount {
    text-align: right;
}

.discount-amount .percentage {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-dark-brown);
    line-height: 1;
}

.discount-amount .off {
    font-size: 1rem;
    color: var(--color-olive);
}

.discount-amount .text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-shipping);
}

.coupon-body {
    margin-bottom: 1.5rem;
}

.coupon-body h3 {
    color: var(--color-dark-brown);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.coupon-body p {
    color: var(--color-olive);
    margin-bottom: 1rem;
}

.coupon-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-olive);
}

.copy-code {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-cream);
    border: 2px dashed var(--color-olive);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-code:hover {
    background: var(--color-sage);
    border-style: solid;
}

.code {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-dark-brown);
}

.copy-text {
    color: var(--color-olive);
    font-size: 0.9rem;
}

.terms-link {
    text-align: center;
    margin-top: 1rem;
}

.show-terms {
    color: var(--color-olive);
    text-decoration: none;
    font-size: 0.9rem;
}

.show-terms:hover {
    text-decoration: underline;
}

/* Sección de próximos cupones */
.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.upcoming-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upcoming-icon {
    font-size: 2rem;
}

.upcoming-content h3 {
    color: var(--color-dark-brown);
    margin-bottom: 0.5rem;
}

.upcoming-content p {
    color: var(--color-olive);
    margin-bottom: 0.5rem;
}

.upcoming-date {
    display: block;
    color: var(--color-sage);
    font-size: 0.9rem;
}

/* Modal de términos y condiciones */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    margin: 10% auto;
    padding: 2rem;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-olive);
}

.terms-text {
    margin-top: 1.5rem;
}

.terms-text h3 {
    color: var(--color-dark-brown);
    margin-bottom: 1rem;
}

.terms-text ul {
    list-style-type: none;
    padding: 0;
}

.terms-text li {
    color: var(--color-olive);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.terms-text li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-sage);
}

.promo-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--color-cream);
    background-image: 
        radial-gradient(var(--color-sage) 2px, transparent 2px),
        radial-gradient(var(--color-sage) 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

.promo-card {
    background: var(--color-cream);
    border-radius: 20px;
    border: 1px solid var(--color-olive);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(6, 4, 1, 0.1);
    position: relative;
    overflow: hidden;
    border-color: 30px, var(--color-olive);
}

.promo-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.discount-badge {
    background: var(--color-olive);
    color: var(--color-cream);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -40px;
    right: -20px;
    transform: rotate(15deg);
    box-shadow: 0 4px 12px rgba(54, 39, 6, 0.2);
    animation: float 3s ease-in-out infinite;
}

.percentage {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.off {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.promo-header h1 {
    color: var(--color-dark-brown);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--color-olive);
    font-size: 1.2rem;
    font-weight: 500;
}

.benefits-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--color-sage);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(10px);
    background-color: var(--color-olive);
    color: white;
}

.icon {
    font-size: 1.5rem;
    min-width: 40px;
}

.benefit-item p {
    margin: 0;
    font-size: 1.1rem;
}

.cta-section {
    text-align: center;
}

.register-button {
    display: inline-block;
    background: var(--color-olive);
    color: var(--color-cream);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--color-olive);
}

.register-button:hover {
    background: transparent;
    color: var(--color-olive);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(70, 78, 46, 0.2);
}

.login-text {
    margin-top: 1.5rem;
    color: var(--color-dark-brown);
}

.login-link {
    color: var(--color-olive);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.login-link:hover {
    border-bottom-color: var(--color-olive);
}

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

    .promo-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .promo-header h1 {
        font-size: 1.8rem;
        margin-top: 1rem;
    }

    .discount-badge {
        width: 60px;
        height: 60px;
        top: -30px;
        right: -15px;
    }

    .percentage {
        font-size: 1.4rem;
    }

    .off {
        font-size: 0.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .benefits-list {
        gap: 1rem;
    }

    .benefit-item {
        padding: 1rem;
        gap: 0.8rem;
    }

    .icon {
        font-size: 1.3rem;
        min-width: 30px;
    }

    .benefit-item p {
        font-size: 0.95rem;
    }

    .register-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .login-text {
        font-size: 0.9rem;
    }
}

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 360px) {
    .promo-container {
        padding: 0.5rem;
        min-height: calc(100vh - 1rem);
    }

    .promo-card {
        padding: 1rem;
        margin: 0.25rem;
    }

    .promo-header {
        margin-bottom: 2rem;
    }

    .promo-header h1 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }

    .discount-badge {
        width: 50px;
        height: 50px;
        top: -25px;
        right: -10px;
    }

    .percentage {
        font-size: 1.2rem;
    }

    .off {
        font-size: 0.7rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .benefits-list {
        gap: 0.8rem;
        margin-bottom: 2rem;
    }

    .benefit-item {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .icon {
        font-size: 1.2rem;
        min-width: 25px;
    }

    .benefit-item p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .cta-section {
        margin-top: 1rem;
    }

    .register-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
        width: 90%;
        max-width: 280px;
    }

    .login-text {
        font-size: 0.85rem;
        margin-top: 1rem;
    }

    /* Ajuste de la animación para pantallas pequeñas */
    @keyframes float {
        0% {
            transform: translateY(0) rotate(10deg);
        }
        50% {
            transform: translateY(-5px) rotate(10deg);
        }
        100% {
            transform: translateY(0) rotate(10deg);
        }
    }
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0) rotate(15deg);
    }
    50% {
        transform: translateY(-10px) rotate(15deg);
    }
    100% {
        transform: translateY(0) rotate(15deg);
    }
}

/* Estilos para la notificación de copiado */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-olive);
    color: var(--color-cream);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    0% {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Estilos para el botón de copiar */
.copy-code {
    position: relative;
    overflow: hidden;
}

.copy-code::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-sage);
    top: 0;
    left: -100%;
    transition: all 0.3s ease;
}

.copy-code.copied::before {
    left: 0;
}

.copy-code:active {
    transform: scale(0.95);
}