/*
Theme Name: Lincup Astra
Template: astra
Author: Lincup.vn
Description: Theme con của Astra cho lincup.vn, cùng thiết kế với theme Lincup. Đầu trang, chân trang và màu sắc sửa trong Customizer.
Version: 1.0.0
Text Domain: lincup-astra
*/

/* Trang chủ tràn hết chiều rộng thay vì nằm trong khung của Astra. */
.home #content > .ast-container {
	display: block;
	max-width: none;
	padding: 0;
}

/* Đầu trang và chân trang do Astra dựng, bỏ phần CSS trùng tên class trong lincup.css. */
.site-header {
	background: var(--paper);
	backdrop-filter: none;
}

.site-footer {
	padding: 0;
	background: none;
}

/* Web không bán trực tiếp nên ẩn nút giỏ hàng và dòng phí vận chuyển của Astra. */
.ast-on-card-button,
.ast-card-action-tooltip,
.ast-shipping-text {
	display: none;
}

/* Cài đặt Astra đang dùng Arial, thay bằng font của thiết kế. */
.entry-content :is(h1, h2, h3),
.entry-title,
.woocommerce-products-header__title {
	font-family: var(--display);
}

.wp-block-button__link,
.ast-custom-button {
	font-size: 1rem;
	font-weight: 600;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-radius: 999px;
}

/* Astra thêm khung bài viết vào từng sản phẩm, bỏ đi để lưới sản phẩm đúng thiết kế. */
ul.products li.product {
	padding: 0 !important;
	border: 0;
	background: none;
}

ul.products .astra-shop-thumbnail-wrap {
	margin: 0;
}

ul.products .astra-shop-summary-wrap {
	padding: 0;
}

/* Cỡ tiêu đề trang và bài viết theo thiết kế, Astra mặc định để tiêu đề nhỏ hơn tiêu đề mục. */
.page .entry-header .entry-title,
.single-post .entry-header .entry-title {
	font-size: clamp(2rem, 5vw, 3rem);
	text-transform: none;
}

.entry-content h2 {
	font-size: 1.7rem;
	text-transform: none;
}

.entry-content h3 {
	font-size: 1.3rem;
}

/* Link trong đoạn văn cần gạch chân để phân biệt không chỉ bằng màu. */
.front p a:not(.btn),
.entry-content p a:not(.btn),
.buy__help a,
.product-desc p a,
.woocommerce-breadcrumb a {
	text-decoration: underline;
}

/* Link chân trang đủ cao để bấm trên điện thoại. */
.site-footer li {
	padding-block: 4px;
}

/* Mục lục của plugin LuckyWP theo màu thương hiệu. */
.entry-content .lwptoc_i {
	padding: 16px 20px;
	border-radius: var(--radius);
	background: var(--blush-soft) !important;
}

.entry-content .lwptoc a,
.entry-content .lwptoc_item_label,
.entry-content .lwptoc_item_number {
	color: var(--wine) !important;
}

/* Bảng trong bài viết theo màu thiết kế thay cho viền đen mặc định. */
.entry-content .wp-block-table table,
.entry-content .wp-block-table thead,
.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	border: 0;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	border-bottom: 1px solid var(--line);
}

.entry-content .wp-block-table thead th {
	background: var(--blush-soft);
}

/* Nút đầu trang không được co lại khi menu chiếm gần hết chiều ngang. */
.site-header-primary-section-right {
	flex: none;
}

.ast-custom-button {
	white-space: nowrap;
}

/* Màn hình nhỏ vẫn hiện menu máy tính: thu khoảng cách để 7 mục nằm trên một hàng.
   Chỉ nhắm vào #ast-desktop-header để không đụng tới menu di động của Astra. */
@media (min-width: 922px) and (max-width: 1180px) {
	#ast-desktop-header .ast-builder-grid-row {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	#ast-desktop-header .main-header-menu {
		flex-wrap: nowrap;
	}

	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		padding-inline: 9px;
		font-size: .9rem;
		white-space: nowrap;
	}
}

@media (min-width: 922px) and (max-width: 1000px) {
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		padding-inline: 5px;
		font-size: .84rem;
	}
}

/* Hai mục nhảy tới phần trong trang chủ không phải trang đang mở. */
@media (min-width: 922px) {
	#ast-desktop-header .main-header-menu > .current-menu-item > .menu-link[href*="#"] {
		color: var(--ast-global-color-3);
	}
}

.ast-mobile-popup-content .main-header-menu > .current-menu-item > .menu-link[href*="#"] {
	color: var(--ast-global-color-2);
}
