/* ========================================
   SHARED CSS - SieuMua247
   Design System & Reusable Components
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    /* Primary Colors */
    --primary-blue: #1e3a8a;
    --primary-blue-dark: #172554;
    --primary-blue-light: #3b82f6;
    --primary-brand: #1823b9;
    --primary-brand-dark: #0f1580;
    --heading-color: #0036A5;
    
    /* Gradient Colors */
    --gradient-start: #006FFF;
    --gradient-end: #1823B9;
    
    /* Accent Colors */
    --accent-yellow: #facc15;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-price: #fd6200;
    
    /* Background Colors */
    --bg-light: #f1f5f9;
    --bg-section: #fff;
    --bg-gray: #f2f2f2;
    --bg-gray-light: #f5f5f5;
    
    /* Text Colors */
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --text-muted: #a9a1a1;
    --text-link: #6795fc;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-gray: #b9b9b9;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --shadow-card: 0 4px 4px rgba(245, 245, 245, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Font Family */
    --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes */
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 13px;
    --fs-md: 14px;
    --fs-lg: 15px;
    --fs-xl: 16px;
    --fs-2xl: 18px;
    --fs-3xl: 20px;
    --fs-4xl: 22px;
    --fs-5xl: 24px;
    --fs-6xl: 36px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 30px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
body, html {
    font-family: var(--font-family) !important;
    font-size: var(--fs-md);
    color: var(--text-dark);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family) !important;
    font-weight: 600;
    color: var(--text-dark);
}

p, span, a, li {
    font-family: var(--font-family) !important;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-brand);
}

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.text-4xl { font-size: var(--fs-4xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-dark { color: var(--text-dark); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-brand); }
.text-link { color: var(--text-link); }
.text-price { color: var(--accent-price); }
.text-red { color: var(--accent-red); }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-md);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-brand-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
}

.btn-outline:hover {
    border-color: var(--primary-brand);
    color: var(--primary-brand);
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-base);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--fs-lg);
    height: 48px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.card-body {
    padding: var(--space-xl);
}

/* ========================================
   SECTION BOX
   ======================================== */
.section-box {
    background: #fff;
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-card);
}

.section-title {
    font-size: var(--fs-2xl);
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: var(--space-xl);
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-discount {
    background: var(--primary-brand);
    color: #fff;
    border-radius: var(--radius-full);
    padding: var(--space-xs) var(--space-md);
}

.badge-sale {
    background: var(--accent-red);
    color: #fff;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-base);
}

.form-input:focus {
    border-color: var(--primary-brand);
}

.form-input::placeholder {
    color: var(--text-light);
}

/* ========================================
   PRICE DISPLAY
   ======================================== */
.price-old {
    font-size: var(--fs-xl);
    color: var(--text-dark);
    text-decoration: line-through;
}

.price-current {
    font-size: var(--fs-5xl);
    font-weight: 600;
    color: var(--accent-price);
}

.price-sm .price-old {
    font-size: var(--fs-base);
}

.price-sm .price-current {
    font-size: var(--fs-lg);
}

/* ========================================
   RATING STARS
   ======================================== */
.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    color: #fbbf24;
    font-size: var(--fs-sm);
}

.rating-stars-lg i {
    font-size: var(--fs-md);
}

/* ========================================
   SHARE BUTTONS
   ======================================== */
.share-buttons {
    display: flex;
    gap: var(--space-sm);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--fs-2xl);
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.share-btn:hover {
    opacity: 0.85;
    color: #fff;
}

.share-btn-copy { background: #64748b; }
.share-btn-facebook { background: #1877f2; }
.share-btn-messenger { background: #0084ff; }
.share-btn-zalo { background: #0068ff; }

/* ========================================
   FAQ ACCORDION
   ======================================== */
.faq-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    font-size: var(--fs-md);
    color: var(--text-dark);
    transition: color var(--transition-base);
}

.faq-question:hover {
    color: var(--primary-brand);
}

.faq-question i {
    font-size: var(--fs-sm);
    transition: transform var(--transition-base);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 var(--space-lg) var(--space-md);
    font-size: var(--fs-base);
    color: var(--text-gray);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ========================================
   FILTER BUTTONS
   ======================================== */
.filter-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: var(--bg-gray-light);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-brand);
    color: #fff;
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
    padding: var(--space-lg) 0;
    font-size: var(--fs-md);
}

.breadcrumb a {
    color: var(--text-link);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-link);
    font-weight: 700;
}

/* ========================================
   QUANTITY SELECTOR
   ======================================== */
.quantity-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-md);
    color: var(--text-dark);
    transition: background var(--transition-base);
}

.quantity-btn:hover {
    background: var(--border-color);
}

.quantity-input {
    width: 50px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: 500;
    outline: none;
}

/* ========================================
   AVATAR
   ======================================== */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-light);
}

.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 45px; height: 45px; }
.avatar-lg { width: 58px; height: 58px; }

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px var(--space-xl);
    color: var(--text-gray);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: var(--space-xl);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-sm);
    color: var(--text-dark);
}

.empty-state p {
    margin-bottom: var(--space-xl);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 991px) {
    :root {
        --fs-5xl: 22px;
        --fs-6xl: 28px;
    }
}

@media (max-width: 576px) {
    :root {
        --fs-4xl: 20px;
        --fs-5xl: 20px;
        --fs-6xl: 24px;
    }
    
    .section-box {
        padding: var(--space-lg);
    }
    
    .btn-lg {
        width: 100%;
    }
}


/* ========================================
   CART SUCCESS MODAL
   ======================================== */
.cart-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.cart-success-modal.show {
    display: flex;
}

.cart-success-modal-content {
    background: #fff;
    border-radius: var(--radius-md, 12px);
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: var(--shadow-lg, 0 10px 25px -5px rgba(0,0,0,0.1));
    overflow: hidden;
}

.cart-success-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.cart-success-modal-close:hover {
    color: #333;
}

.cart-success-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.cart-success-modal-message {
    font-size: 14px;
    color: var(--text-dark, #1e293b);
    margin: 0;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

.cart-success-modal-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.cart-success-modal-actions .btn-go-cart {
    flex: 1;
    padding: 12px 15px;
    background: linear-gradient(180deg, #006FFF 0%, #1823B9 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cart-success-modal-actions .btn-go-cart:hover {
    opacity: 0.9;
    color: #fff;
}

.cart-success-modal-actions .btn-continue-shopping {
    flex: 1;
    padding: 12px 15px;
    background: var(--accent-orange, #f97316);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cart-success-modal-actions .btn-continue-shopping:hover {
    opacity: 0.9;
}
