/*
Theme Name: Kho De
Theme URI: https://tranquochuy.com
Author: Kho De
Description: Custom theme for Kho De cloud certification mock test shop
Version: 1.0
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: khode
*/

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Be Vietnam Pro', sans-serif; color: #1a202c; background: #fff; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ── VARIABLES ── */
:root {
  --blue: #1a56db; --blue-dark: #1041b2; --blue-light: #e8f0fe;
  --blue-mid: #3b82f6; --text: #1a202c; --text-muted: #6b7280;
  --border: #e5e7eb; --white: #ffffff; --bg: #f8faff;
}

/* ── HEADER ── */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--blue); letter-spacing: -0.5px; }
.logo-icon { width: 36px; height: 36px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav a { color: var(--text-muted); transition: color 0.2s; }
.nav a:hover { color: var(--blue); }
.nav-cart { display: flex; align-items: center; gap: 6px; background: var(--blue); color: white !important; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; transition: background 0.2s; }
.nav-cart:hover { background: var(--blue-dark) !important; }
.cart-count { background: #ef4444; color: white; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

/* ── QUICK LINKS ── */
.quick-links { background: #fff; border-bottom: 1px solid var(--border); padding: 0 20px; }
.quick-links-inner { max-width: 1200px; margin: 0 auto; display: flex; overflow-x: auto; }
.quick-link { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-size: 13px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.2s; }
.quick-link:hover, .quick-link.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── HERO ── */
.hero { background: linear-gradient(135deg, #1a56db 0%, #1041b2 50%, #0a2d8a 100%); color: white; padding: 60px 20px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px; background: rgba(255,255,255,0.04); border-radius: 50%; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; letter-spacing: -1px; }
.hero h1 span { color: #93c5fd; }
.hero p { font-size: 16px; opacity: 0.85; margin-bottom: 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { background: white; color: var(--blue); padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 15px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: #e8f0fe; transform: translateY(-1px); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 15px; transition: all 0.2s; }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 20px; text-align: center; }
.stat-number { font-size: 32px; font-weight: 800; color: white; display: block; }
.stat-label { font-size: 12px; opacity: 0.75; margin-top: 4px; }

/* ── SECTIONS ── */
.section { padding: 60px 20px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.bg-light { background: var(--bg); }
.section-header { margin-bottom: 36px; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--blue); margin-bottom: 8px; }
.section-title { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.section-desc { color: var(--text-muted); margin-top: 8px; font-size: 15px; }

/* ── CATEGORY CARDS ── */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; position: relative; overflow: hidden; }
.category-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.category-card.gcp { background: linear-gradient(135deg, #4285f4, #1a56db); color: white; }
.category-card.aws { background: linear-gradient(135deg, #ff9900, #e67e00); color: white; }
.category-card.azure { background: linear-gradient(135deg, #0078d4, #004e8c); color: white; }
.category-icon { width: 52px; height: 52px; background: rgba(255,255,255,0.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.category-name { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.category-desc { font-size: 13px; opacity: 0.85; line-height: 1.6; }
.category-count { font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.2); display: inline-block; padding: 4px 12px; border-radius: 20px; margin-top: auto; }
.category-arrow { position: absolute; top: 24px; right: 24px; font-size: 20px; opacity: 0.6; }

/* ── PRODUCT GRID ── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: white; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; transition: all 0.2s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(26,86,219,0.12); border-color: var(--blue-mid); }
.product-img { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder { width: 100%; height: 160px; }
.product-img-placeholder.gcp { background: linear-gradient(135deg, #4285f4, #1a56db); }
.product-img-placeholder.aws { background: linear-gradient(135deg, #ff9900, #e67e00); }
.product-img-placeholder.azure { background: linear-gradient(135deg, #0078d4, #004e8c); }
.product-badge { position: absolute; top: 10px; left: 10px; background: #ef4444; color: white; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.provider-badge { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; color: white; }
.provider-badge.gcp { background: #4285f4; }
.provider-badge.aws { background: #ff9900; color: #1a1a1a; }
.provider-badge.azure { background: #0078d4; }
.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.product-name { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text); flex: 1; }
.product-meta { font-size: 12px; color: var(--text-muted); }
.product-price { margin-top: 4px; }
.product-price .price { font-size: 18px; font-weight: 800; color: var(--blue); }
.product-price del { font-size: 13px; color: var(--text-muted); }
.product-price ins { text-decoration: none; }
.btn-add-cart { display: block; width: 100%; background: var(--blue); color: white; border: none; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s; font-family: inherit; margin-top: 8px; text-align: center; }
.btn-add-cart:hover { background: var(--blue-dark); color: white; }

/* ── TRUST ── */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-card { text-align: center; padding: 32px 20px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.trust-icon { font-size: 36px; margin-bottom: 16px; display: block; }
.trust-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.trust-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── BUNDLE ── */
.bundle-banner { background: linear-gradient(135deg, #1a56db, #0a2d8a); border-radius: 20px; padding: 48px; color: white; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.bundle-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; }
.bundle-desc { font-size: 15px; opacity: 0.85; margin-bottom: 20px; }
.bundle-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.bundle-tag { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.bundle-price-box { text-align: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 16px; padding: 28px 36px; min-width: 200px; }
.bundle-price-label { font-size: 12px; opacity: 0.7; margin-bottom: 4px; text-decoration: line-through; }
.bundle-price { font-size: 42px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.bundle-price-unit { font-size: 13px; opacity: 0.8; margin-bottom: 20px; }
.btn-bundle { background: white; color: var(--blue); padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; display: block; text-align: center; transition: all 0.2s; }
.btn-bundle:hover { background: #e8f0fe; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-question { padding: 18px 24px; font-weight: 600; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: white; transition: background 0.2s; }
.faq-question:hover { background: var(--bg); }
.faq-answer { padding: 0 24px 18px; font-size: 14px; color: var(--text-muted); line-height: 1.7; background: white; }

/* ── WOOCOMMERCE ── */
.woo-wrapper { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; }
.woocommerce ul.products li.product { background: white; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; transition: all 0.2s; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(26,86,219,0.12); }
.woocommerce ul.products li.product a img { width: 100%; height: 180px; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; font-weight: 700; padding: 12px 16px 4px; }
.woocommerce ul.products li.product .price { font-size: 16px; font-weight: 800; color: var(--blue); padding: 0 16px 8px; display: block; }
.woocommerce ul.products li.product .button { display: block; margin: 0 16px 16px; background: var(--blue); color: white; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; transition: background 0.2s; }
.woocommerce ul.products li.product .button:hover { background: var(--blue-dark); }
.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.woocommerce-ordering select { border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; font-family: inherit; }

/* ── FOOTER ── */
.footer { background: #0f172a; color: white; padding: 48px 20px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 24px; }
.footer-logo { font-size: 22px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-desc { font-size: 14px; opacity: 0.6; line-height: 1.7; margin-bottom: 20px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a { font-size: 14px; opacity: 0.7; display: flex; align-items: center; gap: 8px; transition: opacity 0.2s; }
.footer-contact a:hover { opacity: 1; }
.footer-col-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.4; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; opacity: 0.65; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; opacity: 0.4; }

/* ── ZALO ── */
.zalo-widget { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.zalo-tooltip { background: white; color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 20px rgba(0,0,0,0.15); white-space: nowrap; }
.zalo-btn { width: 56px; height: 56px; background: #0068ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(0,104,255,0.4); animation: pulse 2s infinite; font-size: 22px; color: white; font-weight: 900; font-style: italic; text-align: center; line-height: 56px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 4px 20px rgba(0,104,255,0.4); } 50% { box-shadow: 0 4px 32px rgba(0,104,255,0.7); } }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-inner, .footer-top { grid-template-columns: 1fr; }
  .category-grid, .bundle-banner { grid-template-columns: 1fr; }
  .product-grid, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 28px; }
  .nav { gap: 12px; font-size: 13px; }
}

/* ── WOOCOMMERCE SHOP FIX ── */
.woo-wrapper { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: white !important;
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  width: 100% !important;
  height: 180px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 16px 4px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow: visible !important;
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--blue) !important;
  padding: 4px 16px 8px !important;
  display: block !important;
}

.woocommerce ul.products li.product .price del { color: var(--text-muted) !important; font-size: 13px !important; }
.woocommerce ul.products li.product .price ins { text-decoration: none !important; font-weight: 800 !important; }

.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  display: block !important;
  margin: auto 16px 16px !important;
  background: var(--blue) !important;
  color: white !important;
  padding: 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center !important;
  border: none !important;
}

.woocommerce ul.products li.product .button:hover { background: var(--blue-dark) !important; }

.woocommerce ul.products li.product .onsale {
  background: #ef4444 !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  min-height: auto !important;
  min-width: auto !important;
}

@media (max-width: 768px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Fix WooCommerce before/after pseudo elements */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  display: none !important;
  content: none !important;
}

/* ── MOBILE FIXES ── */
@media (max-width: 480px) {

  /* Header */
  .header-inner { padding: 0 12px; }
  .logo { font-size: 18px; }
  .logo-icon { width: 30px; height: 30px; font-size: 15px; }
  .nav { gap: 8px; }
  .nav a:not(.nav-cart) { display: none; }
  .nav-cart { padding: 6px 12px; font-size: 12px; }

  /* Hero */
  .hero { padding: 32px 16px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 12px 8px; }
  .stat-number { font-size: 20px; }
  .stat-label { font-size: 10px; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-outline { text-align: center; justify-content: center; }

  /* Quick links */
  .quick-link { padding: 10px 12px; font-size: 12px; }

  /* Categories */
  .category-name { font-size: 18px; }

  /* Products */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-name { font-size: 12px; }
  .price-current { font-size: 14px; }

  /* Bundle */
  .bundle-banner { padding: 24px 16px; }
  .bundle-title { font-size: 22px; }
  .bundle-price { font-size: 32px; }

  /* Trust */
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .trust-card { padding: 20px 12px; }

  /* Footer */
  .footer { padding: 32px 16px 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Sections */
  .section { padding: 40px 16px; }
  .section-title { font-size: 22px; }
}