/* === WooCommerce Unique Slider Frontend Styles === */

/* --- Slider Wrapper & Header --- */
.wc-unique-slider-wrapper {
    max-width: 1200px; /* Adjust as needed */
    margin: 30px auto;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    padding: 0 20px; /* Base padding */
    box-sizing: border-box;
}
.wc-unique-slider-wrapper .slider-header {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--slider-main-color, #a4ca5a); /* Use CSS variable */
}
.wc-unique-slider-wrapper .slider-subheader {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #555;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Slider Controls & Container --- */
.wc-unique-slider-wrapper .slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 -10px; /* Adjust to slightly overlap arrows */
}
.wc-unique-slider-wrapper .slider {
    display: flex;
    gap: 15px; /* Space between items */
    overflow-x: scroll; /* Enable native scroll */
    scroll-snap-type: x mandatory; /* Snap scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling iOS */
    padding: 20px 5px; /* Vertical padding, small horizontal for snapping */
    margin: 0; /* Let controls handle spacing */
    scrollbar-width: none; /* Hide scrollbar Firefox */
    flex-grow: 1; /* Allow slider to take available space */
    box-sizing: border-box;
    outline: none; /* Remove potential outline on focus */
}
.wc-unique-slider-wrapper .slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

/* --- Slider Item --- */
.wc-unique-slider-wrapper .slider-item {
    flex: 0 0 calc(20% - 15px); /* Default: 5 items (adjust percentage and gap) */
    scroll-snap-align: start; /* Snap alignment */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 180px; /* Ensure items don't get too small */
    overflow: hidden; /* Ensure content doesn't overflow rounded corners */
}
.wc-unique-slider-wrapper .slider-item:focus-visible { /* Better focus styling */
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--slider-main-color, #a4ca5a); /* WP-like focus using variable */
}
.wc-unique-slider-wrapper .slider-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* --- Image Wrapper (Mobile Fix Applied) --- */
.wc-unique-slider-wrapper .slider-item-image-wrapper {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 10px; /* Keep radius on wrapper */
    border-top-right-radius: 10px;
    background-color: #f0f0f0; /* Loading placeholder */
    aspect-ratio: 1 / 1; /* Default to square images - ADJUST IF NEEDED (e.g., 4/3, 16/9) */
    width: 100%;
}
.wc-unique-slider-wrapper .slider-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Or 'contain' if aspect ratio varies */
    border-radius: 0; /* Remove radius from img itself */
}

/* --- Discount Badge --- */
.wc-unique-slider-wrapper .discount-code-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--slider-main-color, #a4ca5a); /* Use CSS variable */
    color: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 5px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    z-index: 10;
    transition: background-color 0.3s;
}
.wc-unique-slider-wrapper .discount-code-badge .code-label {
    margin-right: 4px;
    opacity: 0.9;
    font-weight: normal; /* Make label slightly less prominent */
}
.wc-unique-slider-wrapper .discount-code-badge:hover,
.wc-unique-slider-wrapper .discount-code-badge:focus {
    background-color: #333; /* Darker hover */
}

/* --- Content Inside Item --- */
.wc-unique-slider-wrapper .slider-item-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to fill space */
    justify-content: center; /* Center vertically */
}
.wc-unique-slider-wrapper .promo-title {
    font-size: 0.95rem;
    font-weight: 600; /* Slightly less bold than header */
    margin: 5px 0;
    color: #333;
    line-height: 1.3;
}
.wc-unique-slider-wrapper .promo-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 5px 0;
    line-height: 1.3;
}
.wc-unique-slider-wrapper .discount-amount {
    font-size: 0.85rem;
    color: #444;
    margin: 8px 0;
}
.wc-unique-slider-wrapper .discount-amount a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}
.wc-unique-slider-wrapper .discount-amount a:hover {
    text-decoration: underline;
}
.wc-unique-slider-wrapper .expiration-countdown {
    font-size: 0.75rem;
    color: #777;
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
    padding-top: 5px;
}
.wc-unique-slider-wrapper .deal-expired .expiration-countdown {
    color: #d9534f; /* Red for expired text */
}


/* --- Slider Arrows --- */
.wc-unique-slider-wrapper .slider-arrow {
    background: var(--slider-main-color, #a4ca5a);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.2s, background-color 0.3s;
    display: flex; /* Center icon */
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    /* Removed absolute positioning for flex layout */
}
.wc-unique-slider-wrapper .slider-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
}
.wc-unique-slider-wrapper .slider-arrow:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.1);
    background-color: #333;
}
.wc-unique-slider-wrapper .slider-arrow.left { margin-right: 5px; }
.wc-unique-slider-wrapper .slider-arrow.right { margin-left: 5px; }

/* --- Pagination Dots --- */
.wc-unique-slider-wrapper .pagination-dots {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding: 0;
}
.wc-unique-slider-wrapper .pagination-dot {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 0;
    display: inline-block; /* Ensure display */
}
.wc-unique-slider-wrapper .pagination-dot.active {
    background: var(--slider-main-color, #a4ca5a);
}
.wc-unique-slider-wrapper .pagination-dot:focus-visible { /* Better focus */
    outline: 2px solid var(--slider-main-color, #a4ca5a);
    outline-offset: 2px;
}

/* --- Slider Buttons Below Slider --- */
.wc-unique-slider-wrapper .slider-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.wc-unique-slider-wrapper .slider-buttons button {
    background-color: var(--slider-main-color, #a4ca5a);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 0.9rem;
    font-weight: bold;
}
.wc-unique-slider-wrapper .slider-buttons button:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* --- Modal Styles --- */
.wc-unique-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
}
.wc-unique-modal .modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px; /* Adjust max width */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: left; /* Reset text align */
}
.wc-unique-modal .close {
    color: #aaa;
    position: absolute;
    top: 10px; right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none; /* Ensure button styles don't interfere */
    border: none;
    padding: 0;
}
.wc-unique-modal .close:hover,
.wc-unique-modal .close:focus { color: black; text-decoration: none; outline: none; }
.wc-unique-modal .modal-footer-text { margin-top: 15px; font-size: 0.9em; color: #555; }
.wc-unique-modal .modal-footer-text a { color: var(--slider-main-color, #a4ca5a); text-decoration: none; }
.wc-unique-modal .modal-footer-text a:hover { text-decoration: underline; }
/* Basic CF7 styling inside modal */
.wc-unique-modal .wpcf7-form p { margin-bottom: 15px; }
.wc-unique-modal .wpcf7-form input[type="text"],
.wc-unique-modal .wpcf7-form input[type="email"],
.wc-unique-modal .wpcf7-form textarea { width: 100%; padding: 8px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.wc-unique-modal .wpcf7-submit { background-color: var(--slider-main-color, #a4ca5a); color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; transition: background-color 0.3s; }
.wc-unique-modal .wpcf7-submit:hover { background-color: #333; }


/* --- Slider Responsive Adjustments --- */
@media (max-width: 1024px) {
    .wc-unique-slider-wrapper .slider-item { flex-basis: calc(25% - 15px); } /* 4 items */
}
@media (max-width: 768px) {
    .wc-unique-slider-wrapper { padding: 0 10px; }
    .wc-unique-slider-wrapper .slider-item { flex-basis: calc(33.33% - 12px); gap: 12px; min-width: 160px; } /* ~3 items */
    /* Hide desktop arrows on smaller screens, rely on swipe/dots */
    .wc-unique-slider-wrapper .slider-arrow { display: none; }
    .wc-unique-slider-wrapper .slider-controls { margin: 0; } /* Remove margin needed for arrows */
}
@media (max-width: 480px) {
    .wc-unique-slider-wrapper .slider-item { flex-basis: calc(50% - 10px); gap: 10px; min-width: 140px; } /* 2 items */
     .wc-unique-slider-wrapper .slider-header { font-size: 1.5rem; }
     .wc-unique-modal .modal-content { width: 95%; margin: 15% auto;}
}

/* --- Unique Discount Banner Styles --- */
.unique-discount-banner.wc-unique-banner {
    width: 100%;
    max-width: 450px; /* Adjust as needed */
    margin: 20px auto;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-left-width: 5px; /* Accent border on the left */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    box-sizing: border-box;
}
.unique-discount-banner .banner-content { /* Wrapper for content */
    /* Add styles if needed, e.g., display: flex */
}
.unique-discount-banner .discount-text {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 8px;
    line-height: 1.4;
}
.unique-discount-banner .discount-text strong { font-weight: bold; }
.unique-discount-banner .discount-code-box {
    background-color: var(--slider-main-color, #a4ca5a); /* Use variable */
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 3px;
    font-size: 0.95em;
    border: none;
    vertical-align: baseline; /* Align better with text */
}
.unique-discount-banner .discount-code-box:hover,
.unique-discount-banner .discount-code-box:focus { background-color: #333; outline: none; }
.unique-discount-banner .promo-subtitle {
    font-size: 0.9rem;
    color: #555;
    margin: 8px 0;
}
.unique-discount-banner .countdown-timer {
    font-size: 0.9rem;
    color: #777;
    font-weight: bold;
    margin-top: 10px;
}
.unique-discount-banner.deal-expired .countdown-timer { color: #d9534f; }

@media (max-width: 480px) {
    .unique-discount-banner.wc-unique-banner { padding: 10px 15px; max-width: 95%; }
    .unique-discount-banner .discount-text { font-size: 1rem; }
}


/* ======================================== */
/* === UPDATED: Deals Page Styles [wc_deals_page] === */
/* ======================================== */

.wc-deals-page-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 40px auto; /* Increased margin */
    padding: 0 15px;
    max-width: 1200px;
    box-sizing: border-box;
}

.wc-deals-page-wrapper .wc-section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem); /* Larger title */
    font-weight: 700; /* Bolder */
    color: #2c3e50; /* Darker color */
    margin-bottom: 25px; /* More space below title */
    padding-bottom: 15px; /* More padding */
    border-bottom: 3px solid var(--slider-main-color, #a4ca5a); /* Thicker border */
    text-align: center; /* Center align title */
}

.wc-active-deals-section {
    margin-bottom: 60px; /* More space between sections */
}

.wc-active-deals-grid {
    display: grid;
    /* More responsive columns */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px; /* Increased gap */
}

.wc-active-deals-grid .deal-item {
    background: #fff;
    border: 1px solid #e8e8e8; /* Lighter border */
    border-radius: 12px; /* More rounded corners */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* Added transform transition */
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle initial shadow */
}
.wc-active-deals-grid .deal-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); /* Enhanced hover shadow */
    transform: translateY(-5px); /* Lift effect on hover */
}

.wc-active-deals-grid .deal-item-link-wrap {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wc-active-deals-grid .deal-item-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5; /* Slightly different placeholder bg */
    aspect-ratio: 1 / 1; /* Changed to square aspect ratio */
    width: 100%;
}
.wc-active-deals-grid .deal-item-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease; /* Add zoom effect on hover */
}
.wc-active-deals-grid .deal-item:hover .deal-item-image-wrapper img {
    transform: scale(1.05); /* Zoom image slightly on card hover */
}

.wc-active-deals-grid .deal-item-content {
    padding: 20px; /* Increased padding */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.wc-active-deals-grid .deal-item-content .promo-title {
    font-size: 1.1rem; /* Slightly larger title */
    font-weight: 600;
    color: #34495e; /* Darker blue-grey */
    margin: 0 0 8px 0; /* Adjusted margin */
    line-height: 1.4;
}
.wc-active-deals-grid .deal-item-content .promo-subtitle {
    font-size: 0.9rem; /* Slightly larger subtitle */
    color: #7f8c8d; /* Greyer color */
    margin: 0 0 15px 0; /* Increased margin */
    line-height: 1.4;
    flex-grow: 1;
}
.wc-active-deals-grid .deal-item-content .discount-amount {
    font-size: 1rem; /* Larger discount text */
    font-weight: 700; /* Bolder discount */
    color: var(--slider-main-color, #a4ca5a); /* Use accent color */
    margin-top: auto; /* Push to bottom if subtitle is short */
    padding-top: 10px; /* Space above discount */
}
.wc-active-deals-grid .deal-item-content .discount-amount .deal-target-name {
    display: block;
    font-size: 0.85em;
    font-weight: 500; /* Normal weight */
    color: #95a5a6; /* Lighter grey */
    margin-top: 5px;
}


.wc-active-deals-grid .deal-item-footer {
    padding: 15px 20px; /* Increased padding */
    background-color: #f8f9fa; /* Lighter footer bg */
    border-top: 1px solid #f1f1f1; /* Lighter border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* Increased gap */
}
/* Style the copy code button */
.wc-active-deals-grid .deal-item-footer .discount-code-box {
    background-color: var(--slider-main-color, #a4ca5a);
    color: #fff;
    border: none;
    border-radius: 5px; /* Slightly less rounded */
    padding: 6px 12px; /* Adjusted padding */
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Add subtle shadow */
}
.wc-active-deals-grid .deal-item-footer .discount-code-box:hover {
    background-color: #333;
    transform: translateY(-1px); /* Subtle lift */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.wc-active-deals-grid .deal-item-footer .expiration-countdown {
    font-size: 0.8rem; /* Slightly larger */
    color: #555; /* Darker grey */
    font-weight: 500; /* Less bold */
    white-space: nowrap;
}
/* Style for expired state within the grid (if ever needed) */
.wc-active-deals-grid .deal-item.deal-expired .deal-item-footer .expiration-countdown {
    color: #e74c3c; /* Red for expired */
    font-weight: bold;
}


.wc-no-deals-message {
    text-align: center;
    padding: 30px 15px;
    color: #777;
    font-size: 1.1em;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
}

/* Expired Deals Section - Improved List */
.wc-expired-deals-section {
    margin-top: 60px; /* More space */
    padding-top: 30px; /* Space above list */
    border-top: 1px solid #eee; /* Separator line */
}

.wc-expired-deals-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Remove border/background from ul, apply to li */
}

.wc-expired-deals-list .expired-deal-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* More padding */
    margin-bottom: 10px; /* Space between items */
    border: 1px solid #e8e8e8;
    border-radius: 6px; /* Rounded corners */
    background-color: #fff; /* White background */
    box-shadow: 0 1px 3px rgba(0,0,0,0.04); /* Subtle shadow */
    gap: 15px; /* Increased gap */
}

.wc-expired-deals-list .expired-promo-text {
    flex-grow: 1;
    font-weight: 500;
    color: #555; /* Slightly darker */
    margin-right: 15px;
    font-size: 0.95rem; /* Slightly larger */
}
.wc-expired-deals-list .expired-code {
    background-color: #f1f1f1; /* Lighter grey background */
    padding: 3px 8px; /* Adjusted padding */
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
    margin-right: 15px;
    font-family: monospace; /* Monospace for code */
}
.wc-expired-deals-list .expired-date {
    font-size: 0.9em; /* Slightly larger */
    color: #999; /* Lighter grey */
    white-space: nowrap;
}

/* Responsive adjustments for Deals Page - Refined */
@media (max-width: 768px) {
    .wc-active-deals-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Adjust min size */
        gap: 20px;
    }
    .wc-expired-deals-list .expired-deal-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .wc-expired-deals-list .expired-promo-text,
    .wc-expired-deals-list .expired-code {
        margin-right: 0;
        margin-bottom: 8px; /* Increased bottom margin */
    }
}

@media (max-width: 520px) { /* Adjusted breakpoint */
     .wc-active-deals-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 15px; /* Reduced gap for single column */
    }
     .wc-deals-page-wrapper .wc-section-title {
        font-size: 1.5rem; /* Adjusted title size */
    }
     .wc-expired-deals-list .expired-deal-item {
        padding: 12px 15px; /* Adjust padding */
    }
}
