/**
 * Amazing Products Widget Styles
 * RTL (Right-to-Left) layout for Persian/Farsi websites
 */

.amazing-products-container {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    border-radius: 0.5rem;
    direction: rtl;
    text-align: right;
}

/* Background */
.amazing-products-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #EF4056;
    border-radius: 1.5rem;
    z-index: 0;
}

/* Main Layout */
.amazing-products-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

/* Promotional Area */
.amazing-products-promo {
    width: 100%;
    border-radius: 1rem;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    backdrop-filter: blur(2rem);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.amazing-products-title {
    color: #EF4056;
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.amazing-products-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.amazing-products-button:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.button-icon {
    width: 1rem;
    height: 1rem;
}

.amazing-products-image {
    width: 40%;
    max-width: 120px;
    height: auto;
}

/* Products Swiper Container */
.amazing-products-swiper-container {
    width: 100%;
    position: relative;
    z-index: 10;
    margin-top: 1.5rem;
}

.amazing-products-swiper {
    width: 100%;
    height: 100%;
}

/* Product Cards */
.amazing-product-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 200px;
    height: 100%;
    transition: all 0.3s ease;
}

.amazing-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.product-image {
    width: 128px;
    height: auto;
    object-fit: contain;
}

/* Product Details */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

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

.product-brand {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width:1.5rem
}

.brand-icon {
    width: 1.25rem;
    height: 1.25rem;
    background: #f3f4f6;
    border-radius: 50%;
    padding: 0.25rem;
}

.brand-name {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Timer */
.product-timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.timer-segment {
    font-size: 0.75rem;
    background: #e5e7eb;
    color: white;
    border-radius: 0.375rem;
    padding: 0.25rem;
    min-width: 1.5rem;
    text-align: center;
}

.timer-separator {
    font-size: 0.75rem;
    color: #d1d5db;
}

/* Product Title */
.product-title {
    font-size: 0.75rem;
    color: #000;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

a.product-title-link {
    color: #000;
}
/* Product Pricing */
.product-pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.discount-badge {
    background: #EF4056;
    color: white;
    border-radius: 0.375rem;
    padding: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.current-price {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.original-price {
    font-size: 0.75rem;
    color: #d1d5db;
    text-decoration: line-through;
}

/* Stock Info */
.stock-info {
    color: #EF4056;
    font-size: 0.75rem;
    margin: 0;
    text-align: center;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #EF4056;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: white;
    transform: scale(1.1);
}

/* Swiper Pagination */
.swiper-pagination-bullet {
    background: #EF4056;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #EF4056;
}

/* Responsive Design */
@media (min-width: 640px) {
    .amazing-products-container {
        padding: 2.5rem 1rem;
    }
    
    .amazing-products-promo {
        padding: 3.5rem 1rem;
        gap: 2rem;
    }
    
    .amazing-products-title {
        font-size: 1.5rem;
    }
    
    .amazing-products-image {
        width: 60%;
        max-width: 180px;
    }
    
    .amazing-product-card {
        width: 250px;
        padding: 1rem;
    }
    
    .product-image {
        width: 176px;
    }
    
    .product-details {
        gap: 0.75rem;
        padding: 0 1rem;
        margin-top: 1rem;
    }
    
    .brand-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .amazing-products-container {
        flex-direction: row;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .amazing-products-bg {
        width: 83.333333%;
    }
    
    .amazing-products-promo {
        width: 25%;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .amazing-products-swiper-container {
        width: 75%;
        margin-top: 3rem;
    }
}

/* RTL Specific Adjustments */
.amazing-products-container {
    direction: rtl;
}

.amazing-products-button {
    direction: rtl;
}

.product-header {
    direction: rtl;
}

.product-pricing {
    direction: rtl;
}

/* Animation for timer segments */
@keyframes timerPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.timer-segment {
    animation: timerPulse 2s infinite;
}

/* Hover effects for product cards */
.amazing-product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amazing-product-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Focus states for accessibility */
.amazing-products-button:focus,
.amazing-product-card:focus {
    outline: 2px solid #EF4056;
    outline-offset: 2px;
}

/* Loading state */
.amazing-products-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.amazing-products-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #EF4056;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .amazing-products-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .amazing-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #eee;
    }
    
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
} 