/* ============================================================
   Components - Buttons, Cards, Forms, Modals, Badges
   ============================================================ */

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.btn-sm {
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--sp-5) var(--sp-8);
    font-size: var(--fs-xl);
    border-radius: var(--radius-xl);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-cta {
    background: var(--gradient-cta);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-cta:hover {
    background: var(--gradient-cta-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
    border-color: rgba(255,255,255,0.8);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-white {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    background: var(--color-gray-50);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Feature Cards ─── */
.feature-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--sp-8);
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.feature-card-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-bg);
    border-radius: var(--radius-xl);
    margin: 0 auto var(--sp-5);
    color: var(--color-primary);
    transition: var(--transition-base);
}

.feature-card:hover .feature-card-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.feature-card-icon img {
    width: 36px;
    height: 36px;
}

.feature-card h3 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-2);
}

.feature-card p {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: var(--lh-relaxed);
}

/* ─── Info Card (Product Detail Grid) ─── */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    transition: var(--transition-fast);
}

.info-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-bg);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    flex-shrink: 0;
}

.info-card-icon img {
    width: 24px;
    height: 24px;
}

.info-card-body {
    flex: 1;
}

.info-card-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    margin-bottom: var(--sp-1);
}

.info-card-value {
    font-size: var(--fs-base);
    color: var(--color-text);
    line-height: var(--lh-relaxed);
}

/* ─── Benefit List ─── */
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.benefit-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.benefit-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success-bg);
    border-radius: var(--radius-full);
    color: var(--color-success);
    flex-shrink: 0;
}

.benefit-text {
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    color: var(--color-text-dark);
}

/* ─── Forms ─── */
.consult-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-2);
}

.form-input {
    width: 100%;
    padding: var(--sp-4) var(--sp-5);
    font-size: var(--fs-base);
    color: var(--color-text-dark);
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.form-input::placeholder {
    color: var(--color-text-lighter);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-input.error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.form-error {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-error);
    margin-top: var(--sp-1);
    min-height: 1em;
}

/* ─── Checkbox ─── */
.form-agree {
    margin-bottom: var(--sp-5);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    cursor: pointer;
    font-size: var(--fs-sm);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.checkbox-text {
    color: var(--color-text);
    line-height: var(--lh-normal);
}

.privacy-link {
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
    text-decoration: underline;
}

/* ─── Form Submit Button ─── */
.form-submit-btn {
    margin-top: var(--sp-2);
}

/* ─── Spinner ─── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ─── Form Success ─── */
.form-success {
    text-align: center;
    padding: var(--sp-10) var(--sp-6);
}

.form-success .success-icon {
    margin-bottom: var(--sp-4);
}

.form-success h4 {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-3);
}

.form-success p {
    font-size: var(--fs-base);
    color: var(--color-text-light);
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    padding: var(--sp-4);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition-base);
    box-shadow: var(--shadow-2xl);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-6);
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-header h3 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-gray-100);
    color: var(--color-text-dark);
}

.modal-body {
    padding: var(--sp-6);
}

.modal-footer {
    padding: var(--sp-4) var(--sp-6);
    border-top: 1px solid var(--color-gray-200);
    text-align: right;
}

/* ─── Privacy Table ─── */
.privacy-table {
    width: 100%;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--sp-5);
    font-size: var(--fs-sm);
}

.privacy-table th,
.privacy-table td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
}

.privacy-table th {
    background: var(--color-gray-50);
    font-weight: var(--fw-semibold);
    color: var(--color-text-dark);
    white-space: nowrap;
    width: 100px;
}

.privacy-table td {
    color: var(--color-text);
}

.privacy-notice {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: var(--lh-relaxed);
}

/* ─── Section CTA Block ─── */
.cta-block {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: var(--sp-12) var(--sp-8);
    text-align: center;
    color: var(--color-white);
}

.cta-block h2 {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin-bottom: var(--sp-3);
}

.cta-block p {
    font-size: var(--fs-lg);
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--sp-8);
}

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    line-height: 1.5;
}

.badge-new {
    background: var(--color-info-bg);
    color: var(--color-info);
}

.badge-contacted {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-progress {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.badge-completed {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge-cancelled {
    background: var(--color-gray-100);
    color: var(--color-gray-500);
}

/* ─── Product Overview Grid ─── */
.product-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
}

.product-overview-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    border: 1px solid var(--color-gray-200);
    transition: var(--transition-base);
}

.product-overview-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.product-overview-header {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}

.product-overview-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-bg);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    color: var(--color-primary);
}

.product-overview-icon img {
    width: 28px;
    height: 28px;
}

.product-overview-header h3 {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    line-height: var(--lh-snug);
}

.product-overview-tag {
    display: inline-block;
    margin-top: var(--sp-1);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
}

.product-overview-features {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
    padding-bottom: var(--sp-5);
    border-bottom: 1px solid var(--color-gray-100);
}

.product-overview-features li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
}

.product-overview-features li strong {
    color: var(--color-text-light);
    font-weight: var(--fw-medium);
}

.product-overview-features li span {
    color: var(--color-text-dark);
    font-weight: var(--fw-semibold);
}

/* ─── Process Steps ─── */
.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
}

.process-step {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
}

.process-step:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gradient-cta);
    color: var(--color-white);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    border-radius: var(--radius-full);
    margin-bottom: var(--sp-5);
}

.process-step h3 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    margin-bottom: var(--sp-3);
}

.process-step p {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: var(--lh-relaxed);
}

.process-arrow {
    flex-shrink: 0;
}

/* ─── CTA Form Wrapper (on dark bg) ─── */
.cta-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.cta-form-wrapper .form-input {
    background: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.3);
}

.cta-form-wrapper .form-input:focus {
    background: var(--color-white);
    border-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}

.cta-form-wrapper .form-label {
    color: rgba(255,255,255,0.9);
}

.cta-form-wrapper .checkbox-text {
    color: rgba(255,255,255,0.85);
}

.cta-form-wrapper .privacy-link {
    color: var(--color-accent-yellow);
}

.cta-form-wrapper .form-error {
    color: #FCA5A5;
}

.cta-form-wrapper .btn-cta {
    background: var(--color-white);
    color: var(--color-primary);
    font-weight: var(--fw-bold);
}

.cta-form-wrapper .btn-cta:hover {
    background: var(--color-gray-50);
    color: var(--color-primary-dark);
}

.cta-form-wrapper .form-success h4 {
    color: var(--color-white);
}

.cta-form-wrapper .form-success p {
    color: rgba(255,255,255,0.85);
}
