/*
Theme Name:   Minimog Child - thoitrangdvc.com
Theme URI:    https://thoitrangdvc.com
Description:  Child theme của Minimog dành riêng cho thoitrangdvc.com — E-commerce store.
Author:       WP-VPS-Manager
Author URI:   https://thoitrangdvc.com
Template:     minimog
Version:      1.0.0
Text Domain:  minimog-child-thoitrangdvc-com
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         e-commerce, woocommerce, fashion, kids, custom-colors, child-theme
*/

/* ============================================================
   THOITRANGDVC.COM — Custom Styles
   Tất cả CSS tùy chỉnh viết ở đây, KHÔNG sửa theme gốc.
   
   Cấu trúc:
   1. CSS Variables (Brand Colors & Fonts)
   2. Typography & Fonts
   3. Header / Navigation & Layout Fixes
   4. Shop / Product Grid
   5. Product Page Customizations
   6. Background / Utility
   ============================================================ */

/* ── 1. CSS Variables — Màu thương hiệu Thoitrangdvc ─────── */
:root {
    /* Brand Colors */
    --color-primary:     #ff8ca3;   /* Hồng phấn ngọt ngào, thời trang trẻ em */
    --color-primary-dk:  #e06a84;   /* Hồng đậm hơn khi hover */
    --color-secondary:   #3d3436;   /* Than tối ấm áp cho chữ & nút bấm chính */
    --color-accent:      #fbc5c5;   /* Hồng nhạt highlight/border */
    --color-bg:          #ffffff;
    --color-bg-light:    #fffbf8;   /* Nền kem ấm, dịu nhẹ tinh tế */
    --color-text:        #2d2d2d;
    --color-text-muted:  #777777;
    --color-border:      #f5e6e8;

    /* Typography */
    --font-heading: 'Outfit', 'Georgia', serif;
    --font-body:    'Inter', 'Helvetica Neue', sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --border-radius: 6px;
}

/* ── 2. Google Fonts Import ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── 3. Base Typography ──────────────────────────────────── */
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6,
.woocommerce-loop-product__title,
.product_title {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* ── 4. Brand — Buttons & Links ─────────────────────────── */
a {
    color: var(--color-primary);
}

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

.button,
button,
input[type="submit"],
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order {
    background-color: var(--color-secondary) !important;
    color: #ffffff !important;
    border: 2px solid var(--color-secondary) !important;
    border-radius: var(--border-radius) !important;
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px !important;
    padding: 12px 28px !important;
    transition: all 0.25s ease !important;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

/* Add to Cart — nổi bật và bo góc xinh xắn */
.woocommerce .single_add_to_cart_button {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    font-size: 14px !important;
    padding: 14px 36px !important;
    border-radius: 30px !important; /* Bo cong nhiều hơn cho phong cách trẻ em */
}

.woocommerce .single_add_to_cart_button:hover {
    background-color: var(--color-primary-dk) !important;
    border-color: var(--color-primary-dk) !important;
}

/* ── 5. Header / Navigation & Layout Bug Fixes ───────────── */

/* Fix lỗi Top Bar (banner khuyến mãi) không full width màn hình */
.topbar-wrapper.col-full {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-bottom: none !important;
}

.top-bar {
    background-color: var(--color-primary) !important; /* Tông màu hồng pastel cho banner */
    color: #ffffff !important;
}

.top-bar a, 
.top-bar p, 
.top-bar span {
    color: #ffffff !important;
    font-weight: 500;
}

/* Đồng bộ màu thanh menu desktop với topbar */
@media (min-width: 993px) {
    .col-full-nav {
        background-color: var(--color-primary) !important;
        border-top: none !important;
        border-bottom: none !important;
    }
    body:not(.header-4).sticky-d .col-full-nav {
        background-color: var(--color-primary) !important;
    }
    .site .menu-primary-menu-container > ul > li > a {
        color: #ffffff !important;
    }
    .menu-primary-menu-container > ul > li > a span:before {
        border-bottom-color: #ffffff !important;
    }
    .menu-primary-menu-container > ul > li.menu-item-has-children > a:after {
        background-color: #ffffff !important;
    }
    .col-full-nav .shoptimizer-cart a.cart-contents .count {
        border-color: #ffffff !important;
        color: #ffffff !important;
    }
    .col-full-nav .shoptimizer-cart a.cart-contents .count:after {
        border-color: #ffffff !important;
    }
    .col-full-nav .site-header-cart .cart-contents {
        color: #ffffff !important;
    }
    .col-full-nav .shoptimizer-cart-icon svg,
    .col-full-nav .shoptimizer-cart-icon svg path {
        stroke: #ffffff !important;
    }
}

/* Fix logo đè lên top bar & khống chế kích thước ảnh logo tránh phá vỡ layout */
.site-header .custom-logo-link img,
.logo img {
    max-width: 200px !important;
    max-height: 60px !important;
    height: auto !important;
    width: auto !important;
}

/* Canh chỉnh vị trí logo trên mobile tránh bị đè/mất đối xứng */
@media (max-width: 992px) {
    .site-branding {
        height: auto !important;
        padding: 12px 0 !important;
    }
    
    .site-header .site-branding {
        min-height: 60px !important;
        max-width: calc(100% - 140px) !important;
        margin: 0 auto !important;
    }
    
    /* Đảm bảo header trên mobile có nền trắng cố định, không bị trong suốt */
    .site-header {
        background-color: #ffffff !important;
    }

    /* Reset margin âm của section Elementor đầu tiên trên mobile để tránh đè lên header */
    .elementor-section:first-of-type,
    .elementor-section:first-child {
        margin-top: 0 !important;
    }
    
    /* Đẩy header xuống khi thanh Admin Bar của WordPress xuất hiện trên mobile */
    .admin-bar.sticky-m .site-header {
        top: 46px !important;
    }

    /* Custom mobile menu toggle button - hamburger only, no background, no text */
    .site-branding button.menu-toggle {
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        width: 30px !important;
        height: 30px !important;
        left: 15px !important;
    }
    .site-branding button.menu-toggle:hover,
    .site-branding button.menu-toggle:focus {
        background-color: transparent !important;
    }
    .site-branding button.menu-toggle .bar {
        background-color: var(--color-secondary) !important; /* #3d3436 */
        width: 22px !important;
        height: 2px !important;
        left: 4px !important;
    }
    .site-branding button.menu-toggle .bar-text {
        display: none !important;
    }
}

@media (min-width: 783px) and (max-width: 992px) {
    .admin-bar.sticky-m .site-header {
        top: 32px !important;
    }
}

/* ── 6. Shop / Product Grid ──────────────────────────────── */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px;
    font-family: var(--font-heading);
    color: var(--color-secondary);
}

.woocommerce ul.products li.product .price {
    color: var(--color-primary-dk);
    font-weight: 600;
}

/* Sale badge ngọt ngào */
.woocommerce span.onsale {
    background-color: var(--color-primary) !important;
    color: #ffffff !important; /* Đổi sang màu trắng tránh bị chìm */
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    min-height: auto !important;
    min-width: auto !important;
    padding: 4px 10px !important;
    line-height: 1.5 !important;
}

/* Sửa lỗi lệch chữ (vertical misalignment) ở các nút thêm vào giỏ hàng trong grid sản phẩm */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 15px !important;
    line-height: normal !important;
}

/* ── 7. Product Page ─────────────────────────────────────── */
.woocommerce div.product .product_title {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.3;
    color: var(--color-secondary);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--color-primary-dk);
    font-size: 22px;
    font-weight: 700;
}

/* Custom SKU & Shipping Notice */
.mb-sku {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.mb-shipping-notice {
    font-size: 14px;
    background-color: var(--color-bg-light);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px dashed var(--color-accent);
    color: var(--color-secondary);
    margin-top: 15px;
    display: inline-block;
}

/* LoveShackFancy Style Add to Cart Button for Single Product Page */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button:disabled,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button.disabled,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:disabled {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 45px !important; /* Làm nhỏ nút bấm */
    font-size: 13px !important; /* Cỡ chữ nhỏ lại cho tinh tế */
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    background-color: #3d3436 !important; /* Secondary dark brand color */
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--border-radius) !important; /* Bo góc nhẹ như nút Request Call Back */
    transition: background-color 0.3s ease !important;
    line-height: normal !important;
    padding: 0 25px !important;
}

/* Khi nút bị disable (chưa chọn size) */
.woocommerce div.product form.cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button:disabled,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button.disabled,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:disabled {
    background-color: #b3b3b3 !important; /* Màu xám nhạt */
    color: #ffffff !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:not(.disabled):not(:disabled):hover,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:not(.disabled):not(:disabled):hover {
    background-color: var(--color-primary) !important; /* Hover to Thoitrangdvc primary */
    color: #ffffff !important;
}

/* Nút mua hàng và số lượng nằm cùng 1 dòng trên cả Desktop và Mobile */
.woocommerce div.product form.cart:not(.variations_form),
.woocommerce div.product .woocommerce-variation-add-to-cart,
.elementor-widget-woocommerce-product-add-to-cart form.cart:not(.variations_form),
.elementor-widget-woocommerce-product-add-to-cart .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

/* Khống chế độ rộng cố định và reset float của ô chọn số lượng */
.woocommerce div.product form.cart:not(.variations_form) .quantity,
.woocommerce div.product .woocommerce-variation-add-to-cart .quantity,
.elementor-widget-woocommerce-product-add-to-cart form.cart:not(.variations_form) .quantity,
.elementor-widget-woocommerce-product-add-to-cart .woocommerce-variation-add-to-cart .quantity {
    margin: 0 !important;
    float: none !important;
    flex: 0 0 90px !important;
    width: 90px !important;
}

/* Reset hoàn toàn margin-left (mặc định 40px của theme) và float của nút bấm */
.woocommerce div.product form.cart:not(.variations_form) .single_add_to_cart_button,
.woocommerce div.product .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart form.cart:not(.variations_form) .single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
}

/* ── 8. Background phụ ───────────────────────────────────── */
.site-header,
.sg-container {
    background-color: var(--color-bg) !important;
}

.woocommerce-account .entry-content,
body.woocommerce-page {
    background-color: var(--color-bg-light);
}

/* ── 9. Footer Custom Colors (matching topbar pink) ──────── */
footer.site-footer,
footer.copyright {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

.site footer.site-footer .widget .widget-title,
.site-footer .widget.widget_block h2,
.site-footer .widget.widget_block h3,
.site-footer .widget.widget_block h4 {
    color: #ffffff !important;
}

footer.site-footer a:not(.button),
footer.copyright a {
    color: #ffffff !important;
    opacity: 0.9;
    text-decoration: none;
}

footer.site-footer a:not(.button):hover,
footer.copyright a:hover {
    color: #ffffff !important;
    opacity: 1;
    text-decoration: underline;
}

.site-footer .widget p,
.site-footer .widget li,
footer.copyright .widget p {
    color: #ffffff !important;
}

footer.site-footer li a:after {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

footer.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}
