/*
 * Thiên Nam Tablet Responsive — v1.10.87 PRE-PRODUCTION
 * Scope duy nhất: 600px–1024px.
 * Desktop bắt đầu từ 1025px; mobile kết thúc ở 599px.
 * Đây là lớp override cuối cho tablet. Mỗi module chỉ có một contract cuối.
 */

@media (min-width:600px) and (max-width:1024px){
  /* ===== PRODUCT CARD SYSTEM ===== */
  .tn-product-card-system .tn-product-grid{display:grid!important;align-items:stretch!important}
  .tn-product-card-system .tn-main-product-card{height:100%!important}
  .tn-product-card-system .tn-main-product-card .media{flex:0 0 auto!important;width:100%!important;height:auto!important;aspect-ratio:1/1!important}
  .tn-product-card-system .tn-main-product-card .media img{box-sizing:border-box!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;padding:8px!important}
  .tn-product-card-system .tn-main-product-card .content{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important}
  .tn-product-card-system .tn-main-product-card h3{margin:0 0 6px!important;font-size:18px!important;line-height:1.25!important}
  .tn-product-card-system .tn-main-product-card .content>p{margin:0!important;font-size:13px!important;line-height:1.58!important;min-height:3.16em!important}
  .tn-product-card-system .tn-card-bottom-row{margin-top:auto!important;padding-top:9px!important;padding-bottom:1px!important;border-top:.5px solid var(--tn-card-divider)!important}
  .tn-product-card-system .tn-card-bottom-row.is-priced{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:0!important;width:100%!important;min-width:0!important;min-height:38px!important;overflow:visible!important;white-space:nowrap!important}
  .tn-product-card-system .tn-card-bottom-row.is-priced .tn-product-card-price{display:flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0 auto 0 0!important;padding:0!important;align-items:center!important;white-space:nowrap!important}
  .tn-product-card-system .tn-card-bottom-row.is-priced .tn-card-price-value{flex-wrap:nowrap!important;white-space:nowrap!important}
  .tn-product-card-system .tn-card-add-cart-text{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;margin:0 7px 0 8px!important;padding:0!important;min-height:30px!important;height:30px!important;align-items:center!important;justify-content:center!important;font-size:11px!important;white-space:nowrap!important}
  .tn-product-card-system .tn-card-cart-icon{width:14px!important;height:14px!important;flex-basis:14px!important;margin-right:5px!important}
  .tn-product-card-system .tn-card-qty-minimal{display:grid!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;height:30px!important;grid-template-columns:17px 19px 17px!important;padding-left:7px!important;margin:0!important;white-space:nowrap!important}
  .tn-product-card-system .tn-card-qty-btn,.tn-product-card-system .tn-card-qty-input{height:30px!important}
  .tn-product-card-system .tn-card-qty-btn{font-size:15px!important;line-height:30px!important}
  .tn-product-card-system .tn-card-qty-input{font-size:12px!important;line-height:30px!important}
  .tn-product-card-system .tn-card-price-current,.tn-product-card-system .tn-card-price-sale,.tn-product-card-system .tn-card-price-contact{font-size:18px!important;line-height:30px!important}
  .tn-product-card-system .tn-card-bottom-row.is-contact{display:flex!important;align-items:center!important;min-height:38px!important}

  /* ===== HEADER ACTION SLOT ===== */
  .header .tn-header-actions{display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;align-self:center!important}

  /* ===== BUTTON ALIGNMENT ===== */
  a.btn,button.btn,.tn-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;vertical-align:middle!important;box-sizing:border-box!important;line-height:1.15!important}
  .actions>.btn,.actions>.tn-btn,.tn-subhero-buttons>.tn-btn,.tn-hero-buttons>.tn-btn,.tn-about-buttons>.tn-btn,.tn-region-buttons>.tn-btn,.tn-partner-hero-actions>.tn-btn,.tn-home-products-partner-actions>.btn,.tn-home-kiosk-actions>.btn,.tn-kiosk-hero-actions>.btn,.tn-kiosk-hero-buttons>.tn-btn,.tn-kiosk-origin-links>.btn,.tn-kiosk-location-actions>.btn,.tn-corner-hero-actions>.btn,.tn-corner-linkback .btn{align-items:center!important;justify-content:center!important;text-align:center!important}
  .product-cta>.actions{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;flex:0 0 200px!important;width:200px!important;min-width:200px!important;max-width:200px!important;gap:10px!important}
  .product-cta>.actions>.btn,.product-cta>.actions>.tn-btn{width:100%!important;min-width:0!important;max-width:none!important;min-height:44px!important;height:44px!important;padding:0 12px!important;margin:0!important;white-space:nowrap!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.15!important}

  /* ===== B2B PRODUCT CARDS ===== */
  .tn-partner-products .tn-partner-product-grid{align-items:stretch!important}
  .tn-partner-products .tn-partner-product-card{display:flex!important;flex-direction:column!important;height:100%!important}
  .tn-partner-products .tn-partner-product-photo{flex:0 0 auto!important}
  .tn-partner-products .tn-partner-product-body{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important}
  .tn-partner-products .tn-partner-product-body ul{flex:0 0 auto!important}
  .tn-partner-products .tn-partner-product-body .link{display:inline-flex!important;align-items:center!important;align-self:flex-start!important;margin-top:auto!important;padding-top:14px!important;margin-bottom:0!important;white-space:nowrap!important}

  /* ===== KIOSK HERO ===== */
  body.tn-page-thien-nam-kiosk .tn-kiosk-page-hero{position:relative!important;isolation:isolate!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-photo{inset:0 0 0 31%!important;z-index:0!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-gradient{z-index:1!important;background:linear-gradient(90deg,rgba(255,253,248,1) 0%,rgba(255,253,248,1) 27%,rgba(255,253,248,.98) 36%,rgba(255,253,248,.91) 44%,rgba(255,253,248,.70) 51%,rgba(255,253,248,.38) 59%,rgba(255,253,248,.12) 68%,rgba(255,253,248,0) 77%)!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-content{position:relative!important;z-index:3!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy{width:45%!important;max-width:470px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-kicker,body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy h1,body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy h1 span,body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy h1 em,body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy>p{position:relative!important;z-index:4!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-copy>p{color:#173f2d!important;font-weight:500!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-buttons{position:relative!important;z-index:5!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-buttons .tn-btn.primary{background:#315f24!important;border-color:#315f24!important;color:#fff!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-hero-buttons .tn-btn.secondary{background:rgba(255,253,248,.96)!important;border-color:#315f43!important;color:#173f2d!important}

  /* ===== KIOSK MENU RHYTHM ===== */
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-intro{padding-top:28px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-values-wrap{margin:0 0 28px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-value{min-height:68px!important;box-sizing:border-box!important;align-items:center!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-intro .tn-branch-head{margin:0 0 30px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-intro .tn-branch-head>span{margin-bottom:8px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-intro .tn-branch-head h2{margin-bottom:13px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-value>div>span{font-size:var(--tn-type-card-copy)!important;line-height:var(--tn-line-card-copy)!important}
}

@media (min-width:600px) and (max-width:899px){
  /* Product grid: 2 card/hàng. */
  .tn-product-card-system .tn-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .tn-product-card-system .tn-main-product-card .content{padding:18px 18px 13px!important}
  .tn-product-card-system .tn-card-add-cart-text{margin-left:6px!important;margin-right:5px!important;font-size:10.5px!important}
  .tn-product-card-system .tn-card-cart-icon{width:13px!important;height:13px!important;flex-basis:13px!important;margin-right:4px!important}
  .tn-product-card-system .tn-card-qty-minimal{grid-template-columns:16px 18px 16px!important;padding-left:5px!important}

  /* Header: Logo | menu canh phải | Cart, một hàng. */
  .header .container{width:calc(100% - 24px)!important}
  .header .navbar{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-height:68px!important;padding:5px 0!important}
  .header .logo{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:3px 4px!important}
  .header .logo img{display:block!important;height:46px!important;width:auto!important;max-width:68px!important}
  .header .tn-menu-toggle{display:none!important}
  .header .nav{display:flex!important;flex:0 1 auto!important;position:static!important;width:auto!important;min-width:0!important;margin-left:auto!important;margin-right:2px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;align-items:center!important;justify-content:flex-end!important}
  .header .nav .tn-menu{display:flex!important;flex:0 1 auto!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-end!important;width:auto!important;min-width:0!important;gap:clamp(6px,1.05vw,12px)!important;margin:0!important;padding:0!important}
  .header .nav .tn-menu li{flex:0 1 auto!important;min-width:0!important;width:auto!important;margin:0!important}
  .header .nav .tn-menu a{display:block!important;width:auto!important;padding:8px 0 7px!important;font-size:clamp(7px,1.03vw,8.8px)!important;line-height:1.05!important;letter-spacing:-.024em!important;white-space:nowrap!important}
}

@media (min-width:900px) and (max-width:1024px){
  /* Product grid: 3 card/hàng. */
  .tn-product-card-system .tn-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
  .tn-product-card-system .tn-main-product-card .content{padding:15px 15px 11px!important}
  .tn-product-card-system .tn-main-product-card h3{font-size:17px!important}
  .tn-product-card-system .tn-main-product-card .content>p{font-size:12.5px!important;line-height:1.56!important;min-height:4.68em!important}
  .tn-product-card-system .tn-card-add-cart-text{font-size:10px!important}
  .tn-product-card-system .tn-card-price-current,.tn-product-card-system .tn-card-price-sale,.tn-product-card-system .tn-card-price-contact{font-size:17px!important}
  .tn-product-card-system .tn-card-qty-minimal{grid-template-columns:15px 17px 15px!important;padding-left:6px!important}

  /* Header iPad Pro/tablet lớn. */
  .header .container{width:calc(100% - 32px)!important}
  .header .navbar{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;min-height:74px!important;gap:10px!important;padding:4px 0!important}
  .header .logo{flex:0 0 auto!important;margin:0!important;padding:3px 5px!important}
  .header .logo img{display:block!important;height:50px!important;width:auto!important;max-width:78px!important}
  .header .tn-menu-toggle{display:none!important}
  .header .nav{display:flex!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;margin-left:auto!important;margin-right:8px!important;padding:0!important;position:static!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;align-items:center!important;justify-content:flex-end!important}
  .header .nav .tn-menu{display:flex!important;flex:0 1 auto!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-end!important;width:auto!important;gap:clamp(10px,1.18vw,16px)!important;margin:0!important;padding:0!important}
  .header .nav .tn-menu li{flex:0 0 auto!important;min-width:0!important;width:auto!important;margin:0!important}
  .header .nav .tn-menu a{display:block!important;width:auto!important;padding:9px 0 8px!important;font-size:clamp(9.2px,1vw,10.4px)!important;line-height:1.08!important;letter-spacing:-.012em!important;white-space:nowrap!important}
}

@media (min-width:768px) and (max-width:1024px){
  /* Góc Trà & Pha chế: ảnh + heading trên, 3 card trải toàn chiều rộng dưới. */
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-layout{display:grid!important;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;grid-template-areas:"visual heading" "cards cards"!important;gap:28px!important;align-items:start!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-visual{grid-area:visual!important;align-self:start!important;margin-top:0!important;padding:0!important;border:0!important;border-radius:18px!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-visual img{display:block!important;width:100%!important;border-radius:18px!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-content{display:contents!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-content .tn-branch-head{grid-area:heading!important;margin:0!important;align-self:start!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-grid{grid-area:cards!important;width:100%!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;margin-top:0!important}
  body.tn-page-goc-tra-pha-che .tn-corner-foundation-grid article,body.tn-page-goc-tra-pha-che .tn-corner-foundation-grid article:last-child{grid-column:auto!important;min-height:210px!important}

  /* Kiosk: 4 giá trị cùng hàng trên tablet vừa/lớn. */
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-values{gap:12px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-value{grid-template-columns:32px minmax(0,1fr)!important;gap:9px!important;padding:12px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-value .tn-kiosk-point-icon{width:30px!important;height:30px!important}
  body.tn-page-thien-nam-kiosk .tn-kiosk-menu-value b{font-size:var(--tn-type-card-title-small)!important;line-height:var(--tn-line-card-title)!important}
}


/* v1.10.94 PREPROD — Góc Trà & Pha chế: 3 CTA cuối trang cân bằng trên tablet. */
@media (min-width:600px) and (max-width:1024px){
  body.tn-page-goc-tra-pha-che .tn-corner-linkback{
    align-items:center!important;
  }
  body.tn-page-goc-tra-pha-che .tn-corner-linkback>div:last-child{
    display:flex!important;
    flex:0 0 190px!important;
    width:190px!important;
    min-width:190px!important;
    max-width:190px!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:center!important;
    gap:10px!important;
    margin-left:auto!important;
  }
  body.tn-page-goc-tra-pha-che .tn-corner-linkback>div:last-child .btn{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 12px!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
}
