/* CSS Reset for Widget */
.caro-shop-widget {
    margin: 40px 0;
    width: 100%;
    font-family: 'Inter', sans-serif;
    color: #111827;
}

.caro-shop-widget * {
    box-sizing: border-box;
}

/* Header */
.csb-header {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #111827;
}

/* Grid System */
.csb-grid {
    display: grid;
    grid-template-columns: repeat(var(--csb-cols, 3), 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .csb-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .csb-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* --- PRODUCT CARD DESIGN (Replicating App) --- */
.csb-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.csb-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Link Wrapper (Make whole card clickable) */
.csb-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Section */
.csb-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* Aspect Square */
    background: #f3f4f6;
    overflow: hidden;
}

.csb-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.csb-card:hover .csb-image {
    transform: scale(1.05);
}

/* Badges */
.csb-badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #eec42f;
    /* Caro Gold */
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Content Section */
.csb-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Category Label */
.csb-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7280;
    /* Gray 500 */
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    line-height: 1;
}

/* Product Title */
.csb-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    /* Gray 900 */
    margin: 0 0 12px 0;
    line-height: 1.4;
    text-align: left;
    /* Force left align */

    /* Line Clamp 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    /* Fixed height for alignment */
}

.csb-card:hover .csb-title {
    color: #dfa600;
    /* Darker Gold on hover */
}

/* Price Section */
.csb-price-row {
    margin-top: auto;
    /* Push to bottom */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.csb-price {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.csb-unit {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

/* Badge '3 offerts' */
.csb-badge-promo {
    background-color: #fef9c3;
    /* Yellow 100 */
    color: #854d0e;
    /* Yellow 800 */
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid #fde047;
}

/* Actions (Buttons) */
.csb-actions {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.csb-object-btn {
    width: 100%;
}

.csb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    line-height: 1;
    width: 100%;
}

.csb-btn-view {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.csb-btn-view:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.csb-btn-add {
    background: #000;
    border: 1px solid #000;
    color: #fff;
}

.csb-btn-add:hover {
    background: #333;
    border-color: #333;
    color: #fff !important;
}

/* Cart Link Widget */
.caro-shop-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 99px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.caro-shop-cart-link:hover {
    background: #e5e7eb;
}