/**
 * Frontend Styles for Sagmart Product Fields
 *
 * Matches Sagmart theme styling and color scheme.
 *
 * @package Sagmart_Product_Fields
 */

:root {
	--sagmart-pf-primary: #111111;
	--sagmart-pf-accent: #55775c;
	--sagmart-pf-border: #eaeaea;
	--sagmart-pf-bg-subtle: #f9fbf9;
	--sagmart-pf-text-main: #2b2b2b;
	--sagmart-pf-text-muted: #666666;
}

/* Sections Wrapper */
.sagmart-product-fields-wrapper {
	margin-top: 40px;
	margin-bottom: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--sagmart-pf-border);
}

.sagmart-product-section {
	margin-bottom: 36px;
}

.sagmart-product-section:last-child {
	margin-bottom: 0;
}

/* Section Headings */
.sagmart-section-heading {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--sagmart-pf-primary);
	margin: 0 0 18px 0;
	padding-bottom: 8px;
	position: relative;
	letter-spacing: -0.01em;
}

.sagmart-section-heading::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 40px;
	height: 3px;
	background-color: var(--sagmart-pf-accent);
	border-radius: 2px;
}

/* ==========================================================================
   A) Key Features
   ========================================================================== */
.sagmart-key-features ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sagmart-key-features ul li {
	position: relative;
	padding-left: 30px;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--sagmart-pf-text-main);
	margin: 0;
}

.sagmart-key-features ul li::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #ffffff;
	background-color: var(--sagmart-pf-accent);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   B) Technical Specifications Table
   ========================================================================== */
.sagmart-specs-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
	background: #ffffff;
	border: 1px solid var(--sagmart-pf-border);
	border-radius: 8px;
	overflow: hidden;
	font-size: 0.925rem;
}

.sagmart-specs-table th,
.sagmart-specs-table td {
	padding: 12px 18px;
	border-bottom: 1px solid var(--sagmart-pf-border);
	vertical-align: top;
	text-align: left;
}

.sagmart-specs-table tr:last-child th,
.sagmart-specs-table tr:last-child td {
	border-bottom: none;
}

.sagmart-specs-table th {
	width: 28%;
	font-weight: 600;
	color: var(--sagmart-pf-primary);
	background-color: #fafafa;
	border-right: 1px solid var(--sagmart-pf-border);
}

.sagmart-specs-table td {
	color: var(--sagmart-pf-text-main);
	line-height: 1.6;
}

.sagmart-specs-table tr:nth-child(even) td {
	background-color: #fdfdfd;
}

.sagmart-specs-table tr:hover th,
.sagmart-specs-table tr:hover td {
	background-color: var(--sagmart-pf-bg-subtle);
}

/* ==========================================================================
   C) Warranty & Support (Card Style)
   ========================================================================== */
.sagmart-warranty-section .sagmart-warranty-card {
	background: #ffffff;
	border: 1px solid var(--sagmart-pf-border);
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sagmart-warranty-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.sagmart-warranty-item {
	background: #fafafa;
	border: 1px solid var(--sagmart-pf-border);
	border-left: 3px solid var(--sagmart-pf-accent);
	border-radius: 6px;
	padding: 12px 16px;
}

.sagmart-warranty-item.full-width {
	grid-column: 1 / -1;
}

.sagmart-warranty-label {
	display: block;
	font-size: 0.775rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--sagmart-pf-text-muted);
	margin-bottom: 4px;
}

.sagmart-warranty-val {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sagmart-pf-primary);
}

.sagmart-care-instructions {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px dashed var(--sagmart-pf-border);
}

.sagmart-care-instructions p {
	margin: 6px 0 0 0;
	font-size: 0.925rem;
	line-height: 1.6;
	color: var(--sagmart-pf-text-main);
}

/* ==========================================================================
   D) What's In The Box
   ========================================================================== */
.sagmart-in-box-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.sagmart-in-box-list li {
	background: #ffffff;
	border: 1px solid var(--sagmart-pf-border);
	border-radius: 8px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.925rem;
	font-weight: 500;
	color: var(--sagmart-pf-text-main);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.sagmart-in-box-list li:hover {
	border-color: var(--sagmart-pf-accent);
	transform: translateY(-1px);
}

.sagmart-in-box-list .box-icon {
	font-size: 16px;
	flex-shrink: 0;
}

/* Inside WooCommerce Native Tab panels (if used as tabs) */
.woocommerce-Tabs-panel .sagmart-product-section {
	margin-bottom: 24px;
}

.woocommerce-Tabs-panel .sagmart-section-heading {
	display: none; /* Tab heading is already shown in tab title */
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.sagmart-specs-table th {
		width: 38%;
		padding: 10px 12px;
	}

	.sagmart-specs-table td {
		padding: 10px 12px;
	}

	.sagmart-warranty-grid {
		grid-template-columns: 1fr;
	}

	.sagmart-in-box-list {
		grid-template-columns: 1fr;
	}
}
