/*
Theme Name: Mua Qua Tot - Premium Gift
Theme URI: https://muaquatot.com
Description: Premium Gift Website - WordPress Custom Theme voi CPT va ACF Pro
Author: MuaQuaTot Team
Author URI: https://muaquatot.com
Version: 1.0.0
Text Domain: muaquatot
Tags: premium, gift, ecommerce, custom
*/

/* ========================================
   CSS VARIABLES
======================================== */
:root {
    --color-primary: #1A1A1A;
    --color-secondary: #C9A96E;
    --color-secondary-light: #F5EDD8;
    --color-white: #FFFFFF;
    --color-bg: #F8F9FB;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #E8E8E8;
    --color-border-light: #F0F0F0;
    --color-red: #C0392B;
    --color-red-light: #FDF0EF;

    --font-primary: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', 'Georgia', serif;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-gold: 0 4px 20px rgba(201,169,110,0.25);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    --container-width: 1280px;
    --container-padding: 24px;

    --header-height: 80px;
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-primary);
}

input, textarea, select {
    font-family: var(--font-primary);
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-primary);
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ========================================
   UTILITIES
======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 60px 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* Section Heading */
.section-heading {
    margin-bottom: 50px;
}

.section-heading.centered {
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--color-primary);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1rem;
    color: var(--color-text-light);
    max-width: 560px;
}

.section-heading.centered .section-desc {
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-primary);
}

.btn-gold {
    background: var(--color-secondary);
    color: var(--color-white);
    border: 2px solid var(--color-secondary);
}

.btn-gold:hover {
    background: transparent;
    color: var(--color-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* Stars Rating */
.stars {
    display: inline-flex;
    gap: 2px;
    color: #FFB800;
    font-size: 0.9rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.badge-sale {
    background: var(--color-red);
    color: var(--color-white);
}

.badge-new {
    background: var(--color-secondary);
    color: var(--color-white);
}

.badge-hot {
    background: #FF6B35;
    color: var(--color-white);
}

/* Lazy load */
.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Fade In Animation */
.fade-in.will-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

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

/* ========================================
   BREADCRUMB
======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: 16px 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-text-light);
}

.breadcrumb a:hover {
    color: var(--color-secondary);
}

.breadcrumb .sep {
    color: var(--color-border);
}

.breadcrumb .current {
    color: var(--color-text);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE GRID
======================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .section-padding { padding: 56px 0; }
    :root { --container-padding: 16px; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
}

/* ========================================
   BODY GRADIENT BACKGROUND
======================================== */
body {
    background: linear-gradient(180deg, #FFFDF9 0%, #F8F9FB 100%);
}

/* ========================================
   BADGE
======================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-sale {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: var(--color-white);
}

.badge-new {
    background: linear-gradient(135deg, #27AE60, #1E8449);
    color: var(--color-white);
}

.badge-hot {
    background: linear-gradient(135deg, #F39C12, #D68910);
    color: var(--color-white);
}

/* ========================================
   SECTION LABEL ENHANCED
======================================== */
.section-label {
    position: relative;
    padding-left: 14px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, var(--color-secondary), #B8924A);
    border-radius: 2px;
}

/* ========================================
   LOAD MORE BUTTON
======================================== */
.load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

/* ========================================
   PAGE TRANSITIONS
======================================== */
.section-padding { padding: 90px 0; }
.section-padding-sm { padding: 64px 0; }

/* ========================================
   RESPONSIVE BASE
======================================== */
@media (max-width: 768px) {
    .section-padding { padding: 60px 0; }
    .section-padding-sm { padding: 48px 0; }
}

/* ========================================
   SHARED CARDS FOR CPT ARCHIVES
======================================== */
.products-grid,
.blog-grid {
    display: grid;
    gap: 24px;
}

.products-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.products-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-card,
.blog-card,
.collection-archive-card {
    background: var(--color-white);
    border: 1px solid rgba(26, 26, 26, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(31, 35, 44, 0.08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.product-card:hover,
.blog-card:hover,
.collection-archive-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 169, 110, 0.42);
    box-shadow: 0 22px 54px rgba(31, 35, 44, 0.14);
}

.product-card__image-wrap,
.blog-card__image-wrap,
.collection-archive-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f3f4f6;
}

.product-card__image-wrap { aspect-ratio: 1 / 1; }
.blog-card__image-wrap,
.collection-archive-card__media { aspect-ratio: 16 / 10; }

.product-card__image,
.blog-card__image,
.collection-archive-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.product-card:hover .product-card__image,
.blog-card:hover .blog-card__image,
.collection-archive-card:hover img {
    transform: scale(1.05);
}

.product-card__tone {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.22));
    pointer-events: none;
}

.product-card__image-wrap .badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
}

.product-card__body,
.blog-card__body,
.collection-archive-card__body {
    padding: 18px;
}

.product-card__title,
.blog-card__title,
.collection-archive-card h2 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.32;
    margin: 0 0 10px;
}

.product-card__title a:hover,
.blog-card__title a:hover,
.collection-archive-card h2 a:hover {
    color: var(--color-secondary);
}

.product-card__desc,
.blog-card__excerpt,
.collection-archive-card p {
    color: var(--color-text-light);
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 14px;
}

.rating-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}

.rating-count {
    color: var(--color-text-light);
    font-size: .82rem;
}

.price-wrap {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.price-current,
.price-sale {
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

.price-original {
    color: var(--color-text-muted);
    text-decoration: line-through;
    font-size: .86rem;
}

.price-discount {
    background: var(--color-red-light);
    color: var(--color-red);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: .72rem;
    font-weight: 700;
}

.product-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: .88rem;
    font-weight: 700;
}

.product-card__cta:hover { color: var(--color-secondary); }

.blog-card__cat {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--color-secondary-light);
    color: #9b7232;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: .8rem;
}

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: 8px;
}

.products-empty__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-secondary-light);
    color: var(--color-secondary);
    font-size: 1.35rem;
}

.nav-links,
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.page-numbers {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-white);
    font-weight: 700;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

@media (max-width: 1024px) {
    .products-grid--4,
    .products-grid--3,
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .products-grid--4,
    .products-grid--3,
    .blog-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-card__body,
    .blog-card__body,
    .collection-archive-card__body { padding: 16px; }
}
