/* Caro Shop Bridge - Premium Styles */

.caro-shop-widget {
    margin: 40px 0;
    max-width: 100%;
    font-family: inherit;
    /* Inherit theme font */
}

.caro-shop-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: left;
    color: #1a1a1a;
    border-bottom: 2px solid #eec42f;
    /* Brand Accent */
    display: inline-block;
    padding-bottom: 8px;
}

.caro-shop-grid {
    display: grid;
    /* Use --cols if defined, else default auto-fill strategy */
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
}

/* Fallback for auto-fill behavior if --cols is not set or supported nicely */
@supports not (grid-template-columns: repeat(var(--cols), 1fr)) {
    .caro-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.caro-product-card {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    text-decoration: none !important;
    /* Force override WP themes */
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.caro-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.caro-product-image-wrapper {
    position: relative;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    background-color: #f9fafb;
    overflow: hidden;
}

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

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

.caro-product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.caro-product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0 !important;
    color: #111827;
    line-height: 1.4;
}

.caro-product-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
}

.caro-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #eec42f;
    /* Brand Gold */
    margin-top: auto;
}

/* --- Actions Actions --- */
.caro-product-actions {
    padding: 0 16px 16px 16px;
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.caro-action-btn {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    /* Reduced side padding to fit text */
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1;
}

/* View Button - Secondary */
.caro-btn-view {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.caro-btn-view:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* Add Button - Primary */
.caro-btn-add {
    background-color: #1f2937;
    color: white;
}

.caro-btn-add:hover {
    background-color: #eec42f;
    color: black;
}

/* --- Cart Shortcode Styles --- */
.caro-shop-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: color 0.2s;
}

.caro-shop-cart-link:hover {
    color: #eec42f;
}

.caro-cart-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.caro-cart-label {
    font-size: 1rem;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .caro-shop-grid {
        /* Force 2 columns on tablet/mobile if cols is high, or 1 if very small */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .caro-shop-grid {
        grid-template-columns: 1fr !important;
    }

    .caro-product-info {
        padding: 12px;
    }

    .caro-product-title {
        font-size: 1rem;
    }
}