/**
 * Discount Badge - DISABLED
 * ปิดการใช้งานปุ่มส่วนลดทั้งหมด
 */

/* Hide all discount badges */
.product-card .badge.bg-success,
.product-card-wrapper .badge.bg-success,
.product-grid .badge.bg-success,
.product-carousel-slider .badge.bg-success,
.flash-sale-section .badge.bg-success,
section[id] .badge.bg-success,
.row .badge.bg-success,
.product-card .badge.text-bg-success,
.product-card-wrapper .badge.text-bg-success,
.product-grid .badge.text-bg-success,
.product-carousel-slider .badge.text-bg-success,
section[id] .badge.text-bg-success,
.discount-pill,
.fs-discount-pill,
.flash-discount-badge,
.promo-badge-right,
.discount-badge,
.discount-amount-badge,
.category-card__discount-chip,
.promotion-chip.chip--discount {
    display: none !important;
    visibility: hidden !important;
}
}

/* CSS variable overrides */
:root {
    --pcp-badge-green: #f97316 !important;
    --discount-badge-bg: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --discount-badge-color: #fff;
}

/* Product card pro discount badge */
.product-card-pro .pcp-discount-badge {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4) !important;
}

/* Enhanced product cards v2 */
.product-card-v2 .pcv2-badge--discount {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
}

/* Flash sale discount inline */
.flash-product-card .fsc-discount-inline {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
}

/* Scaled view discount badge */
html.scaled-view [id*="SMART_PHONE"] .product-card .discount-badge,
html.scaled-view [class*="smart-phone"] .product-card .discount-badge,
html.scaled-view [id*="smartphone"] .product-card .discount-badge {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
}

/* Original main-styles overrides */
.product-card-wrapper .discount-badge {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
}

/* Any additional badge with discount text */
.badge[class*="discount"],
.badge[class*="savings"],
span[class*="discount-badge"],
div[class*="discount-badge"] {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    color: #fff !important;
}

/* Dark mode support */
.dark .discount-pill,
.dark .fs-discount-pill,
.dark .promo-badge-right,
.dark .discount-badge,
[data-theme="dark"] .discount-pill,
[data-theme="dark"] .fs-discount-pill,
[data-theme="dark"] .promo-badge-right,
[data-theme="dark"] .discount-badge {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%) !important;
    color: #fff !important;
}

/* ============================================
   BRAND LOGO DISPLAY - Logo top-right + Text above title
   ============================================ */

/* Hide old brand classes */
.brand-text-badge,
.brand-name-text,
.fs-brand-small {
    display: none !important;
}

/* Hide brand text completely */
.fs-brand-text { display: none !important; }

/* Flash sale brand corner RIGHT - small badge on top right of image */
.fs-brand-corner-right {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
    z-index: 15 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    max-width: 65px !important;
    max-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fs-brand-corner-right img {
    max-height: 32px !important;
    max-width: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Flash sale brand corner LEFT (if used) */
.fs-brand-corner-left {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 3px 5px !important;
    border-radius: 5px !important;
    z-index: 15 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    max-width: 48px !important;
    max-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fs-brand-corner-left img {
    max-height: 16px !important;
    max-width: 40px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Old fs-brand-corner (keep for backward compatibility) */
.fs-brand-corner {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
    z-index: 10 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    max-width: 55px !important;
    max-height: 26px !important;
}

.fs-brand-corner img {
    max-height: 18px !important;
    max-width: 45px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Brand logo badge on product cards */
.brand-logo-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.brand-logo-badge img.brand-logo-img {
    max-height: 22px;
    max-width: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Product card brand overlay */
.product-card-brand-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.38);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
    min-width: 66px;
    min-height: 32px;
    max-height: 32px;
    overflow: hidden;
}

.product-card-brand-overlay img.product-card-brand-logo {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 56px;
    max-height: 26px;
    object-fit: contain;
    padding: 0;
    margin: 0 auto;
}
