/* =================================================================
   STYLES FOR CAMPAIGN & DEAL PAGES
   File: campaign-style.css
   ================================================================= */

/* --- All Campaigns Page (index.blade.php) --- */
.page-header-gradient {
    background: linear-gradient(45deg, #0d6efd, #3d8bfd);
    border-bottom: 5px solid #0b5ed7;
}

.campaign-card-enhanced {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.75rem !important;
    overflow: hidden;
}

.campaign-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.campaign-card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.campaign-card-image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.campaign-card-enhanced:hover .campaign-card-image-wrapper img {
    transform: scale(1.05);
}

.campaign-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.campaign-card-enhanced:hover .campaign-card-overlay {
    opacity: 1;
}

.campaign-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #dc3545; /* Red for discounts */
    color: white;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 0.25rem;
    z-index: 2;
}

.campaign-expiry-notice {
    background-color: #fff8f8; /* A very light, subtle red */
    border: 1px dashed #e57373; /* A soft dashed red border */
    border-radius: 0.375rem; /* 6px */
    padding: 0.5rem 0.75rem;
    text-align: center;
    margin-top: 1rem; /* Spacing from the description above */
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* Space between icon and text */

    color: #dc3545; /* Bootstrap's danger color */
    font-size: 0.875rem; /* 14px */
    font-weight: 500; /* Medium weight */
}

.campaign-expiry-notice .bi {
    font-size: 1.1em; /* Make the icon slightly larger than the text */
}

.campaign-expiry-notice strong {
    font-weight: 700; /* Bolder text for the time itself */
}


/* --- Single Campaign Page (show.blade.php) --- */
.campaign-banner-enhanced {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 6rem 1rem;
    border-radius: 0 0 1.5rem 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.campaign-banner-enhanced::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3));
    z-index: 1;
}

.campaign-banner-enhanced .container {
    position: relative;
    z-index: 2;
}

#campaign-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.countdown-segment {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-align: center;
    backdrop-filter: blur(5px);
}

.countdown-segment span {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.countdown-segment small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 700;
    align-self: center;
    padding-bottom: 1.25rem;
}
.countdown-expired {
    background-color: #dc3545;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.controls-bar {
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.product-card-enhanced {
    border-radius: 0.5rem !important;
    transition: all 0.3s ease-in-out;
}

.product-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15)!important;
}

.product-card-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}
.product-card-image-wrapper img {
    height: 220px;
    object-fit: contain;
    padding: 1rem;
    transition: transform .3s ease;
}
.product-card-enhanced:hover .product-card-image-wrapper img {
    transform: scale(1.08);
}
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--bs-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
}

.product-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all .3s ease;
}
.product-card-enhanced:hover .product-card-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-title-link {
    transition: color 0.2s ease;
}
.product-title-link:hover {
    color: var(--bs-primary) !important;
}

.product-quick-view-action {
    /* Hide by default */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    
    /* Prepare for smooth transition */
    transition: max-height 0.35s ease-out, opacity 0.3s ease-in-out, margin-top 0.35s ease-out;
}

.product-card-enhanced:hover .product-quick-view-action {
    /* Reveal on hover */
    max-height: 50px; /* Animate to a height that fits the button */
    opacity: 1;
    margin-top: 0.5rem; /* Add spacing between buttons only when visible */
}