/* ==========================================================================
   DealHub Theme — Main Stylesheet
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/*  CSS Variables / Design Tokens                                              */
/* -------------------------------------------------------------------------- */

:root {
    --dh-color-bg:           #ffffff;
    --dh-color-bg-alt:       #f8f9fa;
    --dh-color-bg-dark:      #1a1a2e;
    --dh-color-text:         #212529;
    --dh-color-text-muted:   #6c757d;
    --dh-color-text-light:   #adb5bd;
    --dh-color-primary:      #0d6efd;
    --dh-color-primary-hover:#0b5ed7;
    --dh-color-accent:       #ff6b35;
    --dh-color-success:      #198754;
    --dh-color-warning:      #ffc107;
    --dh-color-danger:       #dc3545;
    --dh-color-border:       #dee2e6;
    --dh-color-border-light: #e9ecef;
    --dh-color-card:         #ffffff;
    --dh-color-card-hover:   #f8f9fa;

    --dh-font:               'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --dh-font-heading:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --dh-radius-sm:          6px;
    --dh-radius:             10px;
    --dh-radius-lg:          16px;
    --dh-radius-xl:          24px;

    --dh-shadow-sm:          0 1px 3px rgba(0,0,0,.06);
    --dh-shadow:             0 2px 8px rgba(0,0,0,.08);
    --dh-shadow-lg:          0 8px 30px rgba(0,0,0,.12);

    --dh-transition:         0.2s ease;

    --dh-container:          1200px;
    --dh-header-height:      72px;
}

/* -------------------------------------------------------------------------- */
/*  Reset & Base                                                              */
/* -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--dh-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dh-color-text);
    background: var(--dh-color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--dh-color-primary);
    text-decoration: none;
    transition: color var(--dh-transition);
}

a:hover {
    color: var(--dh-color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--dh-font-heading);
    line-height: 1.3;
    margin: 0 0 0.5em;
    color: var(--dh-color-bg-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

/* -------------------------------------------------------------------------- */
/*  Layout: Container                                                         */
/* -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--dh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    padding: 40px 0;
    min-height: 60vh;
}

/* -------------------------------------------------------------------------- */
/*  Header                                                                    */
/* -------------------------------------------------------------------------- */

.dh-header {
    background: var(--dh-color-bg);
    border-bottom: 1px solid var(--dh-color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--dh-header-height);
}

.dh-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.dh-header__logo {
    flex-shrink: 0;
}

.dh-logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--dh-color-bg-dark);
    text-decoration: none;
}

.dh-logo-icon { font-size: 1.5rem; }

/* Navigation */
.dh-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.dh-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.dh-nav__list a {
    display: block;
    padding: 8px 16px;
    color: var(--dh-color-text);
    border-radius: var(--dh-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background var(--dh-transition), color var(--dh-transition);
}

.dh-nav__list a:hover,
.dh-nav__list .current-menu-item > a {
    background: var(--dh-color-bg-alt);
    color: var(--dh-color-primary);
}

/* User Menu */
.dh-header__user {
    flex-shrink: 0;
}

.dh-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dh-user-menu__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--dh-color-text);
}

.dh-user-menu__link img {
    border-radius: 50%;
}

.dh-user-menu__logout {
    font-size: 0.85rem;
    color: var(--dh-color-text-muted);
}

.dh-auth-links {
    display: flex;
    gap: 8px;
}

/* Mobile Toggle */
.dh-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.dh-mobile-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dh-color-text);
    margin: 5px 0;
    transition: var(--dh-transition);
}

/* -------------------------------------------------------------------------- */
/*  Buttons                                                                   */
/* -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--dh-font);
    border: 2px solid transparent;
    border-radius: var(--dh-radius-sm);
    cursor: pointer;
    transition: all var(--dh-transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--dh-color-primary);
    color: #fff;
    border-color: var(--dh-color-primary);
}

.btn--primary:hover {
    background: var(--dh-color-primary-hover);
    border-color: var(--dh-color-primary-hover);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--dh-color-primary);
    border-color: var(--dh-color-primary);
}

.btn--outline:hover {
    background: var(--dh-color-primary);
    color: #fff;
}

.btn--sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn--lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn--accent {
    background: var(--dh-color-accent);
    color: #fff;
    border-color: var(--dh-color-accent);
}

.btn--accent:hover {
    background: #e85d2c;
    color: #fff;
}

/* -------------------------------------------------------------------------- */
/*  Deal Cards                                                                */
/* -------------------------------------------------------------------------- */

.deal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.deal-cards--compact {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.deal-card {
    background: var(--dh-color-card);
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius);
    overflow: hidden;
    transition: transform var(--dh-transition), box-shadow var(--dh-transition);
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dh-shadow-lg);
}

.deal-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--dh-color-bg-alt);
}

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

.deal-card:hover .deal-card__image img {
    transform: scale(1.04);
}

.deal-card__savings {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--dh-color-accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--dh-radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
}

.deal-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.deal-card__title {
    font-size: 1.05rem;
    margin: 0;
}

.deal-card__title a {
    color: var(--dh-color-bg-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.deal-card__provider {
    font-size: 0.85rem;
    color: var(--dh-color-text-muted);
}

.deal-card__prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.deal-card__price-original {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    text-decoration: line-through;
}

.deal-card__price-deal {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dh-color-success);
}

.deal-card__excerpt {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    line-height: 1.5;
}

.deal-card__cta {
    margin-top: auto;
    text-align: center;
}

/* Progress Bar (in-card) */
.deal-card__progress {
    position: relative;
    background: var(--dh-color-bg-alt);
    border-radius: 20px;
    height: 24px;
    overflow: hidden;
}

.deal-card__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dh-color-primary), var(--dh-color-accent));
    border-radius: 20px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.deal-card__progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dh-color-text);
    text-shadow: 0 0 4px rgba(255,255,255,.8);
}

/* Countdown (in-card) */
.deal-card__countdown {
    display: flex;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dh-color-danger);
    align-items: baseline;
    justify-content: center;
}

.deal-card__countdown span {
    background: var(--dh-color-bg-dark);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* -------------------------------------------------------------------------- */
/*  Section Titles                                                            */
/* -------------------------------------------------------------------------- */

.dh-section-title {
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.8rem;
    color: var(--dh-color-bg-dark);
}

/* -------------------------------------------------------------------------- */
/*  Empty State                                                               */
/* -------------------------------------------------------------------------- */

.dh-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--dh-color-text-muted);
}

.dh-empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* -------------------------------------------------------------------------- */
/*  Alert Messages                                                            */
/* -------------------------------------------------------------------------- */

.dh-alert {
    padding: 14px 18px;
    border-radius: var(--dh-radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.dh-alert--warning {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #856404;
}

.dh-alert--error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.dh-alert--success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.dh-alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

/* -------------------------------------------------------------------------- */
/*  Quick Links (Home)                                                        */
/* -------------------------------------------------------------------------- */

.dh-quick-links {
    margin-top: 48px;
}

.dh-quick-links__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.dh-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--dh-color-bg-alt);
    border-radius: var(--dh-radius);
    font-weight: 600;
    color: var(--dh-color-text);
    transition: background var(--dh-transition), transform var(--dh-transition);
}

.dh-quick-link:hover {
    background: var(--dh-color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/*  Single Deal Page                                                          */
/* -------------------------------------------------------------------------- */

.dh-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--dh-color-text-muted);
}

.dh-breadcrumb a {
    color: var(--dh-color-text-muted);
}

.dh-breadcrumb a:hover {
    color: var(--dh-color-primary);
}

.dh-breadcrumb__sep {
    margin: 0 6px;
    color: var(--dh-color-border);
}

.dh-deal-full__header {
    margin-bottom: 24px;
}

.dh-deal-full__title {
    font-size: 2rem;
    margin-bottom: 4px;
}

.dh-deal-full__meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    flex-wrap: wrap;
}

/* 2-col layout: gallery + sidebar */
.dh-deal-full__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-bottom: 40px;
}

.dh-deal-full__gallery {
    position: sticky;
    top: calc(var(--dh-header-height) + 20px);
    align-self: start;
}

.dh-gallery-main {
    border-radius: var(--dh-radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.dh-gallery-main img {
    width: 100%;
    display: block;
}

.dh-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dh-gallery-thumb {
    display: block;
    width: 80px;
    height: 60px;
    border-radius: var(--dh-radius-sm);
    overflow: hidden;
    border: 2px solid var(--dh-color-border);
    transition: border var(--dh-transition);
}

.dh-gallery-thumb:hover {
    border-color: var(--dh-color-primary);
}

.dh-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar */
.dh-deal-full__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dh-deal-prices {
    background: var(--dh-color-bg-alt);
    padding: 20px;
    border-radius: var(--dh-radius);
    text-align: center;
}

.dh-deal-prices__original {
    display: block;
    font-size: 1.2rem;
    color: var(--dh-color-text-muted);
    text-decoration: line-through;
}

.dh-deal-prices__deal {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dh-color-success);
    line-height: 1.2;
}

.dh-deal-prices__savings {
    display: inline-block;
    background: var(--dh-color-accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 8px;
}

/* Countdown Timer (detail) */
.dh-deal-timer {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px;
    background: var(--dh-color-bg-alt);
    border-radius: var(--dh-radius);
}

.dh-timer-block {
    text-align: center;
}

.dh-timer-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dh-color-bg-dark);
    font-variant-numeric: tabular-nums;
}

.dh-timer-label {
    font-size: 0.75rem;
    color: var(--dh-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dh-deal-timer--expired {
    background: #f8d7da;
    color: var(--dh-color-danger);
    font-weight: 700;
    justify-content: center;
}

.dh-deal-timer--expired p {
    margin: 0;
}

/* Progress Bar (detail) */
.dh-progress {
    position: relative;
    background: var(--dh-color-bg-alt);
    border-radius: 20px;
    height: 28px;
    overflow: hidden;
}

.dh-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dh-color-primary), var(--dh-color-success));
    border-radius: 20px;
    transition: width 0.6s ease;
}

.dh-progress__text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 0 4px rgba(255,255,255,.8);
}

/* CTA */
.dh-deal-actions {
    text-align: center;
}

.dh-deal-actions .btn {
    width: 100%;
}

/* Share */
.dh-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--dh-color-border-light);
}

.dh-share__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dh-color-text-muted);
    margin-right: 4px;
}

.dh-share__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    transition: opacity var(--dh-transition);
}

.dh-share__link:hover { opacity: 0.85; color: #fff; }

.dh-share--twitter  { background: #000; }
.dh-share--facebook { background: #1877f2; }
.dh-share--email    { background: var(--dh-color-text-muted); }

/* Content & Details */
.dh-deal-full__content {
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 780px;
}

.dh-deal-full__details {
    margin-bottom: 40px;
    max-width: 780px;
}

.dh-details-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 24px;
    font-size: 0.95rem;
}

.dh-details-list dt {
    font-weight: 600;
    color: var(--dh-color-bg-dark);
}

.dh-details-list dd {
    margin: 0;
    color: var(--dh-color-text-muted);
}

.dh-deal-full__map {
    margin-bottom: 40px;
}

/* Related Deals */
.dh-related-deals {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--dh-color-border);
}

.dh-related-deals h2 {
    margin-bottom: 24px;
}

/* -------------------------------------------------------------------------- */
/*  Deal Archive / Tabs                                                       */
/* -------------------------------------------------------------------------- */

.dh-archive-header {
    margin-bottom: 28px;
}

.dh-archive-title {
    margin-bottom: 16px;
}

.dh-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--dh-color-border);
    padding-bottom: 0;
}

.dh-tab {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dh-color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--dh-transition), border-color var(--dh-transition);
    text-decoration: none;
}

.dh-tab:hover {
    color: var(--dh-color-primary);
}

.dh-tab--active {
    color: var(--dh-color-primary);
    border-color: var(--dh-color-primary);
}

/* Category Filter */
.dh-category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dh-cat-chip {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--dh-color-border);
    color: var(--dh-color-text-muted);
    transition: all var(--dh-transition);
    text-decoration: none;
}

.dh-cat-chip:hover {
    border-color: var(--dh-color-primary);
    color: var(--dh-color-primary);
}

.dh-cat-chip--active {
    background: var(--dh-color-primary);
    color: #fff;
    border-color: var(--dh-color-primary);
}

.dh-cat-chip--active:hover {
    background: var(--dh-color-primary-hover);
    color: #fff;
}

/* Pagination */
.dh-pagination {
    margin-top: 40px;
    text-align: center;
}

.dh-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 3px;
    padding: 0 12px;
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius-sm);
    font-weight: 500;
    color: var(--dh-color-text);
    text-decoration: none;
    transition: all var(--dh-transition);
}

.dh-pagination .page-numbers.current {
    background: var(--dh-color-primary);
    color: #fff;
    border-color: var(--dh-color-primary);
}

.dh-pagination .page-numbers:hover:not(.current) {
    border-color: var(--dh-color-primary);
    color: var(--dh-color-primary);
}

/* -------------------------------------------------------------------------- */
/*  Deal Submission Form                                                      */
/* -------------------------------------------------------------------------- */

.dh-form-page {
    max-width: 800px;
    margin: 0 auto;
}

.dh-form-page__title {
    text-align: center;
    margin-bottom: 32px;
    font-size: 2rem;
}

.dh-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dh-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dh-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dh-form__group--wide {
    grid-column: 1 / -1;
}

.dh-form__group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dh-color-bg-dark);
}

.dh-form__group input,
.dh-form__group select,
.dh-form__group textarea {
    padding: 10px 14px;
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius-sm);
    font-family: var(--dh-font);
    font-size: 0.95rem;
    transition: border-color var(--dh-transition), box-shadow var(--dh-transition);
    background: #fff;
}

.dh-form__group input:focus,
.dh-form__group select:focus,
.dh-form__group textarea:focus {
    outline: none;
    border-color: var(--dh-color-primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.dh-form__group.has-error input,
.dh-form__group.has-error textarea {
    border-color: var(--dh-color-danger);
}

.dh-form__error {
    font-size: 0.8rem;
    color: var(--dh-color-danger);
    font-weight: 500;
}

.dh-form__fieldset {
    border: 1px solid var(--dh-color-border-light);
    border-radius: var(--dh-radius);
    padding: 20px;
}

.dh-form__fieldset legend {
    font-weight: 700;
    font-size: 1rem;
    padding: 0 8px;
}

.dh-form__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dh-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--dh-color-border);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color var(--dh-transition);
}

.dh-checkbox:hover {
    border-color: var(--dh-color-primary);
}

.dh-checkbox input[type="checkbox"] {
    accent-color: var(--dh-color-primary);
}

/* Upload Zone */
.dh-upload-zone {
    border: 2px dashed var(--dh-color-border);
    border-radius: var(--dh-radius);
    padding: 30px;
    text-align: center;
    transition: border-color var(--dh-transition), background var(--dh-transition);
}

.dh-upload-zone.drag-over {
    border-color: var(--dh-color-primary);
    background: rgba(13,110,253,.04);
}

.dh-upload__hint {
    font-size: 0.8rem;
    color: var(--dh-color-text-muted);
    margin-top: 8px;
}

.dh-upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dh-upload-thumb {
    position: relative;
    width: 100px;
    height: 75px;
    border-radius: var(--dh-radius-sm);
    overflow: hidden;
    border: 1px solid var(--dh-color-border);
}

.dh-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dh-upload-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dh-upload-remove:hover {
    background: var(--dh-color-danger);
}

/* Form Actions */
.dh-form__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--dh-color-border-light);
}

/* Preview */
.dh-preview__card {
    background: var(--dh-color-bg-alt);
    border-radius: var(--dh-radius);
    padding: 32px;
    margin-bottom: 24px;
}

.dh-preview__prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 16px 0;
}

.dh-preview__price-original {
    font-size: 1.2rem;
    color: var(--dh-color-text-muted);
    text-decoration: line-through;
}

.dh-preview__price-deal {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dh-color-success);
}

/* -------------------------------------------------------------------------- */
/*  Footer                                                                    */
/* -------------------------------------------------------------------------- */

.dh-footer {
    background: var(--dh-color-bg-dark);
    color: var(--dh-color-text-light);
    padding: 48px 0 0;
    margin-top: 60px;
}

.dh-footer a {
    color: var(--dh-color-text-light);
}

.dh-footer a:hover {
    color: #fff;
}

.dh-footer__widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.dh-footer__col .widget-title {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
}

.dh-footer__col .widget {
    margin-bottom: 20px;
}

.dh-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 12px;
}

.dh-footer__links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* -------------------------------------------------------------------------- */
/*  Responsive                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .dh-header__inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }

    .dh-nav {
        display: none;
        width: 100%;
        order: 3;
    }

    .dh-nav.is-open {
        display: block;
    }

    .dh-nav__list {
        flex-direction: column;
        padding: 8px 0;
    }

    .dh-mobile-toggle {
        display: block;
    }

    .dh-header__user {
        margin-left: auto;
    }

    .dh-deal-full__layout {
        grid-template-columns: 1fr;
    }

    .dh-deal-full__gallery {
        position: static;
    }

    .deal-cards {
        grid-template-columns: 1fr;
    }

    .dh-form__row {
        grid-template-columns: 1fr;
    }

    .dh-quick-links__grid {
        grid-template-columns: 1fr 1fr;
    }

    .dh-footer__widgets {
        grid-template-columns: 1fr 1fr;
    }

    .dh-footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .dh-timer-value {
        font-size: 1.3rem;
    }

    .dh-deal-timer {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .deal-cards {
        grid-template-columns: 1fr;
    }

    .dh-deal-timer {
        gap: 6px;
    }

    .dh-timer-value {
        font-size: 1.1rem;
    }

    .dh-quick-links__grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/*  Dashboard                                                                 */
/* -------------------------------------------------------------------------- */

.dh-dashboard__title {
    margin-bottom: 28px;
}

/* Stats cards */
.dh-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.dh-stat-card {
    background: var(--dh-color-bg-alt);
    border-radius: var(--dh-radius);
    padding: 24px;
    text-align: center;
    border-left: 4px solid var(--dh-color-border);
}

.dh-stat-card--active {
    border-color: var(--dh-color-success);
}

.dh-stat-card--pending {
    border-color: var(--dh-color-warning);
}

.dh-stat-card__number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--dh-color-bg-dark);
    line-height: 1.2;
}

.dh-stat-card__label {
    font-size: 0.85rem;
    color: var(--dh-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard actions bar */
.dh-dashboard__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Deals table */
.dh-dashboard__deals {
    margin-bottom: 48px;
}

.dh-dashboard__deals h2 {
    margin-bottom: 16px;
}

.dh-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius);
}

.dh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dh-table thead {
    background: var(--dh-color-bg-alt);
}

.dh-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dh-color-text-muted);
    border-bottom: 2px solid var(--dh-color-border);
}

.dh-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--dh-color-border-light);
    vertical-align: middle;
}

.dh-table tr:last-child td {
    border-bottom: none;
}

.dh-table tr:hover {
    background: var(--dh-color-bg-alt);
}

.dh-table__title {
    font-weight: 500;
}

.dh-table__link {
    color: var(--dh-color-bg-dark);
    display: flex;
    align-items: center;
}

.dh-table__link:hover {
    color: var(--dh-color-primary);
}

.dh-table__actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.dh-row--expired {
    opacity: 0.6;
}

/* Badges */
.dh-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.dh-badge--success {
    background: #d1e7dd;
    color: #0f5132;
}

.dh-badge--warning {
    background: #fff3cd;
    color: #856404;
}

.dh-badge--secondary {
    background: var(--dh-color-bg-alt);
    color: var(--dh-color-text-muted);
}

.dh-badge--danger {
    background: #f8d7da;
    color: #842029;
}

.text-muted { color: var(--dh-color-text-muted); }
.text-danger { color: var(--dh-color-danger); }

/* Dashboard account section */
.dh-dashboard__account {
    background: var(--dh-color-bg-alt);
    border-radius: var(--dh-radius);
    padding: 24px;
}

.dh-dashboard__account h2 {
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .dh-dashboard__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .dh-table {
        font-size: 0.8rem;
    }

    .dh-table th,
    .dh-table td {
        padding: 8px 10px;
    }

    .dh-dashboard__actions {
        flex-direction: column;
    }

    .dh-dashboard__actions .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dh-dashboard__stats {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/*  Utility                                                                   */
/* -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------- */
/*  Audit Fixes — Missing CSS Rules                                           */
/* -------------------------------------------------------------------------- */

/* Preview description block */
.dh-preview__description {
    line-height: 1.7;
    color: var(--dh-color-text);
    margin: 12px 0;
}

.dh-preview__coupon {
    display: inline-block;
    background: #d1e7dd;
    color: #0f5132;
    padding: 6px 14px;
    border-radius: var(--dh-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 8px 0;
}

.dh-preview__location {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    margin: 8px 0;
}

/* Sidebar */
.dh-sidebar {
    padding: 24px;
}

.dh-sidebar .widget {
    margin-bottom: 24px;
}

.dh-sidebar .widget:last-child {
    margin-bottom: 0;
}

.dh-sidebar .widget-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dh-color-border);
}

/* Form footer (login/register links below form) */
.dh-form__footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    margin-top: 0;
}

.dh-form__footer a {
    font-weight: 600;
}

/* Success button state (coupon copied) */
.btn--success,
.btn--success:hover {
    background: var(--dh-color-success);
    border-color: var(--dh-color-success);
    color: #fff;
}

/* -------------------------------------------------------------------------- */
/*  Widget Styles                                                             */
/* -------------------------------------------------------------------------- */

/* Latest Deals widget — vertical compact cards */
.dh-widget-deals {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dh-widget-deals .deal-card--compact {
    flex-direction: row;
    gap: 12px;
    border: 1px solid var(--dh-color-border-light);
    border-radius: var(--dh-radius-sm);
    overflow: hidden;
}

.dh-widget-deals .deal-card--compact .deal-card__image {
    width: 100px;
    min-width: 100px;
    aspect-ratio: 1 / 1;
}

.dh-widget-deals .deal-card--compact .deal-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dh-widget-deals .deal-card--compact .deal-card__body {
    padding: 10px 12px;
    flex: 1;
    gap: 4px;
}

.dh-widget-deals .deal-card--compact .deal-card__title {
    font-size: 0.9rem;
}

.dh-widget-deals .deal-card--compact .deal-card__price-deal {
    font-size: 1rem;
}

.dh-widget-deals .deal-card--compact .deal-card__price-original {
    font-size: 0.78rem;
}

.dh-widget-deals .deal-card--compact .deal-card__savings {
    font-size: 0.72rem;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
}

.dh-widget-deals .deal-card--compact .deal-card__progress,
.dh-widget-deals .deal-card--compact .deal-card__countdown,
.dh-widget-deals .deal-card--compact .deal-card__excerpt,
.dh-widget-deals .deal-card--compact .deal-card__cta {
    display: none;
}

/* Empty widget state */
.dh-widget-empty {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    text-align: center;
    padding: 12px 0;
}

/* Category List Widget */
.dh-widget-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dh-widget-cat-item {
    border-bottom: 1px solid var(--dh-color-border-light);
}

.dh-widget-cat-item:last-child {
    border-bottom: none;
}

.dh-widget-cat-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--dh-color-text);
    font-size: 0.9rem;
    transition: color var(--dh-transition);
}

.dh-widget-cat-item a:hover {
    color: var(--dh-color-primary);
}

.dh-widget-cat-count {
    font-size: 0.8rem;
    color: var(--dh-color-text-muted);
    font-weight: 500;
}

/* Category Dropdown Widget */
.dh-widget-cat-dropdown {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius-sm);
    font-family: var(--dh-font);
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.dh-widget-cat-dropdown:focus {
    outline: none;
    border-color: var(--dh-color-primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

/* Search Form Widget */
.dh-search-form {
    width: 100%;
}

.dh-search-form__wrap {
    display: flex;
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius-sm);
    overflow: hidden;
    transition: border-color var(--dh-transition);
}

.dh-search-form__wrap:focus-within {
    border-color: var(--dh-color-primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.dh-search-form__field {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-family: var(--dh-font);
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}

.dh-search-form__submit {
    background: var(--dh-color-primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dh-transition);
}

.dh-search-form__submit:hover {
    background: var(--dh-color-primary-hover);
}

.dh-search-form__submit .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* -------------------------------------------------------------------------- */
/*  Modal                                                                     */
/* -------------------------------------------------------------------------- */

.dh-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dh-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
}

.dh-modal__content {
    position: relative;
    background: #fff;
    border-radius: var(--dh-radius);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--dh-shadow-lg);
}

.dh-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dh-color-text-muted);
    line-height: 1;
}

.dh-modal__close:hover {
    color: var(--dh-color-text);
}

/* Blog post styles (single, archive, search) */
.dh-post__thumbnail {
    border-radius: var(--dh-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.dh-post__title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.dh-post__meta {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dh-post__content {
    line-height: 1.8;
    font-size: 1.05rem;
    max-width: 780px;
}

.dh-post__tags {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--dh-color-border-light);
}

.dh-post__tags-label {
    font-weight: 600;
    margin-right: 8px;
}

.dh-post__nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--dh-color-border);
    font-weight: 600;
}

.dh-page__title {
    font-size: 2rem;
    margin-bottom: 2px;
}

.dh-page__content {
    line-height: 1.8;
    font-size: 1.05rem;
    max-width: 780px;
}

/* Blog post cards (archive, search) */
.dh-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.dh-post-card {
    border: 1px solid var(--dh-color-border);
    border-radius: var(--dh-radius);
    overflow: hidden;
    transition: transform var(--dh-transition), box-shadow var(--dh-transition);
}

.dh-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dh-shadow-lg);
}

.dh-post-card__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.dh-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.dh-post-card:hover .dh-post-card__image img {
    transform: scale(1.04);
}

.dh-post-card__body {
    padding: 16px;
}

.dh-post-card__title {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.dh-post-card__title a {
    color: var(--dh-color-bg-dark);
}

.dh-post-card__title a:hover {
    color: var(--dh-color-primary);
}

.dh-post-card__meta {
    font-size: 0.8rem;
    color: var(--dh-color-text-muted);
    margin-bottom: 8px;
}

.dh-post-card__excerpt {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Comments */
.dh-comments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--dh-color-border);
}

.dh-comments__title {
    margin-bottom: 20px;
}

.dh-comments__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dh-comments__list .comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--dh-color-border-light);
}

.dh-comments__list .comment:first-child {
    padding-top: 0;
}

.dh-comments__list .comment-author img {
    border-radius: 50%;
    float: left;
    margin-right: 12px;
}

.dh-comments__list .comment-meta {
    font-size: 0.85rem;
    color: var(--dh-color-text-muted);
    margin-bottom: 4px;
}

.dh-comments__list .comment-content {
    font-size: 0.95rem;
}

.dh-comments__nav {
    margin: 16px 0;
}

.dh-comments__closed {
    font-size: 0.9rem;
    color: var(--dh-color-text-muted);
    font-style: italic;
}
