/* ============================================================
   Bulkify — Frontend Styles  v1.6.0
   Clean, theme-neutral design that works inside Elementor layouts.
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties — override these in your theme/
   Elementor custom CSS to match your brand colours.
   ---------------------------------------------------------- */
:root {
	--bulkify-accent:       #1a1a2e;   /* Heading bar background          */
	--bulkify-accent-text:  #ffffff;   /* Heading bar text                */
	--bulkify-border:       #ebebeb;   /* Table row borders               */
	--bulkify-row-alt:      #fafafa;   /* Alternate row background        */
	--bulkify-active-bg:    #edf7ef;   /* Highlighted (active tier) row   */
	--bulkify-active-text:  #1a6b30;   /* Highlighted row text            */
	--bulkify-save-bg:      #d4f0da;   /* Savings % pill background       */
	--bulkify-save-text:    #1a6b30;   /* Savings % pill text             */
	--bulkify-badge-bg:     #1a1a2e;   /* Shop card badge background      */
	--bulkify-radius:       8px;       /* Border radius throughout        */
}

/* ==========================================================
   1. SINGLE PRODUCT — PRICING TABLE
   ========================================================== */

.bulkify-pricing-table {
	margin: 20px 0 24px;
	border-radius: var(--bulkify-radius);
	overflow: hidden;
	border: 1px solid var(--bulkify-border);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;

	/* Subtle card shadow — looks good on both white and coloured backgrounds */
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Heading bar */
.bulkify-table-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 11px 16px;
	background: var(--bulkify-accent);
	color: var(--bulkify-accent-text);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.bulkify-heading-icon {
	font-style: normal;
	font-size: 14px;
	opacity: 0.8;
}

/* Table reset — prevents Elementor / theme table styles breaking the layout */
.bulkify-pricing-table table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 0;
	padding: 0;
	background: #fff;
	table-layout: fixed;
}

.bulkify-pricing-table table,
.bulkify-pricing-table th,
.bulkify-pricing-table td {
	box-sizing: border-box;
}

/* Column widths */
.bulkify-col-qty   { width: 38%; }
.bulkify-col-price { width: 38%; }
.bulkify-col-save  { width: 24%; text-align: right; }

/* Header row */
.bulkify-pricing-table thead th {
	padding: 8px 16px;
	background: #f5f5f5;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #999;
	border-bottom: 1px solid var(--bulkify-border);
}

.bulkify-pricing-table thead th:last-child {
	text-align: right;
}

/* Body rows */
.bulkify-pricing-table tbody td {
	padding: 11px 16px;
	border-bottom: 1px solid var(--bulkify-border);
	color: #333;
	vertical-align: middle;
}

.bulkify-pricing-table tbody tr:last-child td {
	border-bottom: none;
}

/* Alternating row tint */
.bulkify-pricing-table tbody tr:nth-child(even) td {
	background: var(--bulkify-row-alt);
}

/* Active tier — highlighted when qty input matches */
.bulkify-pricing-table tbody tr.bulkify-active-tier td {
	background: var(--bulkify-active-bg) !important;
	color: var(--bulkify-active-text);
	font-weight: 700;
}

/* Savings pill */
.bulkify-save-pct {
	display: inline-block;
	background: var(--bulkify-save-bg);
	color: var(--bulkify-save-text);
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 20px;
}

/* Price formatting inside table cells — override WC default */
.bulkify-pricing-table .woocommerce-Price-amount {
	font-weight: 700;
	color: inherit;
}

/* ----------------------------------------------------------
   Elementor layout wrapper
   When the table is rendered via the add-to-cart hook fallback
   we add .bulkify-elementor-wrap for extra spacing control.
   ---------------------------------------------------------- */
.bulkify-elementor-wrap {
	margin-top: 16px;
}

/* Elementor resets — prevent their global table CSS from overriding ours */
.elementor .bulkify-pricing-table table,
.elementor-widget-container .bulkify-pricing-table table {
	border: none;
}

.elementor .bulkify-pricing-table th,
.elementor .bulkify-pricing-table td,
.elementor-widget-container .bulkify-pricing-table th,
.elementor-widget-container .bulkify-pricing-table td {
	border-color: var(--bulkify-border);
}

/* ==========================================================
   2. SHOP / ARCHIVE — COMPACT TIER PILLS
   ========================================================== */

.bulkify-archive-tiers {
	margin: 8px 0 4px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.bulkify-archive-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #999;
}

/* Pills row */
.bulkify-tier-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

/* Individual pill */
.bulkify-tier-pill {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 4px 10px;
	border: 1px solid var(--bulkify-border);
	border-radius: 6px;
	background: #fff;
	line-height: 1.3;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.bulkify-tier-pill:hover {
	border-color: var(--bulkify-accent);
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.bulkify-pill-qty {
	font-size: 10px;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.bulkify-pill-price {
	font-size: 13px;
	font-weight: 700;
	color: #222;
}

.bulkify-pill-price .woocommerce-Price-amount {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* ==========================================================
   3. BADGE
   ========================================================== */

.bulkify-badge {
	display: inline-block;
	background: var(--bulkify-badge-bg);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 4px;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

/* ==========================================================
   4. RESPONSIVE
   ========================================================== */

@media ( max-width: 480px ) {
	.bulkify-pricing-table {
		font-size: 13px;
	}

	.bulkify-pricing-table tbody td {
		padding: 9px 12px;
	}

	.bulkify-pricing-table thead th {
		padding: 7px 12px;
	}

	.bulkify-tier-pill {
		padding: 3px 8px;
	}

	.bulkify-pill-price {
		font-size: 12px;
	}
}
