/* ============================================================================
   Gas Station 1883 — WooCommerce dark-theme overrides
   Spójne z theme'em (deep blue + gold).
   Aktywuje się tylko na body.gsr-wc (WC views).
   ============================================================================ */

body.gsr-wc {
	--gw-bg:        rgba(15, 26, 50, 0.78);
	--gw-bg-2:      rgba(0, 21, 58, 0.85);
	--gw-surface:   rgba(0, 0, 0, 0.30);
	--gw-text:      #f7f8fa;
	--gw-text-muted:#94a8bf;
	--gw-border:    rgba(255, 255, 255, 0.10);
	--gw-border-hi: rgba(251, 191, 36, 0.40);
	--gw-gold:      #fbbf24;
	--gw-gold-deep: #d97706;
	--gw-blue:      #1976d2;
	--gw-danger:    #ef4444;
	--gw-success:   #4caf50;
}

body.gsr-wc .woocommerce,
body.gsr-wc .woocommerce-page,
body.gsr-wc .gsr-wc__wrap {
	color: var(--gw-text);
}

/* Headings on WC pages */
body.gsr-wc h1,
body.gsr-wc h2,
body.gsr-wc h3,
body.gsr-wc h4 { color: var(--gw-text); }

/* ====================================================================
   Notices (success / error / info)
   ==================================================================== */
body.gsr-wc .woocommerce-message,
body.gsr-wc .woocommerce-info,
body.gsr-wc .woocommerce-error,
body.gsr-wc .woocommerce-notices-wrapper > * {
	background: var(--gw-bg-2) !important;
	color: var(--gw-text) !important;
	border-radius: 12px !important;
	border-left-width: 0 !important;
	padding: 14px 22px !important;
	margin: 0 0 18px !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
	border: 1px solid var(--gw-border) !important;
}

body.gsr-wc .woocommerce-message { border-color: rgba(76, 175, 80, 0.4) !important; }
body.gsr-wc .woocommerce-message::before { color: var(--gw-success) !important; }

body.gsr-wc .woocommerce-error  { border-color: rgba(239, 68, 68, 0.4) !important; }
body.gsr-wc .woocommerce-error::before { color: var(--gw-danger) !important; }

body.gsr-wc .woocommerce-info   { border-color: rgba(251, 191, 36, 0.4) !important; }
body.gsr-wc .woocommerce-info::before  { color: var(--gw-gold) !important; }

body.gsr-wc .woocommerce-message a,
body.gsr-wc .woocommerce-info a,
body.gsr-wc .woocommerce-error a {
	color: var(--gw-gold) !important;
	font-weight: 700;
}

/* ====================================================================
   Shop loop / product cards
   ==================================================================== */
/* Selectors with .woocommerce.columns-N to outscore WC core styles. */
body.gsr-wc .woocommerce ul.products,
body.gsr-wc.woocommerce-page ul.products,
body.gsr-wc ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 22px !important;
	list-style: none !important;
	margin: 24px 0 !important;
	padding: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.gsr-wc .woocommerce.columns-1 ul.products,
body.gsr-wc .woocommerce ul.products.columns-1 { grid-template-columns: 1fr !important; }
body.gsr-wc .woocommerce.columns-2 ul.products,
body.gsr-wc .woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body.gsr-wc .woocommerce.columns-3 ul.products,
body.gsr-wc .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.gsr-wc .woocommerce.columns-4 ul.products,
body.gsr-wc .woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
body.gsr-wc .woocommerce.columns-5 ul.products,
body.gsr-wc .woocommerce ul.products.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
body.gsr-wc .woocommerce.columns-6 ul.products,
body.gsr-wc .woocommerce ul.products.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

@media (max-width: 900px) {
	body.gsr-wc .woocommerce ul.products,
	body.gsr-wc .woocommerce.columns-3 ul.products,
	body.gsr-wc .woocommerce.columns-4 ul.products,
	body.gsr-wc .woocommerce.columns-5 ul.products,
	body.gsr-wc .woocommerce.columns-6 ul.products,
	body.gsr-wc ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 540px) {
	body.gsr-wc .woocommerce ul.products,
	body.gsr-wc .woocommerce.columns-2 ul.products,
	body.gsr-wc .woocommerce.columns-3 ul.products,
	body.gsr-wc .woocommerce.columns-4 ul.products,
	body.gsr-wc ul.products {
		grid-template-columns: 1fr !important;
	}
}

/* Item override — must beat WC core's float-based layout */
body.gsr-wc .woocommerce ul.products li.product,
body.gsr-wc.woocommerce-page ul.products li.product,
body.gsr-wc .woocommerce.columns-3 ul.products li.product,
body.gsr-wc .woocommerce.columns-4 ul.products li.product,
body.gsr-wc ul.products li.product {
	width: auto !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 16px !important;
	float: none !important;
	clear: none !important;
	grid-column: auto !important;
	grid-row: auto !important;
	background: var(--gw-bg);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	transition: border-color 0.18s, transform 0.18s;
	display: flex !important;
	flex-direction: column !important;
}

/* Beat .first/.last specifically (WC adds clear:both to .first which broke grid in some cases) */
body.gsr-wc .woocommerce ul.products li.product.first,
body.gsr-wc .woocommerce ul.products li.product.last,
body.gsr-wc .woocommerce.columns-3 ul.products li.product.first,
body.gsr-wc .woocommerce.columns-3 ul.products li.product.last {
	clear: none !important;
	float: none !important;
	margin: 0 !important;
}

/* Make sure the page wrapper doesn't constrain grid width */
body.gsr-wc .gs-card {
	max-width: none !important;
	padding: 32px !important;
}
body.gsr-wc article.page > .gs-content,
body.gsr-wc .gs-content { max-width: none !important; }

body.gsr-wc ul.products li.product:hover,
body.gsr-wc .products li.product:hover {
	border-color: var(--gw-border-hi);
	transform: translateY(-2px);
}

body.gsr-wc ul.products li.product img,
body.gsr-wc .products li.product img {
	width: 100% !important;
	height: auto;
	border-radius: 10px;
	margin: 0 0 14px !important;
}

body.gsr-wc ul.products li.product .woocommerce-loop-product__title,
body.gsr-wc .products li.product .woocommerce-loop-product__title {
	color: var(--gw-text) !important;
	font-size: 1.05rem !important;
	font-weight: 800 !important;
	margin: 0 0 6px !important;
	padding: 0 !important;
	line-height: 1.3 !important;
}

body.gsr-wc ul.products li.product .price,
body.gsr-wc .products li.product .price {
	color: var(--gw-gold) !important;
	font-size: 1.15rem !important;
	font-weight: 900 !important;
	letter-spacing: 0;
	margin: 4px 0 12px !important;
}

body.gsr-wc ul.products li.product .price del { color: var(--gw-text-muted) !important; opacity: 0.6; }
body.gsr-wc ul.products li.product .price ins { background: transparent !important; }

body.gsr-wc ul.products li.product .button,
body.gsr-wc ul.products li.product .added_to_cart {
	margin-top: auto !important;
	align-self: flex-start !important;
	padding: 9px 18px !important;
	font-size: 0.8rem !important;
	letter-spacing: 0.6px !important;
}

/* Onsale badge */
body.gsr-wc span.onsale {
	background: var(--gw-gold) !important;
	color: #00153a !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px !important;
	border-radius: 999px !important;
	padding: 4px 12px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	line-height: 1 !important;
	font-size: 0.7rem !important;
	top: 14px !important;
	left: 14px !important;
	right: auto !important;
	box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
}

/* ====================================================================
   Single product page
   ==================================================================== */

/* Two-column layout: gallery left, summary right (mirroring WC default but themed). */
body.gsr-wc .single-product div.product {
	display: grid !important;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) !important;
	gap: 36px !important;
	margin: 0 0 36px !important;
}

@media (max-width: 768px) {
	body.gsr-wc .single-product div.product {
		grid-template-columns: 1fr !important;
		gap: 22px !important;
	}
}

body.gsr-wc .single-product div.product > .woocommerce-product-gallery,
body.gsr-wc .single-product div.product > .summary {
	width: auto !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

body.gsr-wc .product .woocommerce-product-gallery {
	background: var(--gw-bg);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 14px !important;
}

body.gsr-wc .product .woocommerce-product-gallery img {
	border-radius: 10px;
}

body.gsr-wc .product .summary {
	color: var(--gw-text);
}

body.gsr-wc .product .summary .product_title {
	font-size: 2rem;
	font-weight: 900;
	color: var(--gw-text);
	margin: 0 0 12px;
}

body.gsr-wc .product .summary .price,
body.gsr-wc .product p.price,
body.gsr-wc .product span.price {
	color: var(--gw-gold) !important;
	font-size: 1.6rem !important;
	font-weight: 900 !important;
}

body.gsr-wc .product .woocommerce-product-details__short-description {
	color: var(--gw-text-muted);
	margin-bottom: 22px;
}

body.gsr-wc .quantity input[type="number"] {
	background: var(--gw-surface) !important;
	color: var(--gw-text) !important;
	border: 1px solid var(--gw-border) !important;
	border-radius: 8px !important;
}

/* Tabs (description / additional / reviews) */
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs {
	border-bottom: 1px solid var(--gw-border) !important;
	padding-left: 0 !important;
	margin-bottom: 16px !important;
}
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs li {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 8px 0 0 !important;
}
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs li::before,
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs li::after { display: none !important; }
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs li a {
	color: var(--gw-text-muted) !important;
	padding: 12px 18px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	font-size: 0.85rem !important;
}
body.gsr-wc .woocommerce-tabs ul.tabs.wc-tabs li.active a {
	color: var(--gw-gold) !important;
	border-bottom: 2px solid var(--gw-gold) !important;
}
body.gsr-wc .woocommerce-tabs .panel { color: var(--gw-text); padding: 16px 0 !important; }

/* Related products heading */
body.gsr-wc .related h2,
body.gsr-wc .upsells h2,
body.gsr-wc .cart_totals h2,
body.gsr-wc h2.woocommerce-order-details__title {
	font-size: 1.4rem;
	color: var(--gw-text);
	border-bottom: 2px solid var(--gw-gold);
	padding-bottom: 10px;
	margin-bottom: 18px;
	display: inline-block;
}

/* ====================================================================
   Buttons (universal)
   ==================================================================== */
body.gsr-wc .button,
body.gsr-wc input[type="submit"].button,
body.gsr-wc .woocommerce-button,
body.gsr-wc a.button,
body.gsr-wc button.button,
body.gsr-wc .wc-block-components-button {
	background: linear-gradient(135deg, var(--gw-gold) 0%, var(--gw-gold-deep) 100%) !important;
	color: #00153a !important;
	border: 0 !important;
	padding: 11px 22px !important;
	border-radius: 10px !important;
	font: inherit !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px !important;
	text-transform: uppercase !important;
	box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35) !important;
	transition: transform 0.1s, box-shadow 0.15s, filter 0.15s !important;
	cursor: pointer;
	text-decoration: none !important;
}

body.gsr-wc .button:hover,
body.gsr-wc input[type="submit"].button:hover,
body.gsr-wc a.button:hover,
body.gsr-wc button.button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(251, 191, 36, 0.55) !important;
	filter: brightness(1.08);
	color: #00153a !important;
}

body.gsr-wc .button.alt,
body.gsr-wc .single_add_to_cart_button {
	font-size: 1rem !important;
	padding: 14px 28px !important;
}

body.gsr-wc .button.added::after { content: ' ✓'; }

/* ====================================================================
   Cart (table)
   ==================================================================== */
body.gsr-wc .woocommerce-cart-form,
body.gsr-wc .woocommerce-cart .cart_totals,
body.gsr-wc .woocommerce-checkout #order_review,
body.gsr-wc .woocommerce-account .woocommerce-MyAccount-content {
	background: var(--gw-bg);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 24px;
}

body.gsr-wc table.shop_table,
body.gsr-wc table.cart {
	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
	color: var(--gw-text) !important;
	width: 100%;
}

body.gsr-wc table.shop_table th {
	color: var(--gw-text-muted) !important;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid var(--gw-border) !important;
	padding: 12px 8px !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
}

body.gsr-wc table.shop_table td {
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid var(--gw-border) !important;
	padding: 14px 8px !important;
	color: var(--gw-text) !important;
	font-size: 0.95rem !important;
	vertical-align: middle !important;
}

body.gsr-wc table.shop_table tr:last-child td { border-bottom: 0 !important; }

body.gsr-wc table.shop_table .product-thumbnail img {
	width: 64px !important;
	height: 64px !important;
	object-fit: cover;
	border-radius: 8px;
}

body.gsr-wc table.shop_table .product-name a {
	color: var(--gw-text) !important;
	font-weight: 700;
	text-decoration: none;
}
body.gsr-wc table.shop_table .product-name a:hover { color: var(--gw-gold) !important; }

body.gsr-wc table.shop_table .product-price,
body.gsr-wc table.shop_table .product-subtotal,
body.gsr-wc table.shop_table .product-total {
	color: var(--gw-gold) !important;
	font-weight: 800 !important;
}

body.gsr-wc table.shop_table .remove {
	color: var(--gw-danger) !important;
	font-size: 1.4rem !important;
	font-weight: 900 !important;
	background: transparent !important;
	border: 0 !important;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}
body.gsr-wc table.shop_table .remove:hover { background: rgba(239, 68, 68, 0.15) !important; }

body.gsr-wc .coupon input[type="text"] {
	max-width: 200px;
	margin-right: 8px;
}

body.gsr-wc .cart-collaterals .cart_totals tr.order-total .amount {
	color: var(--gw-gold) !important;
	font-size: 1.4rem !important;
	font-weight: 900 !important;
}

/* ====================================================================
   Forms (checkout, my-account, login)
   ==================================================================== */
body.gsr-wc input[type="text"],
body.gsr-wc input[type="email"],
body.gsr-wc input[type="password"],
body.gsr-wc input[type="tel"],
body.gsr-wc input[type="number"],
body.gsr-wc input[type="search"],
body.gsr-wc input[type="url"],
body.gsr-wc textarea,
body.gsr-wc select,
body.gsr-wc .select2-container--default .select2-selection--single {
	background: var(--gw-surface) !important;
	color: var(--gw-text) !important;
	border: 1px solid var(--gw-border) !important;
	border-radius: 10px !important;
	padding: 12px 14px !important;
	font: inherit !important;
	width: 100% !important;
	transition: border-color 0.15s, box-shadow 0.15s !important;
}

body.gsr-wc input:focus,
body.gsr-wc textarea:focus,
body.gsr-wc select:focus,
body.gsr-wc .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--gw-gold) !important;
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18) !important;
	outline: 0 !important;
}

body.gsr-wc .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--gw-text) !important;
	line-height: 1.5 !important;
	padding: 0 !important;
}
body.gsr-wc .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--gw-text-muted) transparent transparent !important;
}

body.gsr-wc label {
	color: var(--gw-text) !important;
	font-weight: 600 !important;
	margin-bottom: 6px !important;
	display: block;
	font-size: 0.88rem !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

body.gsr-wc .required { color: var(--gw-gold) !important; }

body.gsr-wc .form-row {
	margin-bottom: 14px !important;
	padding: 0 !important;
}

/* ====================================================================
   Checkout layout
   ==================================================================== */
body.gsr-wc.woocommerce-checkout .col2-set,
body.gsr-wc form.checkout #customer_details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

@media (max-width: 768px) {
	body.gsr-wc.woocommerce-checkout .col2-set,
	body.gsr-wc form.checkout #customer_details {
		grid-template-columns: 1fr;
	}
}

body.gsr-wc.woocommerce-checkout .col2-set .col-1,
body.gsr-wc.woocommerce-checkout .col2-set .col-2 {
	width: auto !important;
	float: none !important;
}

body.gsr-wc #order_review_heading {
	margin-top: 20px;
	font-size: 1.4rem;
	border-bottom: 2px solid var(--gw-gold);
	padding-bottom: 8px;
	display: inline-block;
}

body.gsr-wc .woocommerce-checkout-review-order table.shop_table {
	margin: 0 !important;
}

/* Payment methods */
body.gsr-wc #payment {
	background: var(--gw-bg-2);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 18px;
	margin-top: 16px;
}

body.gsr-wc #payment ul.payment_methods {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
}

body.gsr-wc #payment ul.payment_methods li {
	background: transparent !important;
	border-bottom: 1px solid var(--gw-border) !important;
	padding: 12px 0 !important;
}

body.gsr-wc #payment ul.payment_methods li:last-child { border-bottom: 0 !important; }

body.gsr-wc #payment div.payment_box {
	background: var(--gw-surface) !important;
	color: var(--gw-text-muted) !important;
	border-radius: 10px !important;
	padding: 14px !important;
	margin-top: 8px !important;
}
body.gsr-wc #payment div.payment_box::before { display: none !important; }

/* ====================================================================
   My account
   ==================================================================== */
body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation {
	background: var(--gw-bg);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 18px 14px;
	width: 240px !important;
}

body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0 0 4px;
	border: 0 !important;
}

body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 10px 14px;
	color: var(--gw-text-muted) !important;
	border-radius: 8px;
	font-weight: 600;
	transition: background 0.15s, color 0.15s;
	text-decoration: none;
}

body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	background: rgba(251, 191, 36, 0.15) !important;
	color: var(--gw-gold) !important;
}

body.gsr-wc.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1;
}

/* Login form on account page */
body.gsr-wc .u-columns,
body.gsr-wc .woocommerce-form-login,
body.gsr-wc .woocommerce-form-register {
	background: var(--gw-bg);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 24px;
}

body.gsr-wc .u-column1,
body.gsr-wc .u-column2 {
	background: transparent;
}

/* ====================================================================
   Mini cart in header (if used)
   ==================================================================== */
body.gsr-wc .widget_shopping_cart_content {
	background: var(--gw-bg-2);
	color: var(--gw-text);
	padding: 16px;
	border-radius: 12px;
}

/* ====================================================================
   Order received / thank-you
   ==================================================================== */
body.gsr-wc.woocommerce-order-received .woocommerce-order {
	background: var(--gw-bg);
	border: 1px solid var(--gw-border);
	border-radius: 14px;
	padding: 32px;
}

body.gsr-wc .woocommerce-thankyou-order-received {
	font-size: 1.6rem;
	color: var(--gw-gold);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-bottom: 2px solid var(--gw-gold);
	padding-bottom: 12px;
	display: inline-block;
}

body.gsr-wc ul.order_details {
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 24px 0 !important;
}

body.gsr-wc ul.order_details li {
	border-right: 1px solid var(--gw-border) !important;
	padding: 6px 18px !important;
	color: var(--gw-text-muted) !important;
	font-size: 0.78rem !important;
	text-transform: uppercase;
	font-weight: 600;
}

body.gsr-wc ul.order_details li strong {
	display: block;
	color: var(--gw-text) !important;
	font-size: 1rem !important;
	margin-top: 4px !important;
	text-transform: none;
}

/* Mobile */
@media (max-width: 540px) {
	body.gsr-wc .woocommerce-cart-form,
	body.gsr-wc .cart_totals,
	body.gsr-wc #order_review,
	body.gsr-wc .woocommerce-MyAccount-content {
		padding: 16px !important;
	}
	body.gsr-wc.woocommerce-account .woocommerce-MyAccount-navigation {
		width: 100% !important;
		margin-bottom: 16px;
	}
	body.gsr-wc table.shop_table thead { display: none; }
	body.gsr-wc table.shop_table tr { display: block; padding: 12px 0; }
	body.gsr-wc table.shop_table td { display: block; padding: 4px 0 !important; border: 0 !important; }
	body.gsr-wc table.shop_table .product-thumbnail img { width: 48px !important; height: 48px !important; }
}
