/* Button Components */
.btn {
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

/* Card Components */
.product-card {
    background: var(--card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f1f5f9;
}

.stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.95);
    color: var(--text);
    backdrop-filter: blur(8px);
}

.product-info { 
    padding: 0.875rem; 
}

.product-sku {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

/* Form Components */
.form-group { margin-bottom: var(--spacing-lg); }

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
    font-family: inherit;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

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

/* Modal Components */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    place-items: center;
    z-index: 1000;
}

.modal-overlay.active { display: grid; }

.modal-left {
    padding: 2rem;
    background: #f8fafc;
}

.modal-right {
    padding: 2rem;
}

.modal-product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.variant-selector {
    margin-bottom: 1.5rem;
}

.variant-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--text);
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-option {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    display: inline-block;
}

.variant-option:hover {
    border-color: var(--primary);
}

.variant-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.product-meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.product-meta-item strong {
    color: var(--text-light);
}

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.close-btn:hover { color: var(--text); }

.modal-body { padding: var(--spacing-xl); }

/* Success Animation */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2.5rem 3.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    text-align: center;
    display: none;
}

.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: var(--spacing-md);
}

/* Order Card */
.order-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

/* Product Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal.active { display: flex; }

.modal .modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0;
    position: relative;
    height: 95vh;
    overflow-y: auto;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.modal-close:hover { 
    background: var(--bg);
    transform: scale(1.1);
}

@media (max-width: 968px) {
    .modal {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal .modal-content {
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }
    
    .modal-grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
    
    .modal-image-section {
        padding: 1.5rem !important;
    }
    
    .modal-image-section img {
        height: 350px !important;
    }
    
    .modal-form-section {
        padding: 1.5rem !important;
        height: auto !important;
    }
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}
