/* DN Promo Module - Frontend Styles */

/* Daily Product Styles */
.dn-daily-product-container {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dn-daily-product-header {
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dn-title {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

.dn-savings-info {
    background: #ff6b6b;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.dn-savings-label {
    margin-right: 8px;
}

.dn-savings-amount {
    font-size: 18px;
}

.dn-daily-product-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.dn-product-image {
    flex: 0 0 300px;
}

.dn-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.dn-product-info {
    flex: 1;
}

.dn-product-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.dn-product-name a {
    color: #333333;
    text-decoration: none;
}

.dn-product-name a:hover {
    color: #ff6b6b;
}

.dn-product-brand {
    margin: 0 0 10px 0;
    color: #666666;
}

.dn-product-description {
    margin: 0 0 15px 0;
    color: #666666;
    line-height: 1.5;
}

.dn-product-price {
    margin: 15px 0;
}

.dn-price {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
}

.dn-original-price {
    font-size: 16px;
    color: #999999;
    text-decoration: line-through;
    margin-right: 10px;
}

.dn-discounted-price {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
}

.dn-product-stats {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.dn-stock-info,
.dn-sold-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dn-stock-label,
.dn-sold-label {
    font-weight: 600;
    color: #333333;
}

.dn-stock-quantity,
.dn-sold-quantity {
    font-size: 16px;
    font-weight: 700;
    color: #666666;
}

.dn-countdown-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.dn-countdown-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333333;
}

.dn-countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.dn-countdown-item {
    text-align: center;
}

.dn-countdown-value {
    display: block;
    background: #ff6b6b;
    color: white;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}

.dn-countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666666;
    margin-top: 5px;
}

.dn-countdown-separator {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0 5px;
}

.dn-product-actions {
    margin-top: 20px;
}

.dn-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dn-btn-primary {
    background: #ff6b6b;
    color: white;
}

.dn-btn-primary:hover {
    background: #ff5252;
    color: white;
}

.dn-btn-small {
    background: #f8f9fa;
    color: #333333;
    border: 1px solid #e6e6e6;
    padding: 5px 10px;
    font-size: 14px;
}

.dn-btn-small:hover {
    background: #e9ecef;
    color: #333333;
}

/* Weekly Brand Styles */
.dn-weekly-brand-container {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dn-weekly-brand-header {
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dn-week-info {
    background: #4ecdc4;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.dn-week-label {
    margin-right: 8px;
}

.dn-week-number {
    font-size: 18px;
    margin-right: 5px;
}

.dn-brand-info {
    margin-bottom: 20px;
}

.dn-brand-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.dn-brand-name a {
    color: #333333;
    text-decoration: none;
}

.dn-brand-name a:hover {
    color: #4ecdc4;
}

.dn-brand-description {
    margin: 0 0 15px 0;
    color: #666666;
    line-height: 1.5;
}

/* Carousel Styles */
.dn-products-carousel {
    position: relative;
}

.dn-carousel-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dn-carousel-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
}

.dn-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.dn-product-item {
    flex: 0 0 calc(12.5% - 10px); /* 4 products per row */
    margin: 0 5px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.dn-product-item.dn-active {
    opacity: 1;
}

.dn-product-card {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dn-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dn-product-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.dn-product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dn-product-title a {
    color: #333333;
    text-decoration: none;
}

.dn-product-title a:hover {
    color: #4ecdc4;
}

.dn-product-price {
    margin: 10px 0;
}

.dn-carousel-nav {
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.dn-carousel-nav:hover {
    background: #45b8b0;
    transform: scale(1.1);
}

.dn-carousel-nav span {
    font-size: 10px;
    margin-top: 2px;
}

.dn-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dn-dot {
    background: #e6e6e6;
    border: none;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dn-dot.dn-active {
    background: #4ecdc4;
}

.dn-dot:hover {
    background: #4ecdc4;
}

.dn-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dn-product-item {
        flex: 0 0 calc(25% - 10px); /* 4 products per row */
    }
}

@media (max-width: 768px) {
    .dn-daily-product-content {
        flex-direction: column;
    }

    .dn-product-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .dn-product-stats {
        flex-direction: column;
        gap: 10px;
    }

    .dn-countdown-timer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .dn-countdown-separator {
        display: none;
    }

    .dn-carousel-container {
        flex-direction: column;
    }

    .dn-product-item {
        flex: 0 0 calc(50% - 10px); /* 2 products per row */
    }

    .dn-carousel-nav {
        width: 100%;
        height: 40px;
        border-radius: 5px;
        flex-direction: row;
        gap: 10px;
    }

    .dn-carousel-nav span {
        font-size: 14px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .dn-daily-product-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dn-weekly-brand-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dn-product-item {
        flex: 0 0 calc(100% - 10px); /* 1 product per row */
    }

    .dn-countdown-value {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
}

/* Animation Classes */
.dn-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dn-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dn-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading State */
.dn-loading {
    position: relative;
    overflow: hidden;
}

.dn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}