/* Header Styles - Universal for all pages */

/* Header Container */
.page-header { 
    background: white; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 200;
    min-height: 72px;
    border-bottom: 1px solid #e5e7eb;
}

.header-content { 
    padding: 20px 0; 
    display: flex; 
    align-items: center; 
    gap: 30px;
    min-height: 72px;
}

/* Logo */
.logo { 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    flex-shrink: 0;
}

.logo img { 
    display: block;
}

/* Desktop logo - visible by default */
img.logo-desktop { 
    display: block; 
    height: 32px;
}

/* Mobile logo - hidden by default */
img.logo-mobile { 
    display: none;
}

/* Search Box */
.search-box { 
    flex: 1; 
    position: relative; 
    max-width: 600px;
    display: flex;
    gap: 8px;
}

.search-input { 
    flex: 1;
    padding: 12px 20px 12px 50px; 
    border: 2px solid #e5e7eb; 
    border-radius: 8px; 
    font-size: 16px;
    transition: border-color 0.2s;
}

/* Category page style - search input without icon padding */
.search-box.category-style .search-input {
    padding: 10px 16px;
}

.search-input:focus { 
    outline: none; 
    border-color: #2563eb; 
}

.search-icon { 
    position: absolute; 
    left: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 20px; 
    height: 20px; 
    color: #9ca3af; 
    pointer-events: none; 
}

/* Search button - hidden by default (goods4 style) */
.search-btn { 
    display: none;
}

/* Category page style - visible search button */
.search-box.category-style .search-btn {
    display: block;
    padding: 10px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-box.category-style .search-btn:hover {
    background: #1d4ed8;
}

/* Hide search icon when using category style */
.search-box.category-style .search-icon {
    display: none;
}

/* Mobile search placeholder - hidden on desktop */
.mobile-search-placeholder { 
    display: none; 
}

/* Post Buy Request Button */
.post-request-btn { 
    padding: 10px 24px; 
    background: transparent; 
    color: #FF6B35; 
    border: 2px solid #FF6B35; 
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.post-request-btn:hover { 
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

/* Header Phone Sales */
.header-phone-sales {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    text-decoration: none;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-phone-sales:hover {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.header-phone-sales svg {
    flex-shrink: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .page-header {
        min-height: 60px;
    }
    
    .header-content {
        padding: 12px 0;
        gap: 12px;
        min-height: 60px;
    }
    
    /* Show mobile logo, hide desktop logo */
    img.logo-desktop { 
        display: none; 
    }
    
    img.logo-mobile { 
        display: block;
        height: 24px;
    }
    
    /* Hide actual search input, show placeholder instead */
    .search-input {
        display: none;
    }
    
    .search-icon {
        display: none;
    }
    
    /* Mobile search placeholder */
    .mobile-search-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px 16px;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        color: #9ca3af;
        font-size: 14px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    .search-box {
        flex: 1;
        max-width: none;
    }
    
    /* Hide Post Buy Request button on mobile */
    .post-request-btn {
        display: none;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .search-box {
        max-width: 400px;
    }
    
    .header-content {
        gap: 20px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .search-box {
        max-width: 700px;
    }
}

/* Buy Request Modal */
.buy-request-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.buy-request-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.buy-request-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.buy-request-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.buy-request-close:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

/* Progress Steps */
.buy-request-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 16px;
}

.buy-request-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.buy-request-step.active {
    opacity: 1;
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
}

.buy-request-step.active .step-number {
    background: linear-gradient(135deg, #FF7A3D 0%, #FF6B35 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.buy-request-step.active .step-label {
    color: #1f2937;
}

.buy-request-step-line {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    margin-bottom: 30px;
}

/* Form Steps */
.buy-request-form-step {
    display: none;
}

.buy-request-form-step.active {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.buy-request-form-step h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.step-description {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF7A3D;
    box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.1);
}

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

/* Buttons */
.btn-next,
.btn-submit,
.btn-back,
.btn-close-success {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-next,
.btn-submit,
.btn-close-success {
    background: linear-gradient(135deg, #FF7A3D 0%, #FF6B35 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
    width: 100%;
}

.btn-next:hover,
.btn-submit:hover,
.btn-close-success:hover {
    background: linear-gradient(135deg, #FF8C50 0%, #FF7A3D 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
    transform: translateY(-2px);
}

.btn-back {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-back:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.step2-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.step2-buttons .btn-back {
    flex: 0 0 140px;
}

.step2-buttons .btn-submit {
    flex: 1;
}

/* Success Message */
.buy-request-success {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.buy-request-success.active {
    display: block;
    animation: slideIn 0.4s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.buy-request-success h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.buy-request-success p {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .buy-request-modal-content {
        padding: 30px 24px;
        border-radius: 16px;
        max-height: 95vh;
    }

    .buy-request-form-step h2 {
        font-size: 24px;
    }

    .step-label {
        font-size: 11px;
    }

    .buy-request-step-line {
        width: 40px;
    }

    .step2-buttons {
        flex-direction: column;
    }

    .step2-buttons .btn-back {
        flex: 1;
        order: 2;
    }

    .step2-buttons .btn-submit {
        order: 1;
    }

    .buy-request-close {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}
