/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ===== گرید ===== */
.pc-grid .wc-block-product-template{display:grid!important;grid-template-columns:repeat(4,1fr);gap:20px}
@media(max-width:1024px){.pc-grid .wc-block-product-template{grid-template-columns:repeat(3,1fr)}}
@media(max-width:768px){.pc-grid .wc-block-product-template{grid-template-columns:repeat(2,1fr);gap:12px}}

/* ===== کارت ===== */
.pc-card{border:0px solid #B0B0B070;border-radius:14px;padding:5px;background:#fff;display:flex;flex-direction:column;gap:10px;height:100%;container-type:inline-size}

/* ===== تصویر ===== */
.pc-card .wc-block-components-product-image{border-style:solid;border-color:#B0B0B070;border-width:0px 0px 1px 0px;border-radius:10px;overflow:hidden;margin:0}
.pc-card .wc-block-components-product-image{display:flex;align-items:center;justify-content:center;text-align:center}
.pc-card .wc-block-components-product-image a{display:flex;align-items:center;justify-content:center;width:100%}
.pc-card .wc-block-components-product-image img{width:100%;aspect-ratio:4/3;object-fit:cover;object-position:center center;display:block;margin:0 auto}

/* ===== اسم محصول (فیلد اسم کوتاه) ===== */
.pc-name{border:0px solid #B0B0B070;border-radius:10px;padding:5px 5px 0px 0px;text-align:center;font-weight:700;font-size:clamp(12px,6.5cqw,16px);margin:0}
.pc-name a{color:inherit;text-decoration:none}

/* ===== ردیف پایین: دکمه (راست) و قیمت (چپ) ===== */
.pc-row
{
	display:flex;
	flex-wrap:nowrap;
	gap:10px;
	lign-items:stretch;
	margin-top:auto
}
.pc-row>*{
	flex:1;margin:0!important;
	border:0px solid #B0B0B070;
	border-radius:10px;
	display:flex;
	align-items:center;
	justify-content:center;
	text-align:center;
	adding:5px;
	font-size:clamp(11px,5.5cqw,14px)
}

.pc-row .wp-block-button__link,
.pc-row .wc-block-components-product-button__button,
.pc-row .wp-block-button
{
	width:100%;
	background:#B0B0B070;
	color:#fff;
	border:0px;
	border-radius:8px
}
.pc-row .wc-block-components-product-button
{
	margin:0
}
.pc-roww>*
{
	flex:1;margin:0!important;
	border:0px solid #B0B0B070;
	border-radius:10px;
	display:flex;
	align-items:center;
	justify-content:center;
	text-align:center;
	padding:5px;
	font-size:clamp(11px,5.5cqw,14px);
}

/* ===== موبایل ===== */
 @media(max-width:768px){
  .pc-card{padding:8px;border-radius:12px;gap:8px}
  .pc-card .wc-block-components-product-image{border-radius:8px}
  .pc-name
   {
/*	padding:8px 6px; */
	line-height:1.6
	 }
	 
  /* قیمت بالا، دکمه پایین */
  .pc-row{flex-direction:row;gap:6px}
  .pc-row>*{padding:4px;min-width:0}
  .pc-row .wc-block-components-product-button__button,
  .pc-row .wp-block-button__link{font-size:13px;padding:8px 6px;white-space:normal}
}
@media(max-width:360px){
  .pc-grid .wc-block-product-template{gap:8px}
}
.pc-row .wc-block-components-product-button__button,
.pc-row .wp-block-button__link{
  font-size:0!important;
}
.pc-row .wc-block-components-product-button__button,
.pc-row .wp-block-button__link{
  font-size:0!important;
}


/* اضافه‌شده: کشیده شدن دکمه وودمارت */
.wp-block-group.pc-row{
  align-items:stretch;
}
.pc-row .pc-btn{
  align-self:stretch;
  display:flex;
  padding: 2px 5px 2px 5px;
}
.pc-row .pc-btn .wd-add-btn{
  display:flex;
  flex:1;
  width:100%;
  align-self:stretch;
}
.pc-row .pc-btn .wd-add-btn > a.button{
  display:flex;
  flex:1;
  align-items:center;
  justify-content:center;
  width:100%;
  margin:0;
  text-align:center;
  font-size:clamp(11px,5.5cqw,14px);
}

/* glow متن قیمت */
.pc-roww{
  text-shadow:0 0 6px #03CF00, 0 0 14px #04D400;
}

/* خط دست‌نویس دور قیمت */
.pc-roww{position:relative}
.pc-loop{
  position:absolute;
  left:-6px; right:-6px; top:-8px; bottom:-8px;
  width:calc(100% + 12px);
  height:calc(100% + 16px);
  pointer-events:none;
  overflow:visible;
}
.pc-loop path{
  fill:none;
  stroke:#FFD400;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:1;
  stroke-dashoffset:1;
  transition:stroke-dashoffset .3
}
.pc-card:hover .pc-loop path{
  stroke-dashoffset:0;
  transition:stroke-dashoffset .5s ease-in-out;
}

/* تصویر ۱۵۰ در ۱۵۰ در موبایل */
@media(max-width:768px){
  .pc-card .wc-block-components-product-image{
    width:150px !important;
    height:150px !important;
    max-width:100%;
    margin:0 auto !important;
  }
  .pc-card .wc-block-components-product-image img{
    width:150px !important;
    height:150px !important;
    max-width:100%;
    aspect-ratio:1/1 !important;
    object-fit:cover;
  }
}


/* کل کارت لینک بشه */
.pc-card{
  position:relative;
  cursor:pointer;
}
.pc-card .wc-block-components-product-image a::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
}
