/**
 * WooCommerce Template Custom Styles (ISCF)
 * Cleaned up and consolidated.
 * Moved from theme to ISCF plugin for theme-independence.
 */

/* =====================================================================
   Single Product Page Layout
   ===================================================================== */
.product-layout-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 2rem;
}

.product-images-column {
	flex: 0 0 33.333%;
	max-width: 33.333%;
}

.product-summary-column {
	flex: 0 0 calc(66.666% - 2rem);
	max-width: calc(66.666% - 2rem);
}

/* Hide standalone price & quantity on single product */
.single-product .product-summary .price,
.single-product .quantity,
.single-product .qty,
.single-product .variations .reset_variations {
	display: none !important;
}

/* Billing Period selector styling */
.single-product .variations td.label {
	padding-bottom: 0.5rem;
	font-weight: 600;
}

.single-product .variations select {
	width: 100%;
	max-width: 300px;
	padding: 0.5rem;
	border-radius: 4px;
}

/* Subscription details table */
.wss-subscription-details-table {
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid #eee;
	border-radius: 8px;
}

.wss-subscription-details-table th {
	text-align: left;
	padding: 0.5rem 1rem 0.5rem 0;
	font-weight: 600;
}

/* =====================================================================
   Shop Page - Custom Grid & Cards
   ===================================================================== */

/* Force Container Full Width */
.woocommerce-shop #primary,
.woocommerce-shop .site-main,
.woocommerce-shop .products_box_outer {
	width: 100% !important;
	max-width: 1400px !important;
	margin: 0 auto !important;
	padding: 0 !important;
}

/* The Grid - Targeting the DIV wrapper specifically */
.products.columns-4,
.woocommerce .products.columns-4,
.woocommerce-page .products.columns-4 {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 30px !important;
	margin: 3rem 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

/* Bullet & Marker Killer - Targeting DIV/LI children */
.products.columns-4 > *,
.woocommerce .products.columns-4 > *,
.woocommerce .products.columns-4 .product,
.wss-product-card {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
	text-indent: 0 !important;
	background: none !important;
	display: block !important;
	width: 100% !important; /* Force items to fill grid cell */
	float: none !important; /* Kill theme floats */
	box-sizing: border-box !important;
}

.products.columns-4 > *::before,
.products.columns-4 > *::marker,
.wss-product-card::before {
	content: none !important;
	display: none !important;
}

/* Responsive Columns */
@media (max-width: 1100px) { 
	.products.columns-4 { grid-template-columns: repeat(3, 1fr) !important; } 
}
@media (max-width: 800px)  { 
	.products.columns-4 { grid-template-columns: repeat(2, 1fr) !important; } 
}
@media (max-width: 500px)  { 
	.products.columns-4 { grid-template-columns: 1fr !important; } 
}

/* The Card */
.wss-product-card-inner {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.wss-product-card-inner:hover {
	transform: translateY(-10px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.wss-product-card-link {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: inherit !important;
	flex: 1;
}

/* Square Image - No Zoom */
.wss-product-card-image {
	width: 100%;
	aspect-ratio: 1 / 1 !important;
	overflow: hidden;
	background: #f9f9f9;
}

.wss-product-card-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	transition: none !important;
	transform: none !important;
}

/* Card Content */
.wss-product-card-content {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1;
}

.wss-product-card-title {
	font-size: 1.15rem !important;
	font-weight: 800 !important;
	color: #1a1a2e !important;
	margin: 0 !important;
	line-height: 1.2;
}

.wss-product-card-excerpt {
	font-size: 0.9rem;
	color: #555;
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wss-product-card-price {
	font-size: 1.1rem;
	margin-top: auto;
	font-weight: 700;
	color: #2e7d32;
}

.wss-starting-text, .wss-today-text {
	font-weight: 400;
	color: #666;
	font-size: 0.9rem;
}

.wss-product-card-actions {
	padding: 0 1.25rem 1.25rem;
}

.wss-view-details-btn {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	transition: background 0.3s ease;
}

.wss-view-details-btn:hover {
	background: #000;
}

/* =====================================================================
   Add-on Services Section (Single Product)
   ===================================================================== */
.wss-addon-products {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eee;
}

.wss-addon-product-item {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	margin-bottom: 1rem;
	transition: box-shadow 0.2s ease;
}

.wss-addon-product-link {
	display: flex;
	align-items: center;
	text-decoration: none !important;
	padding: 1rem;
	gap: 1rem;
}

.wss-addon-product-image {
	width: 60px;
	height: 60px;
	flex-shrink: 0;
}

.wss-addon-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

.wss-addon-product-title {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 0.25rem 0;
}

.wss-addon-product-price {
	font-size: 0.9rem;
	color: #666;
}

/* =====================================================================
   Hide Theme Garbage
   ===================================================================== */
.star-rating, 
.woocommerce-product-rating,
.woocommerce ul.products li.product .overlay,
.woocommerce ul.products li.product .cart_btn,
.woocommerce ul.products li.product .im_zoom {
	display: none !important;
}

/* =====================================================================
   Shop Page - Category Filter
   ===================================================================== */
.wss-category-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2.5rem;
    padding: 1rem 1.25rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    flex-wrap: wrap;
}

.wss-category-filter label {
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.wss-category-filter select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    min-width: 220px;
    font-size: 0.9rem;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
}

.wss-category-filter select:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, 0.1);
}

@media (max-width: 600px) {
    .wss-category-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .wss-category-filter select {
        width: 100%;
    }
}

