/* ============================================================
   iNeedMarketer Product Extras — frontend.css
   Works with Blocksy theme's CSS reset and utility classes.
   Dynamic color variables are injected via wp_add_inline_style().
   ============================================================ */

/* ─── Base variables (fallbacks if inline style hasn't loaded yet) ─── */
:root {
	--inmdpe-accent:      #2563eb;
	--inmdpe-rp-bg:       #f0fdf4;
	--inmdpe-rp-border:   #22c55e;
	--inmdpe-tbl-head-bg: #1e293b;
	--inmdpe-tbl-stripe:  #f8fafc;
	--inmdpe-tbl-border:  #e2e8f0;
	--inmdpe-wu-bg:       #f8fafc;
	--inmdpe-wu-accent:   #2563eb;
	--inmdpe-radius:      10px;
	--inmdpe-transition:  0.22s ease;
}

/* ================================================================
   1. RETURN POLICY
   ================================================================ */

.inmdpe-return-policy {
	margin: 20px 0;
	border: 1.5px solid var(--inmdpe-rp-border);
	border-radius: var(--inmdpe-radius);
	background: var(--inmdpe-rp-bg);
	overflow: hidden;
}

/* Toggle button */
.inmdpe-rp-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 13px 18px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 600;
	color: inherit;
	text-align: left;
	gap: 10px;
	transition: background var(--inmdpe-transition);
}

.inmdpe-rp-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}

.inmdpe-rp-toggle-title {
	flex: 1;
}

.inmdpe-rp-toggle-icon {
	display: flex;
	align-items: center;
	transition: transform var(--inmdpe-transition);
	color: var(--inmdpe-rp-border);
	flex-shrink: 0;
}

.inmdpe-rp-toggle.inmdpe-rp-open .inmdpe-rp-toggle-icon {
	transform: rotate(180deg);
}

/* Body (collapsible) */
.inmdpe-rp-body {
	padding: 4px 18px 16px;
	border-top: 1px solid var(--inmdpe-rp-border);
}

.inmdpe-rp-body[hidden] {
	display: none;
}

.inmdpe-rp-content {
	font-size: 0.9rem;
	line-height: 1.7;
	color: inherit;
	opacity: 0.85;
}

/* ================================================================
   2. CUSTOM TABLE STYLES
   Target: any <table> inside a product page when body has the class
   ================================================================ */

.inmdpe-custom-tables .woocommerce-product-details__short-description table,
.inmdpe-custom-tables .woocommerce-tabs table,
.inmdpe-custom-tables .entry-content table,
.inmdpe-custom-tables .wc-tab table,
.inmdpe-custom-tables .woocommerce-product-attributes table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.2em 0;
	font-size: 0.9rem;
	border-radius: var(--inmdpe-radius);
	overflow: hidden;
	border: 1px solid var(--inmdpe-tbl-border);
	box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* Header row */
.inmdpe-custom-tables .woocommerce-product-details__short-description table thead tr th,
.inmdpe-custom-tables .woocommerce-tabs table thead tr th,
.inmdpe-custom-tables .entry-content table thead tr th,
.inmdpe-custom-tables .wc-tab table thead tr th,
.inmdpe-custom-tables .woocommerce-product-attributes table thead tr th,
/* WC attribute table uses <th> in tbody */
.inmdpe-custom-tables .woocommerce-product-attributes table th {
	background: var(--inmdpe-tbl-head-bg);
	color: #fff;
	font-weight: 600;
	padding: 11px 15px;
	text-align: left;
	letter-spacing: 0.02em;
	border: none;
}

/* Body cells */
.inmdpe-custom-tables .woocommerce-product-details__short-description table tbody tr td,
.inmdpe-custom-tables .woocommerce-tabs table tbody tr td,
.inmdpe-custom-tables .entry-content table tbody tr td,
.inmdpe-custom-tables .wc-tab table tbody tr td,
.inmdpe-custom-tables .woocommerce-product-attributes table td {
	padding: 10px 15px;
	border-bottom: 1px solid var(--inmdpe-tbl-border);
	vertical-align: top;
}

/* Stripe on even rows */
.inmdpe-custom-tables .woocommerce-product-details__short-description table tbody tr:nth-child(even),
.inmdpe-custom-tables .woocommerce-tabs table tbody tr:nth-child(even),
.inmdpe-custom-tables .entry-content table tbody tr:nth-child(even),
.inmdpe-custom-tables .wc-tab table tbody tr:nth-child(even),
.inmdpe-custom-tables .woocommerce-product-attributes table tr:nth-child(even) {
	background: var(--inmdpe-tbl-stripe);
}

/* Hover row highlight */
.inmdpe-custom-tables .woocommerce-product-details__short-description table tbody tr:hover,
.inmdpe-custom-tables .woocommerce-tabs table tbody tr:hover,
.inmdpe-custom-tables .entry-content table tbody tr:hover,
.inmdpe-custom-tables .wc-tab table tbody tr:hover,
.inmdpe-custom-tables .woocommerce-product-attributes table tr:hover {
	background: rgba(0,0,0,.03);
	transition: background var(--inmdpe-transition);
}

/* Remove last row bottom border */
.inmdpe-custom-tables table tbody tr:last-child td {
	border-bottom: none;
}

/* Responsive wrapper for wide tables */
.inmdpe-custom-tables .woocommerce-tabs .panel,
.inmdpe-custom-tables .wc-tab {
	overflow-x: auto;
}

/* ================================================================
   3. WHY US SECTION
   ================================================================ */

.inmdpe-why-us {
	background: var(--inmdpe-wu-bg);
	border-radius: var(--inmdpe-radius);
	padding: 40px 30px;
	margin: 30px 0;
	border: 1px solid var(--inmdpe-tbl-border);
}

.inmdpe-wu-heading {
	text-align: center;
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 28px;
	position: relative;
}

.inmdpe-wu-heading::after {
	content: '';
	display: block;
	width: 48px;
	height: 3px;
	background: var(--inmdpe-wu-accent);
	border-radius: 99px;
	margin: 10px auto 0;
}

/* 3-column grid */
.inmdpe-wu-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

@media (max-width: 768px) {
	.inmdpe-wu-grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.inmdpe-wu-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Individual box */
.inmdpe-wu-box {
	background: #fff;
	border: 1px solid var(--inmdpe-tbl-border);
	border-radius: var(--inmdpe-radius);
	padding: 24px 20px;
	text-align: center;
	transition: transform var(--inmdpe-transition), box-shadow var(--inmdpe-transition);
	border-top: 3px solid var(--inmdpe-wu-accent);
}

.inmdpe-wu-box:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,.09);
}

.inmdpe-wu-box-icon {
	font-size: 2.2rem;
	line-height: 1;
	margin-bottom: 12px;
}

.inmdpe-wu-box-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: inherit;
}

.inmdpe-wu-box-desc {
	font-size: 0.875rem;
	line-height: 1.65;
	margin: 0;
	opacity: 0.75;
}
