/* --- 1. RESET I PODSTAWOWA STRUKTURA --- */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #34495e; /* Ciemny, neutralny tekst */
}

main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #2c3e50;
    font-weight: 600;
}

header {
    background-color: #3498db; /* Główny kolor firmowy (niebieski) */
    color: white;
    padding: 25px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.2em;
}

header p {
    margin: 5px 0 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* --- 2. KARTY PRODUKTÓW (INDEX.PHP) --- */
.product-card {
    border: 1px solid #e0e6e8;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    transition: box-shadow 0.3s;
}

.product-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    height: 150px;
    overflow: hidden;
    margin-bottom: 15px;
    text-align: center;
}

.product-image {
    max-height: 100%;
    width: auto;
    border-radius: 4px;
}

.price {
    font-size: 1.1em;
    color: #2ecc71; /* Zielony dla ceny */
    font-weight: bold;
    margin: 10px 0;
}
.dostepnosc {
    font-size: 1.1em;
    color: #fecc01; /* Zielony dla ceny */
    font-weight: bold;
    margin: 10px 0;
}

.description-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.description-link a:hover {
    text-decoration: underline;
}

/* --- 3. KONTROLA ILOŚCI I AKCEPTACJA --- */
.quantity-input-wrapper {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-left: 10px;
}

.qty-btn {
    background-color: #ecf0f1;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.2s;
}

.qty-btn:hover {
    background-color: #bdc3c7;
}

.quantity-field {
    width: 40px;
    text-align: center;
    border: none;
    padding: 8px 0;
    -moz-appearance: textfield; /* Usuwa strzałki z Firefoksa */
}

/* Usuwa strzałki z Chrome/Safari/Edge */
.quantity-field::-webkit-outer-spin-button,
.quantity-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.acceptance-box {
    margin: 15px 0 20px 0;
    font-size: 0.9em;
}

.acceptance-box a {
    color: #3498db;
}

/* --- 4. PRZYCISK KUP TERAZ / PRZEJDŹ DO DANYCH --- */
.buy-button {
    background-color: #e67e22; /* Pomarańczowy/Czerwony dla głównej akcji */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 100%;
}

.buy-button:hover:not(:disabled) {
    background-color: #d35400;
}

.buy-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* --- 5. STOPKA I LINKI --- */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    margin-top: 30px;
}

footer a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #3498db;
}

.footer-links {
    margin-top: 10px;
}

.back-link {
    margin-top: 20px;
}

/* --- 6. STYLIZACJA PODSTAWOWYCH ELEMENTÓW CHECKOUTU I STATUSU --- */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
}

.gdpr-note {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.pay-button {
    background-color: #e74c3c; 
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 100%; 
}

.pay-button:hover {
    background-color: #c0392b;
}

.checkout-actions {
    /* Używane w checkout.php do grupowania przycisków */
    display: flex;
    justify-content: flex-end; 
    margin-top: 20px;
}

.center-text {
    text-align: center;
    font-size: 1.2em;
    padding: 50px 0;
}

.error-box {
    padding: 15px;
    border: 1px solid #e74c3c;
    background-color: #fce8e8;
    color: #e74c3c;
    border-radius: 4px;
    font-weight: bold;
}

/* Podstawowe style dla strony statusu */
.status-box-payment {
    padding: 30px;
    border-left: 5px solid #2ecc71; /* Zielony dla sukcesu */
    background-color: #e8f8f5;
    border-radius: 4px;
    text-align: center;
}
.status-box-payment h2 {
    color: #2ecc71;
    font-size: 1.8em;
    margin-top: 0;
}
.back-link-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.back-link-button:hover {
    background-color: #2980b9;
}


/* --- 7. MEDIA QUERIES (RESPONSYWNOŚĆ) --- */
@media (max-width: 768px) {
    main {
        margin: 10px;
        padding: 15px;
    }
    header h1 {
        font-size: 1.8em;
    }
}
