/* Home Page / Daily Deals Styling */

.daily-deals-home {
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    padding: 0;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-lg);
    box-sizing: border-box;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin: 0 0 var(--space-sm) 0;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin: 0 0 var(--space-md) 0;
    opacity: 0.95;
}

.next-refresh {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
}

.countdown-time {
    font-size: 1.25rem;
    font-weight: 700;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* Hero Badge Overlay */
.hero-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Removed Skew for premium look */
    background: rgba(225, 29, 72, 0.85);
    /* Rose-600 with transparency */
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    /* Rounded corners */
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.3);
    /* Soft Glow */
    letter-spacing: 1px;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(8px);
    /* Stronger glass effect */
}

@media (min-width: 768px) {
    .hero-badge {
        padding: 1rem 3rem;
        font-size: 2.5rem;
        border-width: 2px;
    }
}


/* Filter Bar */
.filter-bar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.filter-container {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.filter-group label {
    font-weight: 500;
    color: var(--color-text);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    cursor: pointer;
}

/* Products Grid */
.deals-grid {
    padding: 0 var(--space-md);
}

.products-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

/* Deal Card */
.deal-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.deal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Badges - Vertical Stack (Restored) */
.deal-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    /* Vertical stack for all devices */
    align-items: flex-start;
    gap: 6px;
    /* Increased gap */
    z-index: 20;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    /* Larger padding */
    border-radius: 4px;
    font-size: 0.85rem;
    /* Larger font size */
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-discount {
    background: #14B8A6;
    /* Match Primary Button Color */
    color: white;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    /* Ensure left is unset */
    z-index: 25;
    /* Higher z-index */
}

.badge-urgent {
    background: var(--color-primary);
    /* Teal */
    color: white;
}

.badge-low-stock {
    background-color: #EF4444 !important;
    /* Light Red */
    color: white !important;
    animation: pulse-light-red 2s infinite !important;
}

.badge-new {
    background-color: #0EA5E9;
    /* Sky Blue */
    color: white;
    /* Optional: Add a pulse animation or distinct style if desired, but keeping it consistent for now */
}

/* Product Image */
.deal-image {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #F9FAFB;
    position: relative;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.deal-card:hover .deal-image img {
    transform: scale(1.05);
}

/* Product Info */
.deal-info {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.deal-title {
    margin: 0 0 var(--space-sm) 0;
    font-size: 1rem;
    font-weight: 600;
}

.deal-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.deal-title a:hover {
    color: var(--color-primary);
}

/* Price */
.deal-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.original-price {
    font-size: 1.0rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

/* Meta Info */
.deal-meta-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    color: #6B7280;
}

.stock-status {
    font-weight: 500;
}

.stock-status.in-stock {
    color: #10B981;
}

.stock-status.out-of-stock {
    color: #EF4444;
}

/* Add to Cart Button */
.deal-info .add-to-cart-button {
    display: block;
    width: 100%;
    background-color: var(--color-primary);
    color: white !important;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    /* Match disabled button border width */
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.deal-info .add-to-cart-button:hover {
    background-color: var(--color-primary-hover);
    color: white !important;
}

/* Disabled Button Styling */
.button-disabled {
    background: #E5E7EB !important;
    color: #9CA3AF !important;
    cursor: not-allowed;
    border: 1px solid #D1D5DB !important;
    pointer-events: none;
    width: 100% !important;
    display: block !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-top: 10px !important;
}

/* Out of Stock Badge */
.out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(30, 30, 30, 0.85);
    /* Dark semi-transparent background */
    backdrop-filter: blur(4px);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block !important;
}

/* Grayscale image when out of stock */
.deal-image:has(.out-of-stock-badge) img {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* No Deals */
.no-deals {
    text-align: center;
    padding: var(--space-lg);
    color: #6B7280;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .products-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-sm);
    }

    /* Mobile Layout Fixes */
    .deal-badges {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .deal-info .add-to-cart-button,
    .button-disabled {
        width: 100% !important;
        display: block !important;
        position: relative;
        z-index: 2;
    }

    /* Make card clickable via title link */
    .deal-title a::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1;
    }

    /* Keep actions clickable above the card link */
    .deal-actions {
        position: relative;
        z-index: 2;
    }
}

/* RTL Support */
[dir="rtl"] .deal-badges {
    left: auto;
    right: var(--space-sm);
}

/* Pagination */
.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-wrapper .page-numbers.current {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-wrapper .page-numbers:hover:not(.current) {
    background-color: #f3f4f6;
    border-color: var(--color-primary);
}

.pagination-wrapper .page-numbers.dots {
    border: none;
    background: transparent;
}

/* Pulse Animation */
@keyframes pulse-light-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        /* EF4444 as RGB */
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}


.deal-actions {
    margin-top: auto;
}

/* Button Color Reverted to Theme Default */

/* Pulse Animation */
/* End of file cleanup */

/* Subtle Share Button Overlay */
.share-btn-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #4B5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-btn-overlay:hover {
    background: white;
    color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn-overlay svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
    display: block;
}