/*
Theme Name: Mai Hoàng
Description: Công ty Thiết bị Máy Văn phòng Mai Hoàng
Author: Trần Danh Trọng
Template: flatsome
Version: 3.0
*/

/* ========================================
   COLOR SYSTEM & TYPOGRAPHY
   Primary: #C41230 (Vibrant Red)
   Font: Mulish + Mulish
   ======================================== */

:root {
    /* Brand Colors */
    --color-primary: #c41230;
    --color-primary-hover: #a00f27;
    --color-primary-light: #e8b8c0;
    --color-primary-dark: #8b0c1f;

    /* Secondary Colors */
    --color-secondary: #2c3e50;
    --color-secondary-hover: #1a252f;

    /* Neutral Colors */
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Status Colors */
    --color-success: #27ae60;
    --color-warning: #f39c12;
    --color-error: #e74c3c;
    --color-info: #17a2b8;

    /* Typography */
    --font-heading: "Mulish", sans-serif;
    --font-body: "Mulish", sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Borders & Shadows */
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(196, 18, 48, 0.15);
}

/* ========================================
   FLATSOME OVERRIDES
   ======================================== */

/* Primary Button */
.button.primary,
button.primary,
input[type="submit"].primary,
.btn.primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

.button.primary:hover,
button.primary:hover,
input[type="submit"].primary:hover,
.btn.primary:hover {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
}

/* Typography */
a {
    color: var(--color-primary);
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.heading-text,
.widget-title {
    font-family: var(--font-heading);
    color: var(--color-gray-900);
}

/* Products */
.product-small .col-inner {
    border: 1px solid var(--color-gray-200);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
    background: #FFFFFF;
}

.product-small .col-inner:hover{
    border-color: var(--color-primary);
}


.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: var(--color-primary);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-sm);
    box-shadow: none !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    outline: none;
}

/* Alerts */
.woocommerce-message {
    background-color: rgba(39, 174, 96, 0.1);
    border-left: 4px solid var(--color-success);
    color: var(--color-success);
}

.woocommerce-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--color-error);
    color: var(--color-error);
}

.woocommerce-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-left: 4px solid var(--color-info);
    color: var(--color-info);
}

/* Mobile */
@media only screen and (max-width: 48em) {
    .mobile-menu-toggle,
    .nav-toggle {
        background-color: var(--color-primary);
        color: #ffffff;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ========================================
   PRODUCT LOOP - BRAND LOGO
   ======================================== */
.mh-product-brand-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.mh-product-brand-logo img {
    max-width: 24px;
    max-height: 18px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mh-product-brand-logo .mh-brand-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ========================================
   PRODUCT LOOP - TITLE
   ======================================== */
.product-small .product-title,
.product-small .product-title a,
.woocommerce-loop-product__title,
.woocommerce-loop-product__title a {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--color-gray-900) !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: auto !important;
    max-height: 2.8em !important;
}

.product-small .product-title a:hover,
.woocommerce-loop-product__title a:hover {
    color: var(--color-primary) !important;
}

/* ========================================
   PRODUCT LOOP - SKU
   ======================================== */
.mh-product-sku {
    font-size: 12px;
    color: var(--color-gray-400);
    margin-top: 4px;
    font-family: var(--font-body);
}

/* ========================================
   PRODUCT LOOP - CUSTOM PRICE
   ======================================== */
.mh-price-wrap {
    margin-top: 8px;
}

.mh-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.3;
}

.mh-price-row.mh-price-original {
    margin-bottom: 4px;
}

.mh-price-label {
    font-size: 14px;
    color: #000000;
    font-weight: 500;
}

.mh-price-original .mh-price-value {
    font-size: 14px;
    color: #000000;
    text-decoration: line-through;
}

.mh-price-sale .mh-price-label {
    font-weight: 700;
    color: #000000;
}

.mh-price-sale .mh-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.mh-price-regular .mh-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.mh-price-from .mh-price-label {
    font-weight: 500;
    color: #000000;
}

.mh-price-from .mh-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.mh-discount-badge {
    font-size: 13px;
    font-weight: 600;
    color: #000000;
}

.mh-contact-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
}

/* Override WooCommerce default price styles */
.products .price,
.product-small .price {
    display: block !important;
}

.products .price del,
.products .price ins,
.product-small .price del,
.product-small .price ins {
    display: none !important;
}


/* ========================================
   SALE BADGE - CUSTOM STYLE
   ======================================== */
.product .badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.product .badge-container .callout.badge {
    margin: 0;
    padding: 0;
}

.product .badge-container .badge-inner {
    background: linear-gradient(135deg, #ff4757 0%, #c41230 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(196, 18, 48, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product .badge-container .badge-inner::before {
    content: none;
}

.product .badge-container .badge-inner .onsale {
    background: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    border-radius: 0;
    line-height: 1;
}

/* Alternative: Ribbon style */
.product .badge-container.ribbon-style .badge-inner {
    background: var(--color-primary);
    padding: 8px 14px 8px 10px;
    border-radius: 0 4px 4px 0;
    position: relative;
    margin-left: -12px;
}

.product .badge-container.ribbon-style .badge-inner::before {
    content: none;
}

.product .badge-container.ribbon-style .badge-inner::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    border-width: 3px 6px;
    border-style: solid;
    border-color: #8b0c1f transparent transparent #8b0c1f;
}


/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 5px;
    border: 2px solid var(--color-gray-100);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb:active {
    background: var(--color-primary-hover);
}

::-webkit-scrollbar-corner {
    background: var(--color-gray-100);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-400) var(--color-gray-100);
}

/* Thin scrollbar for smaller containers */
.thin-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
    border: 1px solid var(--color-gray-100);
}

/* Hidden scrollbar but still scrollable */
.hidden-scrollbar::-webkit-scrollbar {
    display: none;
}

.hidden-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
