/*
Theme Name: Malloca Custom WooCommerce Child Theme
Theme URI: https://malloca.hangchonloc.vn
Description: Custom WooCommerce Child Theme tối ưu tốc độ, chuẩn SEO, chuẩn giao diện thiết bị gia dụng cao cấp Malloca cho hangchonloc.vn.
Author: Commerce AI Team
Version: 1.1.0
Template: storefront
*/

:root {
    --primary-color: #d9232d;
    --primary-hover: #b81922;
    --dark-color: #1a1a1a;
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --border-color: #e5e7eb;
    --accent-color: #ff9900;
    --radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Base Container & Utility */
.malloca-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Product Card Styling */
ul.products li.product, .malloca-product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

ul.products li.product:hover, .malloca-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #d1d5db;
}

ul.products li.product img, .malloca-product-card img {
    border-radius: 6px;
    object-fit: contain;
    max-height: 220px;
    width: 100%;
    margin-bottom: 12px;
}

.woocommerce-loop-product__title, .malloca-product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 8px 0;
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    color: var(--primary-color) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.price del {
    color: #9ca3af !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    margin-right: 6px;
}

.price ins {
    text-decoration: none !important;
}

/* Buttons */
.button, a.button, button.button, input.button, .btn-malloca-primary {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    border: none !important;
    transition: background-color 0.2s ease !important;
    text-align: center;
    cursor: pointer;
}

.button:hover, a.button:hover, button.button:hover, .btn-malloca-primary:hover {
    background-color: var(--primary-hover) !important;
}

/* Badge Sale */
.onsale {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.2 !important;
}

/* Spec Table Styling */
.malloca-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.malloca-specs-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.malloca-specs-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.malloca-specs-table td.spec-name {
    font-weight: 600;
    width: 35%;
    color: #4b5563;
    background-color: #f3f4f6;
}

/* Trust Seals Block */
.trust-seals-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.trust-item:last-child {
    margin-bottom: 0;
}

.trust-item svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 22px;
    }
    .malloca-specs-table td.spec-name {
        width: 45%;
    }
}
