/**
 * Product Grid and General Theme Styles
 * Base styles and product display components
 */

/* === PRODUCT GRID STYLES === */

.products .product h2 {
    font-weight: 400;
    font-size: 0.9rem!important;
    line-height: 1;
    color: #333;
}

.products .product bdi {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--gcid-primary-color, #333);
}

.woocommerce-message a.button.wc-forward:hover{
    color:var(--gcid-primary-color, #333)
}

button.button.update-cart{
    font-size:15px!important;
    padding: 3px 8px!important;
}

.item-details h4{
 font-size:0.9rem!important;
}

/* === GENERAL UTILITY STYLES === */

/* Button styles that don't fit in other categories */
.btn-primary {
    background: var(--gcid-secondary-color, #007cba);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.incom-ajax-search-title{
    font-size:0.8rem;
    font-weight: 400;
    line-height:1;
}

.btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--gcid-secondary-color, #333);
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: var(--gcid-secondary-color, #333);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--gcid-secondary-color, #007cba);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card component base styles */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    margin: 0;
    color: var(--gcid-secondary-color, #333);
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    color: #666;
    line-height: 1.6;
}

/* Alert/notification styles */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Form validation styles */
.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Responsive helpers */
@media (max-width: 768px) {
    .d-mobile-none {
        display: none !important;
    }
    
    .d-mobile-block {
        display: block !important;
    }
    
    .text-mobile-center {
        text-align: center !important;
    }
}

@media (min-width: 769px) {
    .d-desktop-none {
        display: none !important;
    }
    
    .d-desktop-block {
        display: block !important;
    }
}

/* --- Product Installments Styling --- */

/* Installments in product grids/loops */
.product-installments {
    font-size: 0.9rem;
    color: #28a745;
    margin-top: 0.5rem;
    font-weight: 500;
}

.product-installments .installment-interest-free {
    color: #28a745;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Single product installments */
.single-product-installments {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--gcid-secondary-color, #007cba);
}

.single-product-installments h4 {
    margin: 0 0 1rem 0;
    color: var(--gcid-secondary-color, #333);
    font-size: 1.1rem;
}

.installment-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.installment-option {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.installment-cash {
    color: #28a745;
    font-weight: 600;
    font-size: 1.1rem;
}

.installment-text {
    color: #333;
    font-size: 1rem;
}

.installment-text strong {
    color: #28a745;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .product-installments {
        font-size: 0.85rem;
    }
    
    .single-product-installments {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .installment-options {
        gap: 0.4rem;
    }
    
    .installment-option {
        padding: 0.4rem;
    }
}
