/* ==================== REUSABLE COMPONENTS ==================== */

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--ldm-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Signika', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.btn-outline {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: var(--ldm-radius);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 0;
}

.card-footer {
    padding-top: 16px;
    border-top: 1px solid var(--ldm-border);
    margin-top: 16px;
}

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ---- Product Card ---- */
.product-card {
    background: white;
    border-radius: var(--ldm-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--ldm-bg);
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ldm-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-brand {
    font-size: 12px;
    color: var(--ldm-text-light);
    margin-bottom: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
}

.product-rating .stars {
    color: #fbbf24;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-current-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.product-original-price {
    font-size: 14px;
    color: var(--ldm-text-light);
    text-decoration: line-through;
}

.product-discount {
    font-size: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-add-cart {
    flex: 1;
    font-size: 13px;
}

.btn-wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--ldm-border);
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    white-space: nowrap;
}

.btn-wishlist:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
}

.btn-wishlist.active {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.btn-wishlist svg {
    width: 16px;
    height: 16px;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ldm-text);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ldm-border);
    border-radius: var(--ldm-radius-sm);
    font-size: 14px;
    font-family: 'Signika', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: var(--ldm-border);
    margin: 24px 0;
}

.divider-text {
    text-align: center;
    position: relative;
    margin: 24px 0;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ldm-border);
}

.divider-text span {
    background: white;
    padding: 0 12px;
    position: relative;
    color: var(--ldm-text-light);
    font-size: 13px;
}

/* ---- Alert ---- */
.alert {
    padding: 14px 16px;
    border-radius: var(--ldm-radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---- Loading Spinner ---- */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: qhSpin 0.8s linear infinite;
}

@keyframes qhSpin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .card {
        padding: 14px;
    }

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


