/**
 * Japan Auctions - Frontend Styles
 * Biały, czysty motyw
 */

/* Reset & Base */
.ja-auctions-wrapper,
.ja-single-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

.ja-auctions-wrapper *,
.ja-single-wrapper * {
    box-sizing: border-box;
}

/* ======================================
   FILTRY
====================================== */
.ja-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.ja-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.ja-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ja-filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ja-filter-group select,
.ja-filter-group input[type="text"] {
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 160px;
    background: #fff;
    color: #1e293b;
    transition: all 0.2s;
}

.ja-filter-group select:hover,
.ja-filter-group input:hover {
    border-color: #cbd5e1;
}

.ja-filter-group select:focus,
.ja-filter-group input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.ja-filter-search {
    flex: 1;
    min-width: 250px;
}

.ja-filter-search input {
    width: 100%;
}

.ja-filter-submit {
    display: flex;
    gap: 0.5rem;
    flex-direction: row;
    padding-top: 1.5rem;
}

/* ======================================
   PRZYCISKI
====================================== */
.ja-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ja-btn-primary {
    background: #dc2626;
    color: #fff;
}

.ja-btn-primary:hover {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-1px);
}

.ja-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.ja-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.ja-btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.ja-btn-whatsapp:hover {
    background: #1da851;
    color: #fff;
}

.ja-btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.ja-btn-large {
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
}

/* ======================================
   WYNIKI
====================================== */
.ja-results-info {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.ja-results-info strong {
    color: #0f172a;
}

/* ======================================
   SIATKA KART
====================================== */
.ja-grid {
    display: grid;
    gap: 1.5rem;
}

.ja-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.ja-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ======================================
   KARTA AUKCJI
====================================== */
.ja-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.ja-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: #dc2626;
}

.ja-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ja-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}

.ja-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ja-card:hover .ja-card-image img {
    transform: scale(1.05);
}

/* Badges */
.ja-badge {
    position: absolute;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ja-badge-site {
    top: 12px;
    left: 12px;
    background: #0f172a;
    color: #fff;
    text-transform: uppercase;
}

.ja-badge-grade {
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ja-grade-high { color: #16a34a; }
.ja-grade-medium { color: #ca8a04; }
.ja-grade-low { color: #dc2626; }

/* Card content */
.ja-card-content {
    padding: 1.25rem;
}

.ja-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.3rem 0;
    color: #0f172a;
    line-height: 1.3;
}

.ja-card-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

/* Specs grid */
.ja-card-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.ja-spec {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ja-spec-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 500;
}

.ja-spec-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

/* Card footer */
.ja-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.ja-card-price {
    display: flex;
    flex-direction: column;
}

.ja-price-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.ja-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
}

/* ======================================
   PAGINACJA
====================================== */
.ja-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.ja-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.ja-page:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.ja-page-current {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.ja-page-current:hover {
    color: #fff;
}

/* ======================================
   BRAK WYNIKÓW
====================================== */
.ja-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.ja-no-results h3 {
    color: #334155;
    margin-bottom: 0.5rem;
}

.ja-no-results p {
    color: #64748b;
}

/* ======================================
   STRONA POJEDYNCZEJ AUKCJI
====================================== */
.ja-single-wrapper {
    background: #f8fafc;
    padding: 2rem 0;
}

.ja-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Breadcrumbs */
.ja-breadcrumbs {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.ja-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
}

.ja-breadcrumbs a:hover {
    color: #dc2626;
}

.ja-sep {
    margin: 0 0.5rem;
}

.ja-current {
    color: #0f172a;
}

/* Grid */
.ja-single-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Gallery */
.ja-single-gallery {
    position: sticky;
    top: 2rem;
}

.ja-main-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ja-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ja-main-image .ja-badge-grade {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.ja-main-image .ja-badge-site {
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Details */
.ja-single-details {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ja-single-header {
    margin-bottom: 1.5rem;
}

.ja-single-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #0f172a;
}

.ja-single-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Price box */
.ja-price-box {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ja-price-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ja-price-box .ja-price-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ja-price-jpy {
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
}

.ja-price-pln {
    font-size: 1.1rem;
    color: #64748b;
}

.ja-price-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.5rem 0 0 0;
}

/* Specs grid single */
.ja-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ja-spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}

.ja-spec-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.ja-spec-item .ja-spec-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.ja-spec-item .ja-spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

/* Contact buttons */
.ja-contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Content section */
.ja-single-content {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ja-single-content h2 {
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    color: #0f172a;
}

/* Bid section */
.ja-single-bid-section {
    margin-bottom: 2rem;
}

/* Related */
.ja-related-section {
    margin-top: 3rem;
}

.ja-related-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

/* ======================================
   FORMULARZ LICYTACJI
====================================== */
.ja-bid-form-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ja-bid-form-wrapper h3 {
    font-size: 1.3rem;
    margin: 0 0 1.5rem 0;
    color: #0f172a;
}

.ja-bid-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ja-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ja-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ja-form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.ja-form-group input,
.ja-form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.ja-form-group input:focus,
.ja-form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.ja-form-consent {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.ja-form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.ja-form-consent label {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.ja-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.ja-form-message {
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.ja-form-message.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.ja-form-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ======================================
   RESPONSIVE
====================================== */
@media (max-width: 968px) {
    .ja-single-grid {
        grid-template-columns: 1fr;
    }
    
    .ja-single-gallery {
        position: static;
    }
    
    .ja-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ja-filters-form {
        flex-direction: column;
    }
    
    .ja-filter-group {
        width: 100%;
    }
    
    .ja-filter-group select,
    .ja-filter-group input {
        width: 100%;
    }
    
    .ja-grid-3,
    .ja-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .ja-form-row {
        grid-template-columns: 1fr;
    }
    
    .ja-form-actions {
        flex-direction: column;
    }
    
    .ja-contact-buttons .ja-btn {
        width: 100%;
    }
    
    .ja-single-title {
        font-size: 1.4rem;
    }
    
    .ja-price-jpy {
        font-size: 1.6rem;
    }
}
