/* =========================================
   GLOBAL STYLES
========================================= */
html, body {
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fefefe;
    margin: 0;
    padding: 0;
}

.product-click {
    text-decoration: none !important;
}

img, iframe, video {
    max-width: 100%;
    height: auto;
}

/* =========================================
   NAVBAR (CLS SAFE)
========================================= */

.navbar {
    min-height: 72px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 991px) {
    .navbar {
        min-height: 64px;
    }
}

.navbar-brand img {
    width: 150px;
    height: 48px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}



/* =========================================
   SEARCH BANNER
========================================= */
.banner-search-input {
    background: #fff;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.banner-search-input input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
}

.banner-search-input input::placeholder {
    color: #6c757d;
}

/* =========================================
   PRODUCT CARD
========================================= */
.card {
    border: none;
    cursor: default;
    transition: transform .2s, box-shadow .2s;
}
/* =========================================
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
========================================= */
.card img {
    transition: transform .3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

.card h6 a {
    color: #212529;
    transition: color .2s;
}
.card h6 a:hover {
    color: #0d6efd;
}

/* =========================================
   CARD PRICE & ADD TO CART INLINE
========================================= */
.price-left {
    color: #dc3545;
    font-weight: 600;
}

.add-to-cart-btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    transition: transform .2s, background .2s;
}

.add-to-cart-btn:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

/* =========================================
   BADGES
========================================= */
.badge.bg-danger,
.badge.bg-warning {
    font-size: 0.75rem;
    padding: 0.35em 0.5em;
    border-radius: 0.5rem;
}

.badge.bg-danger {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* =========================================
   PRODUCT MODAL + GALLERY
========================================= */
#productModal .modal-dialog {
    max-width: 900px !important;
}

.gallery-main img {
    width: 100%;
    height: 60vh;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 8px;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
}

.gallery-arrow.disabled {
    opacity: 0.3;
    cursor: default;
}

.thumb-slide-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    padding-top: 8px;
}

#thumbContainer img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    margin-right: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform .2s, border .2s;
    border: 2px solid transparent;
}

#thumbContainer img:hover {
    transform: scale(1.05);
}
#thumbContainer img.active {
    border-color: #0d6efd !important;
}

/* =========================================
   PRODUCT TITLE & PRICE
========================================= */
.product-title {
    font-size: 1.45rem;
    font-weight: 600;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc3545;
}

.old-price {
    text-decoration: line-through;
    color: #6c757d;
    margin-left: 6px;
}

.product-description.is-collapsed {
    max-height: 200px;   
    overflow: hidden;
    position: relative;
}

.product-description.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}



/* =========================================
   CATEGORY FILTER
========================================= */
.category-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.category-filters .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-filters .filter-buttons .btn-outline-primary.active {
    background: #0d6efd;
    color: #fff;
}

.modal-title,
.modal-title * {
    color: #212529 !important;
    text-decoration: none !important;
}

/* =========================================
   TEXT FIXED 2 LINE
========================================= */
.text-2-line-fixed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    line-height: 1.4em;
    min-height: 2.8em;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .text-2-line-fixed {
        font-size: 0.875rem;
        line-height: 1.35em;
        min-height: 2.7em;
    }
}

/* =========================================
   CART PAGE / CART DRAWER
========================================= */
.cart-item-card {
    border-radius: 12px;
    transition: transform .2s, box-shadow .2s;
}

.cart-item-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.cart-item-card img {
    border-radius: 8px;
    object-fit: cover;
}

.btn-remove-item { min-width: 80px; }

/* Offcanvas Cart */
.offcanvas-cart {
    width: 30vw !important;
    min-width: 300px;
}

@media (max-width: 768px) {
    .offcanvas-cart {
        width: 90vw !important;
    }

    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

.offcanvas-cart .offcanvas-body {
    overflow-y: auto;
    padding: 1rem;
}

.cart-drawer-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}


/* =========================================
   cate faq
========================================= */

.accordion-button {
  background: #fff;
}

.accordion-button:not(.collapsed) {
  background: #f8f9fa;
  color: #000;
}

.accordion-item {
  border: 1px solid #eee;
}

.accordion-body {
  line-height: 1.7;
}

/* ===== CKEditor Content Styling ===== */
.blog-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #212529;
}

/* Headings */
.blog-content h1 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.blog-content h2 {
  font-size: 1.5rem;
  margin: 1.75rem 0 1rem;
  font-weight: 600;
}

.blog-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

.blog-content h4 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.75rem;
}

/* Paragraph */
.blog-content p {
  margin-bottom: 1rem;
}

/* Images */
.blog-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 0.5rem;
}

/* Center image if wrapped in <figure> */
.blog-content figure {
  margin: 2rem auto;
  text-align: center;
}

.blog-content figure img {
  margin: 0 auto;
}

/* Lists */
.blog-content ul,
.blog-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* Blockquote */
.blog-content blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  color: #6c757d;
  margin: 1.5rem 0;
}

/* Fix size heading trong CKEditor */
.ck-content h1 { font-size: 28px; font-weight: 700; }
.ck-content h2 { font-size: 22px; font-weight: 600; }
.ck-content h3 { font-size: 18px; font-weight: 600; }
.ck-content h4 { font-size: 16px; font-weight: 500; }
.ck-content h5 { font-size: 14px; font-weight: 500; }

.ck-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.ck-content {
  min-height: 320px;
  font-size: 16px;
  line-height: 1.7;
}

.ck-content img {
  max-width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
}

.ck-skeleton:empty {
  min-height: 320px;
}

.card-img-top {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


.contact-info-box {
    max-width: 520px;
    margin: 30px auto;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 10px;
    text-align: center;
}

.contact-info-box h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.contact-item {
    font-size: 15px;
    margin-bottom: 10px;
}

.contact-item a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.contact-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.btn-contact {
    display: block;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s;
}

.btn-contact:hover {
    opacity: 0.9;
}

/* Màu theo nền tảng */
.btn-contact.zalo {
    background: #0068ff;
}

.btn-contact.facebook {
    background: #1877f2;
}

.btn-contact.instagram {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
}
