/* =============================================================================
   Bogdanbor Child — Product Card Component
   Used on: WooCommerce shop, archive, category, and search pages.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   WooCommerce loop grid — 3 columns, override default WC styles
   ----------------------------------------------------------------------------- */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display:               grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap:                   2.5rem;
	list-style:            none;
	margin:                0 !important;
	padding:               0 !important;
	float:                 none !important;
}

@media (max-width: 1024px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------------
   Card list item — reset WooCommerce float layout
   ----------------------------------------------------------------------------- */
.woocommerce ul.products li.bogdanbor-product-card,
.woocommerce-page ul.products li.bogdanbor-product-card {
	width:        100% !important;
	float:        none !important;
	margin:       0 !important;
	padding:      0 !important;
	clear:        none !important;
	border:       none;
	background:   transparent;
	text-align:   left;
}

/* -----------------------------------------------------------------------------
   Card inner wrapper — carries the hover transform
   ----------------------------------------------------------------------------- */
.product-card-inner {
	display:        flex;
	flex-direction: column;
	height:         100%;
	background:     #ffffff;
	border-radius:  3px;
	box-shadow:     0 2px 20px rgba(0, 0, 0, 0.05);
	overflow:       hidden;
	transition:
		transform  0.35s ease,
		box-shadow 0.35s ease;
}

.bogdanbor-product-card:hover .product-card-inner {
	transform:  translateY(-6px);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* Added-to-cart flash state (set by product-card.js) */
.bogdanbor-product-card.is-added .product-card-inner {
	box-shadow: 0 0 0 2px #7b3b2f, 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------------------------------------------
   Product image
   ----------------------------------------------------------------------------- */
.product-card-image-wrap {
	position:    relative; /* contains absolutely-positioned badges */
	overflow:    hidden;
	flex-shrink: 0;
}

.product-card-image-link {
	display: block;
}

.product-card-image-wrap img {
	display:     block;
	width:       100%;
	height:      auto;
	aspect-ratio: 2 / 3;
	object-fit:  cover;
	transition:  transform 0.55s ease;
}

.bogdanbor-product-card:hover .product-card-image-wrap img {
	transform: scale(1.04);
}

/* Placeholder when no product image is set */
.product-card-image-placeholder {
	width:        100%;
	aspect-ratio: 2 / 3;
	background:   #f0ede8;
}

/* Sale / status badge — base */
.product-card-badge {
	position:         absolute;
	top:              1rem;
	left:             1rem;
	padding:          0.3rem 0.75rem;
	background-color: #7b3b2f;
	color:            #ffffff;
	font-size:        0.625rem;
	letter-spacing:   0.14em;
	text-transform:   uppercase;
	pointer-events:   none;
}

/* Coming-soon badge — muted slate, distinct from the sale badge */
.product-card-badge--coming-soon {
	background-color: #5a6472;
}

/* -----------------------------------------------------------------------------
   Details section
   ----------------------------------------------------------------------------- */
.product-card-details {
	display:        flex;
	flex-direction: column;
	flex:           1;
	padding:        1.5rem 1.5rem 1.5rem;
}

/* Meta row — category + vintage */
.product-card-meta {
	display:       flex;
	align-items:   center;
	gap:           0.75rem;
	margin-bottom: 0.625rem;
}

.product-card-category {
	font-size:      0.625rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color:          #7b3b2f;
}

.product-card-vintage {
	font-size:      0.625rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color:          #b0a090;
}

.product-card-vintage::before {
	content: '·';
	margin-right: 0.75rem;
	color: #d0c8c0;
}

/* Title */
.product-card-title {
	font-family:    Georgia, 'Times New Roman', serif;
	font-size:      1.0625rem;
	font-weight:    400;
	line-height:    1.4;
	margin:         0 0 0.75rem;
}

.product-card-title a {
	color:           #1a1a1a;
	text-decoration: none;
	transition:      color 0.25s;
}

.product-card-title a:hover {
	color: #7b3b2f;
}

/* Excerpt */
.product-card-excerpt {
	font-size:   0.875rem;
	line-height: 1.75;
	color:       #888;
	margin:      0 0 1.25rem;
	flex:        1;
}

/* -----------------------------------------------------------------------------
   Card footer — price + button
   ----------------------------------------------------------------------------- */
.product-card-footer {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	gap:             1rem;
	margin-top:      auto;
	padding-top:     1.25rem;
	border-top:      1px solid rgba(0, 0, 0, 0.06);
}

/* Price — uses WooCommerce .price class */
.product-card-price .woocommerce-Price-amount,
.product-card-price .price {
	font-family: Georgia, serif;
	font-size:   0.9375rem;
	color:       #1a1a1a;
}

.product-card-price del {
	color:      #bbb;
	font-size:  0.8125rem;
	margin-right: 0.375rem;
}

.product-card-price ins {
	text-decoration: none;
}

/* -----------------------------------------------------------------------------
   Add-to-cart button
   Override WooCommerce default button styles to match brand
   ----------------------------------------------------------------------------- */
.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button,
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button {
	display:         inline-block;
	padding:         0.5rem 1.125rem;
	background:      transparent;
	border:          1px solid #1a1a1a;
	border-radius:   0;
	color:           #1a1a1a;
	font-size:       0.625rem;
	font-weight:     400;
	letter-spacing:  0.14em;
	text-transform:  uppercase;
	text-decoration: none;
	white-space:     nowrap;
	cursor:          pointer;
	transition:
		background-color 0.25s ease,
		color            0.25s ease,
		border-color     0.25s ease;
}

.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button:hover,
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button:hover {
	background-color: #1a1a1a;
	color:            #ffffff;
}

/* Loading state (WooCommerce adds .loading while AJAX runs) */
.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button.loading,
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button.loading {
	opacity:       0.6;
	pointer-events: none;
	position:      relative;
}

.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button.loading::after {
	content:      '';
	display:      inline-block;
	width:        10px;
	height:       10px;
	margin-left:  8px;
	border:       1.5px solid currentColor;
	border-top-color: transparent;
	border-radius:    50%;
	vertical-align:   middle;
	animation:    bogdanbor-spin 0.6s linear infinite;
}

@keyframes bogdanbor-spin {
	to { transform: rotate(360deg); }
}

/* Added state (WooCommerce adds .added after successful AJAX) */
.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button.added,
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button.added {
	background-color: #7b3b2f;
	border-color:     #7b3b2f;
	color:            #ffffff;
}

/* "View cart" link WooCommerce appends after adding */
.bogdanbor-product-card .added_to_cart {
	display:         none; /* hidden — cart icon in header serves this purpose */
}

/* -----------------------------------------------------------------------------
   Variable product — "Select options" button style
   ----------------------------------------------------------------------------- */
.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button[data-product_type="variable"],
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button[data-product_type="variable"] {
	border-color: #7b3b2f;
	color:        #7b3b2f;
}

.woocommerce .bogdanbor-product-card .product-card-add-to-cart.button[data-product_type="variable"]:hover,
.woocommerce-page .bogdanbor-product-card .product-card-add-to-cart.button[data-product_type="variable"]:hover {
	background-color: #7b3b2f;
	color:            #ffffff;
}

/* -----------------------------------------------------------------------------
   Out-of-stock state
   ----------------------------------------------------------------------------- */
.bogdanbor-product-card.outofstock .product-card-image-wrap img {
	opacity: 0.5;
	filter:  grayscale(30%);
}

.bogdanbor-product-card.outofstock .product-card-add-to-cart.button {
	display: none;
}

/* Optionally show a label instead */
.bogdanbor-product-card.outofstock .product-card-footer::after {
	content:        attr(data-stock-label);
	font-size:      0.625rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color:          #bbb;
}

/* -----------------------------------------------------------------------------
   Coming-soon notify placeholder
   ----------------------------------------------------------------------------- */
.product-card-notify-text {
	font-size:      0.625rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color:          #5a6472;
	margin:         0;
	padding:        0.5rem 0;
}
