/* ================================================================
   Hi-Operator — Common Styles
   Shared variables, reset, typography, and base components
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ----- CSS Variables ----- */
:root {
    --ho-primary:      #1F2937;
    --ho-primary-dark:  #111827;
    --ho-secondary:     #E53E3E;
    --ho-secondary-light: #F56565;
    --ho-accent:        #E53E3E;
    --ho-accent-light:  #F56565;

    --ho-bg:            #F5F7FA;
    --ho-bg-white:      #FFFFFF;
    --ho-bg-dark:       #111827;

    --ho-text:          #1A1A2E;
    --ho-text-light:    #6B7280;
    --ho-text-white:    #FFFFFF;
    --ho-text-muted:    #9CA3AF;

    --ho-border:        #E5E7EB;
    --ho-border-light:  #F3F4F6;

    --ho-shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
    --ho-shadow-md:     0 4px 12px rgba(0,0,0,0.1);
    --ho-shadow-lg:     0 10px 30px rgba(0,0,0,0.12);
    --ho-shadow-xl:     0 20px 50px rgba(0,0,0,0.15);

    --ho-radius-sm:     4px;
    --ho-radius-md:     8px;
    --ho-radius-lg:     12px;
    --ho-radius-xl:     16px;
    --ho-radius-full:   9999px;

    --ho-transition:    all 0.3s ease;
    --ho-transition-fast: all 0.15s ease;

    --ho-font-en:       'Inter', sans-serif;
    --ho-font-zh:       'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    --ho-container:     1200px;
    --ho-container-sm:  960px;
    --ho-container-lg:  1400px;
}

/* ----- Reset ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ho-font-en);
    color: var(--ho-text);
/*    background-color: var(--ho-bg);  */
    line-height: 1.6;
    overflow-x: hidden;
}

body.lang-zh {
    font-family: var(--ho-font-zh);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--ho-transition-fast);
}

a:hover {
    color: var(--ho-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

/* ----- Container ----- */
.ho-container {
    width: 100%;
    max-width: var(--ho-container);
    margin: 0 auto;
    padding: 0 20px;
}

.ho-container-sm {
    max-width: var(--ho-container-sm);
    margin: 0 auto;
    padding: 0 20px;
}

.ho-container-lg {
    max-width: var(--ho-container-lg);
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Buttons ----- */
.ho-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--ho-radius-sm);
    transition: var(--ho-transition);
    white-space: nowrap;
    line-height: 1.4;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.ho-btn-primary {
    background: var(--ho-secondary);
    color: var(--ho-text-white);
}

.ho-btn-primary:hover {
    background: var(--ho-secondary-light);
    color: var(--ho-text-white);
    transform: translateY(-1px);
    box-shadow: var(--ho-shadow-md);
}

.ho-btn-accent {
    background: var(--ho-accent);
    color: var(--ho-text-white);
}

.ho-btn-accent:hover {
    background: var(--ho-accent-light);
    color: var(--ho-text-white);
    transform: translateY(-1px);
    box-shadow: var(--ho-shadow-md);
}

.ho-btn-outline {
    border: 2px solid var(--ho-text-white);
    color: var(--ho-text-white);
    background: transparent;
}

.ho-btn-outline:hover {
    background: var(--ho-text-white);
    color: var(--ho-primary);
}

.ho-btn-outline-dark {
    border: 2px solid var(--ho-primary);
    color: var(--ho-primary);
    background: transparent;
}

.ho-btn-outline-dark:hover {
    background: var(--ho-primary);
    color: var(--ho-text-white);
}

.ho-pd-wish-btn {
    border: 2px solid #E53E3E !important;
    color: #E53E3E !important;
    background: transparent !important;
}
.ho-pd-wish-btn:hover {
    background: rgba(229, 62, 62, 0.06) !important;
}
.ho-pd-wish-btn i { color: #E53E3E; }
.ho-pd-wish-btn.is-active {
    border-color: #E53E3E !important;
    color: #E53E3E !important;
    background: transparent !important;
}
.ho-pd-wish-btn.is-active i { color: #E53E3E; }

.ho-btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.ho-btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

/* ----- Section ----- */
.ho-section {
    padding: 18px 0;
}

.ho-section-dark {
    background: var(--ho-primary);
    color: var(--ho-text-white);
}

.ho-section-gray {
    background: var(--ho-bg);
	padding: 88px 0;
}

.ho-section-white {
    background: var(--ho-bg-white);
}

.ho-section-title {
    text-align: center;
    margin-bottom: 18px;
}

.ho-section-title h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--ho-text);
}

.ho-section-dark .ho-section-title h2 {
    color: var(--ho-text-white);
}

.ho-section-title p {
    font-size: 17px;
    color: var(--ho-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.ho-section-dark .ho-section-title p {
    color: rgba(255,255,255,0.7);
}

/* ----- Cards ----- */
.ho-card {
    background: var(--ho-bg-white);
    border-radius: var(--ho-radius-lg);
    box-shadow: var(--ho-shadow-sm);
    transition: var(--ho-transition);
    overflow: hidden;
}

.ho-card:hover {
    box-shadow: var(--ho-shadow-lg);
    transform: translateY(-4px);
}

.ho-card-body {
    padding: 24px;
}

.ho-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--ho-border-light);
}

/* ----- Forms ----- */
.ho-input,
.ho-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--ho-bg-white);
    border: 1px solid var(--ho-border);
    border-radius: var(--ho-radius-sm);
    font-size: 15px;
    transition: var(--ho-transition-fast);
}

.ho-input:focus,
.ho-textarea:focus {
    border-color: var(--ho-secondary);
    box-shadow: 0 0 0 3px rgba(229,62,62,0.15);
}

.ho-textarea {
    resize: vertical;
    min-height: 120px;
}

.ho-form-group {
    margin-bottom: 20px;
}

.ho-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ho-text);
}

.ho-form-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    margin-top: 16px;
    background: rgba(229,62,62,0.08);
    border-radius: var(--ho-radius-md);
    font-size: 14px;
    color: var(--ho-secondary);
    font-weight: 500;
}

/* ----- Icon Placeholder (SVG inline) ----- */
.ho-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ho-radius-md);
    background: rgba(229,62,62,0.1);
    color: var(--ho-secondary);
    flex-shrink: 0;
}

.ho-icon svg {
    width: 24px;
    height: 24px;
}

.ho-icon-lg {
    width: 64px;
    height: 64px;
}

.ho-icon-lg svg {
    width: 32px;
    height: 32px;
}

/* ----- Badge ----- */
.ho-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--ho-radius-full);
    background: rgba(229,62,62,0.1);
    color: var(--ho-secondary);
}

/* ----- Breadcrumb ----- */
.ho-breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--ho-text-light);
}

.ho-breadcrumb a {
    color: var(--ho-text-light);
}

.ho-breadcrumb a:hover {
    color: var(--ho-secondary);
}

.ho-breadcrumb span {
    margin: 0 8px;
    color: var(--ho-text-muted);
}

/* ----- Page Header (internal pages) ----- */
.ho-page-header {
    background: linear-gradient(135deg, #FAF6F3 0%, #F3EDE8 100%);
    color: var(--ho-text);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #E8E0D9;
}

.ho-page-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1A1A2E;
}

.ho-page-header p {
    font-size: 18px;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ----- Utility ----- */
.ho-text-center { text-align: center; }
.ho-text-left   { text-align: left; }
.ho-text-right  { text-align: right; }
.ho-mt-0  { margin-top: 0; }
.ho-mt-20 { margin-top: 20px; }
.ho-mt-40 { margin-top: 40px; }
.ho-mb-0  { margin-bottom: 0; }
.ho-mb-20 { margin-bottom: 20px; }
.ho-mb-40 { margin-bottom: 40px; }

/* ----- Scroll animation ----- */
.ho-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ho-fade-in.ho-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Cart Toast ===== */
.ho-cart-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translate(-50%, -20px);
    z-index: 9999;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    opacity: 0;
    transition: opacity .3s, transform .3s;
    white-space: nowrap;
}

.ho-cart-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ho-cart-toast i {
    color: #38a169;
    font-size: 16px;
}

/* Attr shake hint */
@keyframes hoAttrShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
.ho-attr-shake {
    animation: hoAttrShake 0.4s ease;
}
.ho-attr-shake label {
    color: #E53E3E !important;
}

/* Price discount badge */
.ho-pd-price-off,
.hom-pd-price-off {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #e53e3e;
    background: #fef2f2;
    border: 2px solid #e53e3e;
    padding: 3px 12px;
    border-radius: 4px;
    margin-left: auto;
}

/* ===== Product Star Rating ===== */
.ho-pd-stars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ho-stars-display {
    display: inline-flex;
    gap: 2px;
    cursor: pointer;
}

.ho-star {
    font-size: 16px;
    color: #FBBF24;
    transition: transform .15s;
    line-height: 1;
}

.ho-star:hover {
    transform: scale(1.2);
}

.ho-star i {
    pointer-events: none;
}

.ho-stars-score {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.ho-stars-count {
    font-size: 12px;
    color: #999;
}

.ho-stars-display.is-voting .ho-star {
    cursor: pointer;
}

.ho-stars-voted-tip {
    font-size: 11px;
    color: #48bb78;
    font-weight: 600;
}
