/* =============================================================================
   WP Coupon Store - Public CSS
   ============================================================================= */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
    --wcs-primary:      #2563eb;
    --wcs-primary-dark: #1d4ed8;
    --wcs-success:      #16a34a;
    --wcs-warning:      #d97706;
    --wcs-danger:       #dc2626;
    --wcs-gray-50:      #f9fafb;
    --wcs-gray-100:     #f3f4f6;
    --wcs-gray-200:     #e5e7eb;
    --wcs-gray-400:     #9ca3af;
    --wcs-gray-600:     #4b5563;
    --wcs-gray-800:     #1f2937;
    --wcs-white:        #ffffff;
    --wcs-radius:       10px;
    --wcs-shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --wcs-shadow-hover: 0 4px 6px rgba(0,0,0,.07), 0 10px 15px rgba(0,0,0,.1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
.wcs-store-page,
.wcs-archive {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.wcs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}
.wcs-btn:active { transform: scale(.97); }

.wcs-btn--primary {
    background: var(--wcs-primary);
    color: var(--wcs-white);
}
.wcs-btn--primary:hover { background: var(--wcs-primary-dark); color: var(--wcs-white); }

.wcs-btn--copy {
    background: var(--wcs-primary);
    color: var(--wcs-white);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
}
.wcs-btn--copy:hover  { background: var(--wcs-primary-dark); }
.wcs-btn--copy:disabled { background: var(--wcs-gray-400); cursor: not-allowed; }
.wcs-btn--copy.wcs-copied { background: var(--wcs-success); }

.wcs-btn--deal {
    width: 210px;
    height: 48px;
    padding: 0 20px;
    background: #f97316;
    color: #fff;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
}
.wcs-btn--deal:hover { background: #ea6c00; color: #fff; }

/* --------------------------------------------------------------------------
   Store Header
   -------------------------------------------------------------------------- */
.wcs-store-header {
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: var(--wcs-radius);
    padding: 28px 32px;
    margin: 24px 0 20px;
    box-shadow: var(--wcs-shadow);
}

.wcs-store-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.wcs-store-header__logo {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border: 1px solid var(--wcs-gray-200);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wcs-gray-50);
}
.wcs-store-header__logo img.wcs-store-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}
.wcs-store-logo-placeholder {
    font-size: 36px;
    font-weight: 700;
    color: var(--wcs-primary);
}

.wcs-store-header__info { flex: 1; }

.wcs-store-header__name {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: var(--wcs-gray-800);
}

.wcs-store-header__desc {
    margin: 0 0 12px;
    color: var(--wcs-gray-600);
    font-size: 14px;
}

.wcs-store-header__stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.wcs-stat {
    font-size: 14px;
    color: var(--wcs-gray-600);
}
.wcs-stat strong {
    color: var(--wcs-gray-800);
    font-size: 16px;
    margin-right: 4px;
}
.wcs-stat--cashback strong { color: var(--wcs-success); }

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.wcs-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--wcs-gray-200);
    padding-bottom: 0;
}
.wcs-filter-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wcs-gray-600);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.wcs-filter-btn:hover             { color: var(--wcs-primary); }
.wcs-filter-btn--active           { color: var(--wcs-primary); border-bottom-color: var(--wcs-primary); }

/* Filter bar layout khi có sort */
.wcs-filter-bar {
    justify-content: space-between;
    align-items: center;
}
.wcs-filter-bar__tabs { display: flex; gap: 8px; }

/* Sort dropdown */
.wcs-sort-select {
    padding: 7px 12px;
    font-size: 13px;
    border: 1px solid var(--wcs-gray-200);
    border-radius: 8px;
    background: var(--wcs-white);
    color: var(--wcs-gray-600);
    cursor: pointer;
    outline: none;
}
.wcs-sort-select:focus { border-color: var(--wcs-primary); }

/* Load More */
.wcs-load-more-wrap {
    text-align: center;
    margin: 24px 0;
}
.wcs-btn--load-more {
    background: var(--wcs-white);
    color: var(--wcs-primary);
    border: 2px solid var(--wcs-primary);
    padding: 12px 32px;
    font-size: 15px;
    border-radius: 50px;
    gap: 8px;
    transition: background .15s, color .15s;
}
.wcs-btn--load-more:hover {
    background: var(--wcs-primary);
    color: var(--wcs-white);
}
.wcs-btn--load-more:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.wcs-remaining {
    font-size: 13px;
    font-weight: 400;
    opacity: .75;
}

/* --------------------------------------------------------------------------
   Coupon Card — CouponFollow style
   -------------------------------------------------------------------------- */
.wcs-coupon-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0 20px;
    background: var(--wcs-white);
    border: 1px solid #bcc6d7;
    border-radius: 12px;
    padding: 16px 0 16px 0;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    transition: box-shadow .2s;
    position: relative;
    min-height: 140px;
    align-items: center;
}
.wcs-coupon-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}
.wcs-coupon-card--expired {
    opacity: .55;
    filter: grayscale(.5);
}

/* Col 1: Discount Box (dashed separator bên phải) */
.wcs-coupon-card__badge {
    position: relative;
    width: 150px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    align-self: stretch;
}
.wcs-coupon-card__badge::after {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background-image: repeating-linear-gradient(
        to bottom,
        #bcc6d7 0, #bcc6d7 6px,
        transparent 6px, transparent 12px
    );
}
.wcs-discount-label {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
}
.wcs-coupon-card--deal .wcs-discount-label { color: #f97316; }
.wcs-type-label {
    display: none;
}

/* Col 2: Info */
.wcs-coupon-card__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
}
.wcs-coupon-card__title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
.wcs-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--wcs-success);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 2px 8px;
    flex-shrink: 0;
}
.wcs-coupon-card__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wcs-coupon-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.wcs-meta-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.wcs-meta-tag--code { background: #eff6ff; color: var(--wcs-primary); }
.wcs-meta-tag--deal { background: #fff7ed; color: #f97316; }
.wcs-meta-item {
    font-size: 12px;
    color: var(--wcs-gray-400);
}
.wcs-meta-item--today {
    color: var(--wcs-success);
    font-weight: 600;
}

/* Expiry badges */
.wcs-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.wcs-badge--expired { background: #fef2f2; color: var(--wcs-danger); }
.wcs-badge--urgent  { background: #fff7ed; color: var(--wcs-danger); }
.wcs-badge--warning { background: #fffbeb; color: var(--wcs-warning); }
.wcs-badge--normal  { background: var(--wcs-gray-100); color: var(--wcs-gray-600); }

/* Col 3: CTA */
.wcs-coupon-card__cta {
    padding-right: 16px;
    display: flex;
    align-items: center;
}

/* ---- Show Coupon Code — CouponFollow style ---- */
.wcs-reveal {
    position: relative;
    display: flex;
    width: 210px;
    height: 48px;
    border: none;
    border-radius: 2px;
    overflow: hidden;
}

/* Code nền (phía sau cover) */
.wcs-reveal__code {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    background: #edf2ff;
    background-image:
        repeating-linear-gradient(0deg, #0002 0, #0002 6px, transparent 6px, transparent 10px),
        repeating-linear-gradient(90deg, #0002 0, #0002 6px, transparent 6px, transparent 10px),
        repeating-linear-gradient(180deg, #0002 0, #0002 6px, transparent 6px, transparent 10px),
        repeating-linear-gradient(270deg, #0002 0, #0002 6px, transparent 6px, transparent 10px);
    background-size: 1px 100%, 100% 1px, 1px 100%, 100% 1px;
    background-position: 0 0, 0 0, 100% 0, 0 100%;
    background-repeat: no-repeat;
    font-family: monospace;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    letter-spacing: .08em;
    border-radius: 2px;
}

/* Cover — "Show Coupon Code" */
.wcs-reveal__cover {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 100%;
    background: #3258b3;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 2px 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: width .3s ease, background .15s;
    overflow: hidden;
    padding: 0 16px;
}
.wcs-reveal__cover:hover {
    width: 170px;
    background: #487eff;
}
.wcs-reveal__cover:active { background: #487eff; }
.wcs-reveal__cover:disabled {
    background: var(--wcs-gray-400);
    cursor: not-allowed;
}
.wcs-reveal__cover-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fold/peel triangle */
.wcs-reveal__peel {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 12px 12px 0;
    border-color: transparent #1d3266 transparent transparent;
    z-index: 3;
}

/* Code wrapper compat */
.wcs-code-wrapper { display: flex; }

/* Grid card: reveal full width */
.wcs-reveal--grid { width: 100%; }
.wcs-reveal--grid .wcs-reveal__cover {
    width: calc(100% - 30px);
    border-radius: 2px;
    text-decoration: none;
}
.wcs-reveal--grid .wcs-reveal__cover:hover { width: calc(100% - 50px); }
.wcs-reveal--grid-deal {
    width: 100% !important;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Coupon Grid Card (shortcode [wcs_coupons layout="grid"])
   -------------------------------------------------------------------------- */
.wcs-cpn-card {
    display: flex;
    flex-direction: column;
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--wcs-shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.wcs-cpn-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    border-color: var(--wcs-primary);
}

.wcs-cpn-card__logo {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--wcs-gray-50);
    border-bottom: 1px solid var(--wcs-gray-100);
}
.wcs-cpn-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.wcs-cpn-card:hover .wcs-cpn-card__logo img {
    transform: scale(1.05);
}
.wcs-cpn-card__logo .wcs-store-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: var(--wcs-primary);
    opacity: .35;
}

.wcs-cpn-card__body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.wcs-cpn-card__store {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--wcs-primary);
}

.wcs-cpn-card__discount {
    font-size: 20px;
    font-weight: 800;
    color: var(--wcs-gray-800);
    line-height: 1.2;
}

.wcs-cpn-card__desc {
    font-size: 13px;
    color: var(--wcs-gray-600);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wcs-cpn-card__stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    font-size: 12px;
}
.wcs-cpn-card__used {
    color: var(--wcs-gray-400);
}
.wcs-cpn-card__today {
    color: var(--wcs-success);
    font-weight: 600;
}

.wcs-cpn-card__cta-section {
    padding: 0 16px 16px;
}

/* Deal button in cpn-card-section — same sizing */
.wcs-cpn-card__cta-section .wcs-btn--deal {
    width: 100% !important;
    box-sizing: border-box;
}

/* Coupon list multi-column */
.wcs-coupon-list--cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.wcs-coupon-list--cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.wcs-coupon-list--cols-2 .wcs-coupon-card,
.wcs-coupon-list--cols-3 .wcs-coupon-card {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
}
.wcs-coupon-list--cols-2 .wcs-coupon-card__cta,
.wcs-coupon-list--cols-3 .wcs-coupon-card__cta {
    width: 100%;
    align-items: stretch;
}
@media (max-width: 768px) {
    .wcs-coupon-list--cols-2,
    .wcs-coupon-list--cols-3 { grid-template-columns: 1fr; }
}

/* Empty state */
.wcs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--wcs-gray-400);
}
.wcs-empty p { margin-top: 12px; font-size: 15px; }

/* Store about */
.wcs-store-about {
    margin-top: 40px;
    padding: 28px;
    background: var(--wcs-gray-50);
    border: 1px solid var(--wcs-gray-200);
    border-radius: var(--wcs-radius);
}
.wcs-store-about h3 { margin-top: 0; font-size: 18px; }

/* --------------------------------------------------------------------------
   Archive Page
   -------------------------------------------------------------------------- */
.wcs-archive__header {
    text-align: center;
    padding: 40px 20px 30px;
}
.wcs-archive__header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--wcs-gray-800);
}
.wcs-archive__header p {
    color: var(--wcs-gray-600);
    font-size: 16px;
    margin-bottom: 20px;
}

.wcs-search-input {
    width: 100%;
    padding: 8px 20px 8px 45px;
    font-size: 15px;
    border: 2px solid var(--wcs-gray-200);
    border-radius: 50px;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.wcs-search-input:focus { border-color: var(--wcs-primary); }

/* Featured */
.wcs-featured-section { margin-bottom: 40px; }
.wcs-featured-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--wcs-gray-800);
}
.wcs-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.wcs-featured-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: var(--wcs-radius);
    text-decoration: none;
    text-align: center;
    box-shadow: var(--wcs-shadow);
    transition: box-shadow .2s, border-color .2s;
}
.wcs-featured-card:hover {
    box-shadow: var(--wcs-shadow-hover);
    border-color: var(--wcs-primary);
}
.wcs-featured-card__logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wcs-gray-50);
    border: 1px solid var(--wcs-gray-200);
}
.wcs-featured-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.wcs-featured-card__name  { font-size: 13px; font-weight: 600; color: var(--wcs-gray-800); }
.wcs-featured-card__count { font-size: 11px; color: var(--wcs-gray-400); }

/* Archive layout */
.wcs-archive__body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sidebar */
.wcs-archive__sidebar {
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: var(--wcs-radius);
    padding: 20px;
    box-shadow: var(--wcs-shadow);
    position: sticky;
    top: 20px;
}
.wcs-archive__sidebar h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--wcs-gray-400);
}
.wcs-cat-list { list-style: none; margin: 0; padding: 0; }
.wcs-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: var(--wcs-gray-600);
    transition: background .15s, color .15s;
}
.wcs-cat-link:hover        { background: var(--wcs-gray-100); color: var(--wcs-gray-800); }
.wcs-cat-link--active      { background: #eff6ff; color: var(--wcs-primary); font-weight: 600; }
.wcs-cat-count {
    font-size: 12px;
    background: var(--wcs-gray-100);
    color: var(--wcs-gray-400);
    padding: 1px 7px;
    border-radius: 20px;
}

/* Store grid — dạng post card */
.wcs-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.wcs-store-card {
    display: flex;
    flex-direction: column;
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;
    box-shadow: var(--wcs-shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wcs-store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    border-color: var(--wcs-primary);
}

/* Logo to dạng featured image */
.wcs-store-card__logo {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--wcs-gray-50);
    border-bottom: 1px solid var(--wcs-gray-100);
}
.wcs-store-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.wcs-store-card:hover .wcs-store-card__logo img {
    transform: scale(1.05);
}
.wcs-store-card__logo .wcs-store-logo-placeholder {
    font-size: 48px;
    font-weight: 800;
    color: var(--wcs-primary);
    opacity: .35;
}

/* Body: tên + meta */
.wcs-store-card__name {
    padding: 14px 16px 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wcs-gray-800);
    line-height: 1.3;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wcs-store-card__meta {
    padding: 0 16px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
    color: var(--wcs-gray-400);
    align-items: center;
}
.wcs-store-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wcs-store-card__meta > span:first-child::before {
    content: '🎟';
    font-size: 12px;
}
.wcs-cashback {
    color: var(--wcs-success);
    font-weight: 700;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}
.wcs-cashback::before { content: '💰'; margin-right: 2px; }

/* No results */
.wcs-no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--wcs-gray-400);
}

/* --------------------------------------------------------------------------
   Submission Form
   -------------------------------------------------------------------------- */
.wcs-submit-wrap {
    max-width: 680px;
    margin: 24px auto;
}
.wcs-submit-form {
    background: var(--wcs-white);
    border: 1px solid var(--wcs-gray-200);
    border-radius: var(--wcs-radius);
    padding: 32px;
    box-shadow: var(--wcs-shadow);
}
.wcs-submit-form__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--wcs-gray-800);
}
.wcs-submit-form__desc {
    margin: 0 0 24px;
    color: var(--wcs-gray-600);
    font-size: 14px;
}
.wcs-form-group {
    margin-bottom: 16px;
}
.wcs-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wcs-gray-800);
    margin-bottom: 6px;
}
.wcs-form-group input[type="text"],
.wcs-form-group input[type="url"],
.wcs-form-group input[type="date"],
.wcs-form-group select,
.wcs-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--wcs-gray-200);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    font-family: inherit;
}
.wcs-form-group input:focus,
.wcs-form-group select:focus,
.wcs-form-group textarea:focus {
    border-color: var(--wcs-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.wcs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.wcs-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 15px;
    margin-top: 8px;
}
.wcs-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.wcs-notice--error   { background: #fef2f2; color: var(--wcs-danger);  border: 1px solid #fecaca; }
.wcs-notice--success { background: #f0fdf4; color: var(--wcs-success); border: 1px solid #bbf7d0; }

/* --------------------------------------------------------------------------
   Coupon Slider (full width 3-column)
   -------------------------------------------------------------------------- */
.wcs-slider {
    position: relative;
    width: 100%;
    background: var(--wcs-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    margin: 20px 0;
}
.wcs-slider__track {
    display: flex;
    flex-wrap: nowrap;
    will-change: transform;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wcs-slide {
    flex: 0 0 auto;
    display: flex !important;
    align-items: stretch;
    height: var(--wcs-slide-h, 280px);
    background: #fff;
    box-sizing: border-box;
}

/* Cột 1: Logo 1:1 */
.wcs-slide__logo {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    height: 100%;
    background: var(--wcs-gray-50);
    overflow: hidden;
    border-right: 1px solid var(--wcs-gray-100);
}
.wcs-slide__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wcs-slide__logo .wcs-store-logo-placeholder {
    font-size: 72px;
    font-weight: 800;
    color: var(--wcs-primary);
    opacity: .35;
}

/* Cột 2: Info */
.wcs-slide__info {
    flex: 0 0 340px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}
.wcs-slide__store {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--wcs-primary);
}
.wcs-slide__discount {
    font-size: 28px;
    font-weight: 800;
    color: var(--wcs-gray-800);
    line-height: 1.15;
    margin: 2px 0;
}
.wcs-slide__desc {
    font-size: 14px;
    color: var(--wcs-gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.wcs-slide__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: var(--wcs-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.wcs-slide__cta:hover  { background: var(--wcs-primary-dark); color: #fff; }
.wcs-slide__cta:active { transform: scale(.97); }

/* Cột 3: Banner — fills remaining space */
.wcs-slide__banner {
    flex: 1 1 auto;
    height: 100%;
    overflow: hidden;
    background: var(--wcs-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcs-slide__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wcs-slide__banner-placeholder {
    font-size: 80px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation buttons */
.wcs-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.95);
    color: var(--wcs-gray-800);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    transition: background .15s, transform .15s;
    z-index: 2;
}
.wcs-slider__btn:hover  { background: #fff; transform: translateY(-50%) scale(1.1); }
.wcs-slider__btn--prev  { left: 16px; }
.wcs-slider__btn--next  { right: 16px; }

/* Dots */
.wcs-slider__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.wcs-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 0;
    transition: background .15s, width .2s;
}
.wcs-slider__dot--active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .wcs-slide {
        flex-wrap: wrap;
        height: auto;
    }
    .wcs-slide__logo {
        aspect-ratio: auto;
        width: 100%;
        height: 140px;
        border-right: none;
        border-bottom: 1px solid var(--wcs-gray-100);
    }
    .wcs-slide__info {
        flex: 0 0 100%;
        padding: 20px;
    }
    .wcs-slide__banner {
        width: 100%;
        height: 180px;
    }
}

/* --------------------------------------------------------------------------
   Store Autocomplete Search
   -------------------------------------------------------------------------- */
.wcs-autocomplete { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.wcs-autocomplete__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.wcs-autocomplete__icon {
    position: absolute;
    left: 14px;
    color: var(--wcs-gray-400);
    pointer-events: none;
    flex-shrink: 0;
}
.wcs-autocomplete__input {
    width: 100%;
    padding: 8px 20px 8px 45px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border: 2px solid var(--wcs-gray-200);
    border-radius: 50px;
    outline: none;
    transition: border-color .15s;
    background: var(--wcs-white);
    box-sizing: border-box;
}
.wcs-autocomplete__input:focus {
    border-color: var(--wcs-primary);
}
.wcs-autocomplete__input:focus ~ .wcs-autocomplete__dropdown,
.wcs-autocomplete__input.wcs-open {
    border-radius: 50px;
}
/* Khi dropdown đang mở thì vuông góc dưới */
.wcs-autocomplete--open .wcs-autocomplete__input {
    border-radius: 24px 24px 0 0;
    border-bottom-color: transparent;
}
.wcs-autocomplete--open .wcs-autocomplete__dropdown {
    border-radius: 0 0 24px 24px;
}
.wcs-autocomplete__clear {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--wcs-gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: color .15s, background .15s;
}
.wcs-autocomplete__clear:hover { color: var(--wcs-gray-800); background: var(--wcs-gray-100); }

.wcs-autocomplete__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wcs-white);
    border: 2px solid var(--wcs-primary);
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    overflow: hidden;
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}
.wcs-autocomplete__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--wcs-gray-800);
    transition: background .1s;
    border-bottom: 1px solid var(--wcs-gray-100);
}
.wcs-autocomplete__item:last-child { border-bottom: none; }
.wcs-autocomplete__item:hover,
.wcs-autocomplete__item--active { background: #eff6ff; }

.wcs-autocomplete__logo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--wcs-gray-200);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wcs-gray-50);
}
.wcs-autocomplete__logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.wcs-autocomplete__initial { font-size: 16px; font-weight: 800; color: var(--wcs-primary); }

.wcs-autocomplete__info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.wcs-autocomplete__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wcs-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcs-autocomplete__name mark {
    background: #fef08a;
    color: var(--wcs-gray-800);
    border-radius: 2px;
    padding: 0 1px;
}
.wcs-autocomplete__count {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--wcs-gray-400);
    background: var(--wcs-gray-100);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.wcs-autocomplete__empty {
    padding: 16px;
    text-align: center;
    color: var(--wcs-gray-400);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Coupon Popup Modal (dark, tương tự SimplyCodes)
   -------------------------------------------------------------------------- */
.wcs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.wcs-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .25s ease;
}
.wcs-modal--open .wcs-modal__overlay { opacity: 1; }

.wcs-modal__wrap {
    position: relative;
    background: #1c1c2e;
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
    transform: translateY(20px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.wcs-modal--open .wcs-modal__wrap {
    transform: translateY(0);
    opacity: 1;
}

/* Close */
.wcs-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.1);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.wcs-modal__close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Logo */
.wcs-modal__logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    border: 3px solid rgba(255,255,255,.15);
}
.wcs-modal__logo img.wcs-store-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wcs-modal__logo .wcs-store-logo-placeholder {
    font-size: 26px;
    font-weight: 800;
    color: #2563eb;
}

/* Discount */
.wcs-modal__discount {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.2;
}
.wcs-modal__title {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Tooltip "Copied!" */
.wcs-modal__tooltip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
    transition: transform .15s;
}
.wcs-modal__tooltip::before {
    content: '✓';
    color: #16a34a;
    font-weight: 900;
}
.wcs-modal__tooltip--flash {
    transform: scale(1.08);
}

/* Code box */
.wcs-modal__code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2d2d45;
    border-radius: 50px;
    padding: 10px 10px 10px 18px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: background .15s;
    border: 1px solid rgba(255,255,255,.08);
}
.wcs-modal__code-box:hover { background: #363655; }
.wcs-modal__code-text {
    flex: 1;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .12em;
    color: #fff;
    font-family: monospace;
    text-align: left;
}
.wcs-modal__copy-btn {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}
.wcs-modal__copy-btn:hover { background: rgba(255,255,255,.22); }

/* Restrictions */
.wcs-modal__restrictions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #2a2200;
    border: 1px solid #78350f;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: left;
    margin-bottom: 20px;
}
.wcs-modal__restrictions svg { flex-shrink: 0; margin-top: 2px; }
.wcs-modal__restrictions-title {
    font-size: 13px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 3px;
}
.wcs-modal__restrictions-text {
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.5;
}

/* Shop button */
.wcs-modal__shop-btn {
    width: 100%;
    padding: 16px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .01em;
}
.wcs-modal__shop-btn:hover  { background: #16a34a; }
.wcs-modal__shop-btn:active { transform: scale(.98); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .wcs-store-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .wcs-store-header__cta { margin-top: 8px; }

    .wcs-coupon-card {
        grid-template-columns: 1fr;
        gap: 12px 0;
        padding: 16px;
    }
    .wcs-coupon-card__badge {
        width: auto;
        flex-direction: row;
        gap: 8px;
        padding: 0;
    }
    .wcs-coupon-card__badge::after { display: none; }
    .wcs-coupon-card__cta {
        padding-right: 0;
    }
    .wcs-reveal { width: 100%; }
    .wcs-reveal__cover { width: calc(100% - 30px); }
    .wcs-reveal__cover:hover { width: calc(100% - 50px); }

    .wcs-archive__body {
        grid-template-columns: 1fr;
    }
    .wcs-archive__sidebar {
        position: static;
    }
    .wcs-featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 480px) {
    .wcs-store-header { padding: 16px; }
    .wcs-coupon-card  { padding: 14px 12px; }
    .wcs-coupon-card__badge { width: 70px; }
    .wcs-discount-label { font-size: 14px; }

    .wcs-modal__wrap    { padding: 28px 18px 22px; }
    .wcs-modal__discount { font-size: 24px; }
    .wcs-modal__code-text { font-size: 16px; }
}
