/**
 * Deals Website Plugin - Clean Modern Design
 */

:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --accent: #F97316;
    --success: #16A34A;
    --danger: #DC2626;
    --text: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --bg: #FFFFFF;
    --bg-gray: #F9FAFB;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
.dwp-product-page,
.dwp-archive-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   SINGLE PRODUCT PAGE
   ================================ */

.dwp-product-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.dwp-breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.dwp-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.dwp-breadcrumbs a:hover {
    text-decoration: underline;
}

.dwp-breadcrumbs .separator {
    margin: 0 8px;
}

.deal-expired-notice {
    background: #FEE2E2;
    border-left: 4px solid var(--danger);
    color: var(--danger);
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-weight: 500;
}

.dwp-product-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Product Box */
.dwp-product-box {
    background: var(--bg-gray);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
}

.dwp-product-box-inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dwp-product-box-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.dwp-product-image {
    width: 100%;
}

.dwp-box-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.dwp-no-image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 14px;
    border-radius: 8px;
}

.dwp-product-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.dwp-box-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

.dwp-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dwp-chip {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.dwp-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dwp-chip-hidden {
    display: none;
}

.dwp-chip-toggle {
    cursor: pointer;
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dwp-chip-toggle.dwp-chip-inline {
    display: inline-block;
}

.dwp-chip-toggle:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Pricing Section */
.dwp-pricing-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.dwp-price-savings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dwp-price-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dwp-current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
}

.dwp-original-price {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1;
}

.dwp-strikethrough {
    text-decoration: line-through;
}

.dwp-savings-text {
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    background: #DCFCE7;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.dwp-deal-timer {
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    display: inline-block;
    align-self: flex-start;
}

.dwp-cta-button {
    display: block;
    text-align: center;
    padding: 16px 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: var(--shadow);
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 0 0 !important;
    box-sizing: border-box !important;
    word-wrap: break-word;
}

.dwp-cta-button:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.dwp-button-disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.dwp-button-disabled:hover {
    transform: none;
    background: var(--border);
}

/* Article Section */
.dwp-article-section {
    max-width: 720px;
    margin: 0 auto 64px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
}

.dwp-article-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 20px;
    letter-spacing: -0.02em;
}

.dwp-article-section h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
}

.dwp-article-section p {
    margin-bottom: 20px;
}

.dwp-article-section ul,
.dwp-article-section ol {
    margin: 20px 0;
    padding-left: 24px;
}

.dwp-article-section li {
    margin-bottom: 8px;
}

/* Specs Section */
.dwp-specs-section {
    max-width: 800px;
    margin: 0 auto 64px;
}

.dwp-specs-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

/* Bottom Product Box */
.dwp-product-box-bottom .dwp-product-box-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .dwp-product-box-bottom .dwp-product-box-inner {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

.dwp-bottom-box-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dwp-bottom-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.dwp-bottom-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.dwp-price-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.dwp-price-small {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
}



/* Specs Table */
.dwp-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
}


.dwp-specs-table tr {
    border-bottom: 1px solid var(--border);
}

.dwp-specs-table tr:last-child {
    border-bottom: none;
}

.dwp-spec-label {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text);
    width: 40%;
    font-size: 15px;
}

.dwp-spec-value {
    padding: 16px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* Deal Timestamps */
.dwp-deal-timestamps {
    max-width: 800px;
    margin: 32px auto;
}

.dwp-timestamp-item {
    margin: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.dwp-timestamp-item strong {
    color: var(--text);
    font-weight: 600;
}

/* Related */
.dwp-related-section {
    margin-top: 80px;
    padding-top: 0;
}

.dwp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}

.dwp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.dwp-related-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--bg);
}

.dwp-related-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.dwp-related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.dwp-related-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-gray);
    overflow: hidden;
}

.dwp-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dwp-related-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.dwp-related-info {
    padding: 16px;
}

.dwp-related-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dwp-related-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dwp-price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.dwp-price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ================================
   ARCHIVE PAGE
   ================================ */

.dwp-archive-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.dwp-archive-header {
    text-align: center;
    margin-bottom: 48px;
}

.dwp-archive-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px 0;
    letter-spacing: -0.03em;
}

.dwp-archive-subtitle {
    font-size: 18px;
    color: var(--text-muted);
}

.dwp-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dwp-archive-layout {
        grid-template-columns: 1fr;
    }
}

/* Filters */
.dwp-filters-sidebar {
    position: sticky;
    top: 24px;
}

@media (max-width: 1024px) {
    .dwp-filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg);
        z-index: 1000;
        padding: 24px;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .dwp-filters-sidebar.dwp-filters-open {
        left: 0;
    }
}

.dwp-filters-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.dwp-filters-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
}

.dwp-clear-filters {
    width: 100%;
    padding: 10px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.15s ease;
}

.dwp-clear-filters:hover {
    background: var(--border);
}

.dwp-filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.dwp-filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dwp-filter-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dwp-filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dwp-filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dwp-filter-checkbox {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.dwp-filter-label {
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.dwp-filter-count {
    color: var(--text-muted);
    font-size: 12px;
}

/* Search Bar */
.dwp-search-bar {
    margin-bottom: 24px;
}

.dwp-search-form {
    display: flex;
    gap: 0;
    width: 100%;
}

.dwp-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 15px;
    background: var(--bg);
    transition: border-color 0.15s ease;
}

.dwp-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.dwp-search-button {
    padding: 12px 20px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dwp-search-button:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.dwp-search-button svg {
    display: block;
}

/* Sort Dropdown */
.dwp-sort-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.dwp-sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Toolbar */
.dwp-deals-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dwp-results-count {
    font-size: 14px;
    color: var(--text-muted);
}

.dwp-mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .dwp-mobile-filter-toggle {
        display: flex;
    }
}

/* Grid */
.dwp-deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .dwp-deals-grid {
        grid-template-columns: 1fr;
    }
}

.dwp-deal-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dwp-deal-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-2px);
}

.dwp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.dwp-card-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-gray);
    overflow: hidden;
}

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

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

.dwp-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    color: var(--text-muted);
    font-size: 14px;
}

.dwp-card-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
}

.dwp-card-body {
    padding: 16px;
}

.dwp-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.dwp-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.dwp-card-price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.dwp-card-price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.dwp-card-savings {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

/* Show More/Less */
.dwp-card-hidden {
    display: none;
}

.dwp-show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    margin-bottom: 32px;
}

.dwp-show-more-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dwp-show-more-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dwp-show-more-button svg {
    transition: transform 0.2s ease;
}

.dwp-show-more-button.expanded svg {
    transform: rotate(180deg);
}

.dwp-card-expires {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* No Results */
.dwp-no-results {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dwp-no-results svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dwp-no-results h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.dwp-no-results p {
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .dwp-product-title {
        font-size: 26px;
    }
    
    .dwp-current-price {
        font-size: 32px;
    }
    
    .dwp-archive-title {
        font-size: 36px;
    }
    
    .dwp-product-page,
    .dwp-archive-page {
        padding: 16px;
    }
}
