
/* ============================================================
   ldev-card-product
   ============================================================ */

.ldev-card-product-list {
    clear: both;
    overflow: hidden;
}

.ldev-card-product {
    background: #fff;
    text-align: center;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 6px;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.ldev-card-product:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    border-color: #d8d8d8;
}

.ldev-card-product-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 12px 10px 10px;
}

.ldev-card-product a:not(.btn),
.ldev-card-product a:not(.btn):hover,
.ldev-card-product a:not(.btn):focus,
.ldev-card-product a:not(.btn):visited {
    background: none;
    border: 0;
    padding: 0;
}

.ldev-card-product-image img {
    display: block;
    width: 100%;
    height: auto;
}
.ldev-card-product-single {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.ldev-card-product .h4 {
    margin: 8px 0 0;
    line-height: 1.3;
}
.ldev-card-product-name {
    font-size: 14px;
    line-height: 1.35;
}

.ldev-card-product__bottom {
    margin-top: 10px;
}

/* rating in card */
.ldev-card-product-rating.rating .fa-stack { font-size: 5px; }
.ldev-card-product-rating.rating .fa-star  { font-size: 10px; }
.ldev-card-product-rating.rating .fa-star-o { font-size: 11px; }

.ldev-card-product-rating + .ldev-card-product-price,
.ldev-card-product-single .ldev-card-product-price {
    margin-top: 8px;
}
.ldev-card-product-price {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.2;
}
.ldev-card-product-price .price-new {
    font-weight: 600;
    font-size: 16px;
    color: #7cb342;
}
.ldev-card-product-price .price-old {
    text-decoration: line-through;
    font-size: 13px;
    color: #999;
}

.ldev-card-product-button-group {
    margin-top: 10px;
}

/* position:relative helper */
.ldev-pos-rel { position: relative; }

/* ============================================================
   ldev-product-badges
   ============================================================ */

.ldev-product-badges {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
    pointer-events: none;
}
.ldev-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #fff;
    white-space: nowrap;
}
.ldev-badge--new  { background: #1982e5; }
.ldev-badge--sale { background: #e53935; }
.ldev-badge--out  { background: #9e9e9e; }

/* smaller badges for list/table (48px thumb) */
.ldev-product-list-image .ldev-badge {
    font-size: 8px;
    padding: 1px 4px;
}

/* shadow off */
.ldev-card-product--no-shadow {
    box-shadow: none;
    border-color: #e8e8e8;
    transition: none;
}
.ldev-card-product--no-shadow:hover {
    box-shadow: none;
    border-color: #e8e8e8;
}

/* name line-clamp */
.ldev-card-product-name--lines-1,
.ldev-card-product-name--lines-2,
.ldev-card-product-name--lines-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ldev-card-product-name--lines-1 { -webkit-line-clamp: 1; }
.ldev-card-product-name--lines-2 { -webkit-line-clamp: 2; }
.ldev-card-product-name--lines-3 { -webkit-line-clamp: 3; }

/* gap between cards (CSS custom property set inline on .ldev-card-product-list) */
.ldev-card-product-col {
    margin-bottom: var(--ldev-card-gap, 16px);
}


/* ============================================================
   ldev-card-category
   ============================================================ */

.ldev-category-card-list { clear: both; overflow: hidden; }

.ldev-card-category {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.ldev-card-category:hover,
.ldev-card-category:focus {
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    border-color: #d8d8d8;
    text-decoration: none;
    color: inherit;
}
.ldev-card-category-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.ldev-card-category-name {
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.slick-slide .ldev-card-category-image img {
    width: auto;
}
.ldev-card-category-count{margin-top: -10px;margin-bottom: 10px;}

/* product slider wrapper */
.ldev-product-slider-wrap { overflow: hidden; }
.ldev-product-slider .ldev-card-product-col { margin-bottom: 0; padding: 0 6px; }

/* slick arrows inside the slider (prevents clipping by overflow:hidden parents) */
.ldev-product-slider .slick-prev { left: 5px; z-index: 1; }
.ldev-product-slider .slick-next { right: 5px; z-index: 1; }

/* ============================================================
   ldev-product-list  (ul / flex-row per item)
   ============================================================ */

.ldev-product-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.ldev-product-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.ldev-product-list__item:last-child {
    border-bottom: none;
}

.ldev-product-list-thumb {
    flex-shrink: 0;
}
.ldev-product-list-image img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}

.ldev-product-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ldev-product-list-name {
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldev-product-list-rating.rating .fa-stack { font-size: 5px; }
.ldev-product-list-rating.rating .fa-star  { font-size: 10px; }
.ldev-product-list-rating.rating .fa-star-o { font-size: 11px; }

.ldev-product-list-price {
    font-size: 14px;
    line-height: 1.2;
}
.ldev-product-list-price .price-new {
    font-weight: 600;
    color: #7cb342;
}
.ldev-product-list-price .price-old {
    text-decoration: line-through;
    font-size: 12px;
    color: #999;
}

.ldev-product-list-action {
    flex-shrink: 0;
}


/* ============================================================
   ldev-product-list-table
   ============================================================ */

.ldev-product-list-table {
    width: 100%;
    border-collapse: collapse;
}

.ldev-product-list-table td {
    padding: 8px 6px;
    vertical-align: middle;
}
.ldev-product-list-table .ldev-product-list-thumb {
    width: 56px;
}
.ldev-product-list-table .ldev-product-list-image img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}
.ldev-product-list-table .ldev-product-list-price-cell {
    white-space: nowrap;
}
.ldev-product-list-table .ldev-product-list-action-cell {
    white-space: nowrap;
    text-align: right;
}
.ldev-product-list-price .price-old { text-decoration: line-through; color: #999; }


/* ============================================================
   ldev-attr-table  (product_attribute_table)
   ============================================================ */

.ldev-attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ldev-attr-table td {
    padding: 6px 10px;
    border: 1px solid #e8e8e8;
    vertical-align: top;
}
.ldev-attr-table tbody:nth-child(odd) .ldev-attr-name,
.ldev-attr-table tbody:nth-child(odd) .ldev-attr-value {
    background: #fafafa;
}
.ldev-attr-table .ldev-attr-group td {
    background: #f0f0f0;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #555;
}
.ldev-attr-table .ldev-attr-name {
    width: 40%;
    color: #666;
}
.ldev-attr-table .ldev-attr-value {
    color: #333;
}
