/* ==========================================================================
   TR STYLE - কাস্টম কম্পোনেন্ট স্টাইলশিট
   সেকশন: বেস টাইপোগ্রাফি > হেডার > বাটন > প্রোডাক্ট কার্ড > ক্যাটাগরি গ্রিড
          > ফ্ল্যাশ সেল কাউন্টডাউন > সেকশন হেডিং > ফুটার > রেসপনসিভ
   ========================================================================== */

/* ---------- ১. বেস টাইপোগ্রাফি ---------- */
body,
button,
input,
select,
textarea {
	font-family: 'Hind Siliguri', 'Poppins', sans-serif;
	color: var(--brand-text);
}

h1, h2, h3, h4, h5, h6,
.ast-woocommerce-container h2 {
	font-family: 'Poppins', 'Hind Siliguri', sans-serif;
	font-weight: 700;
	color: var(--brand-text);
}

a { transition: color 0.2s ease; }
a:hover { color: var(--brand-primary); }

body { background-color: var(--brand-bg); }

/* ---------- ২. হেডার ---------- */
.ast-primary-header-bar,
.ast-above-header,
.site-header {
	background-color: var(--brand-white);
	border-bottom: 1px solid var(--brand-border);
}

.main-header-bar.sticky-header-active,
.ast-primary-header-bar.sticky-header-active {
	box-shadow: 0 2px 14px rgba(11, 79, 156, 0.1);
}

.ast-site-identity .site-title a,
.site-title a {
	color: var(--brand-primary-dark) !important;
	font-weight: 800;
}

/* টপ ইউটিলিটি বার (ফোন / হটলাইন) */
.ast-header-woo-cart .count,
.ast-cart-menu-wrap .count {
	background-color: var(--brand-accent);
	color: var(--brand-white);
}

/* মেইন মেনু */
.main-navigation ul li > a {
	font-weight: 600;
	color: var(--brand-text);
}
.main-navigation ul li > a:hover,
.main-navigation ul li.current-menu-item > a {
	color: var(--brand-primary);
}

/* মেগা মেনু ড্রপডাউন */
.main-navigation .sub-menu,
.main-header-bar-navigation .sub-menu {
	border-top: 3px solid var(--brand-primary);
	box-shadow: var(--shadow-card-hover);
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* সার্চ বার */
.ast-search-icon svg,
.ast-header-search svg { color: var(--brand-primary); }

/* ---------- ৩. বাটন (Add to Cart / Buy Now / সাধারণ বাটন) ---------- */
.ast-button,
button,
input[type="submit"],
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit {
	background-color: var(--brand-primary);
	color: var(--brand-white) !important;
	border: none;
	border-radius: var(--radius-sm);
	font-weight: 600;
	padding: 12px 26px;
	transition: all 0.25s ease;
	text-transform: none;
	letter-spacing: 0;
}

.ast-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
	background-color: var(--brand-primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--shadow-card-hover);
}

/* Buy Now / জরুরি অ্যাকশন বাটন - অ্যাকসেন্ট কালারে */
.tr-buy-now-btn,
.woocommerce a.buy-now-button {
	background-color: var(--brand-accent) !important;
}
.tr-buy-now-btn:hover,
.woocommerce a.buy-now-button:hover {
	background-color: var(--brand-accent-dark) !important;
}

/* ---------- ৪. প্রোডাক্ট কার্ড (Shop / Archive Loop) ---------- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: var(--brand-white);
	border-radius: var(--radius-md);
	padding: 14px 14px 20px;
	box-shadow: var(--shadow-card);
	border: 1px solid var(--brand-border);
	position: relative;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.woocommerce ul.products li.product:hover {
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-4px);
}

.woocommerce ul.products li.product img {
	border-radius: var(--radius-sm);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	min-height: 42px;
}

.woocommerce ul.products li.product .price {
	color: var(--brand-primary);
	font-weight: 700;
	font-size: 16px;
}
.woocommerce ul.products li.product .price del {
	color: var(--brand-text-muted);
	opacity: 0.7;
	font-weight: 400;
	margin-right: 6px;
}
.woocommerce ul.products li.product .price ins {
	text-decoration: none;
}

/* --- সেল ব্যাজ: ডায়াগোনাল রিবন স্টাইল (এই থিমের সিগনেচার এলিমেন্ট) --- */
.woocommerce span.onsale {
	position: absolute;
	top: 14px;
	left: -32px;
	min-height: auto;
	min-width: 130px;
	background: var(--brand-accent);
	color: var(--brand-white);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	padding: 4px 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	border-radius: 0;
	line-height: 1.6;
}

/* স্টক আউট ব্যাজ */
.woocommerce ul.products li.product.outofstock {
	opacity: 0.75;
}
.woocommerce ul.products li.product.outofstock::after {
	content: "স্টক শেষ";
	position: absolute;
	top: 14px;
	right: 14px;
	background: var(--brand-text);
	color: var(--brand-white);
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
}

/* কাস্টম "Hot" / "New" ব্যাজ ক্লাস (ম্যানুয়ালি প্রোডাক্ট শর্ট ডেসক্রিপশনে ট্যাগ যোগ করলে ব্যবহার করা যাবে) */
.tr-badge-hot,
.tr-badge-new {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
	color: var(--brand-white);
	z-index: 2;
}
.tr-badge-hot { background: #E63946; }
.tr-badge-new { background: var(--brand-success); }

/* Add to Cart আইকন বাটন হোভার এফেক্ট */
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .button {
	width: 100%;
	text-align: center;
	margin-top: 10px;
	display: block;
}

/* ---------- ৫. ক্যাটাগরি গ্রিড (Featured Categories - শর্টকোড আউটপুট) ---------- */
.tr-category-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	margin: 30px 0;
}

.tr-category-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	padding: 20px 10px;
	background: var(--brand-white);
	border-radius: var(--radius-md);
	border: 1px solid var(--brand-border);
	transition: all 0.25s ease;
}
.tr-category-card:hover {
	border-color: var(--brand-primary);
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-3px);
}

.tr-category-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--brand-primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-bottom: 12px;
}
.tr-category-icon img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.tr-category-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--brand-text);
}

/* ---------- ৬. ফ্ল্যাশ সেল কাউন্টডাউন টাইমার ---------- */
.tr-countdown {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: center;
}

.tr-countdown-box {
	background: var(--brand-primary-dark);
	color: var(--brand-white);
	border-radius: var(--radius-sm);
	padding: 10px 16px;
	min-width: 60px;
	text-align: center;
}

.tr-countdown-num {
	display: block;
	font-family: 'Poppins', sans-serif;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.1;
}

.tr-countdown-label {
	display: block;
	font-size: 11px;
	opacity: 0.85;
	margin-top: 2px;
}

/* ফ্ল্যাশ সেল সেকশন র‍্যাপার (এলিমেন্টর সেকশনে এই ক্লাস "CSS Classes" ফিল্ডে যোগ করুন) */
.tr-flash-sale-section {
	background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
	border-radius: var(--radius-lg);
	padding: 30px;
	color: var(--brand-white);
}
.tr-flash-sale-section h2 {
	color: var(--brand-white);
}

/* ---------- ৭. সেকশন হেডিং (Featured Categories, Top Selling ইত্যাদি টাইটেল) ---------- */
.tr-section-title {
	position: relative;
	font-size: 26px;
	font-weight: 800;
	margin-bottom: 28px;
	padding-bottom: 12px;
}
.tr-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 60px;
	height: 4px;
	background: var(--brand-accent);
	border-radius: 4px;
}

/* ---------- ৮. ফুটার ---------- */
.site-footer,
footer.site-footer {
	background-color: var(--brand-primary-dark);
	color: rgba(255,255,255,0.85);
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--brand-accent); }
.site-footer h2, .site-footer h3, .site-footer h4 {
	color: var(--brand-white);
}

/* ---------- ৯. রেসপনসিভ ---------- */
@media (max-width: 992px) {
	.tr-category-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
	.tr-category-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
	.tr-category-icon { width: 56px; height: 56px; }
	.tr-countdown-box { min-width: 48px; padding: 8px 10px; }
	.tr-countdown-num { font-size: 17px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px; min-height: 36px; }
}

/* কীবোর্ড ফোকাস দৃশ্যমান রাখা (এক্সেসিবিলিটি) */
a:focus-visible,
button:focus-visible,
.tr-category-card:focus-visible {
	outline: 3px solid var(--brand-accent);
	outline-offset: 2px;
}

/* মোশন কমানোর প্রেফারেন্স থাকলে অ্যানিমেশন বন্ধ */
@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product,
	.tr-category-card,
	.ast-button {
		transition: none !important;
		transform: none !important;
	}
}
