/* ========== Grundläggande layout ========== */
.checkout-main {
    background-color: #f8f9fa;
    padding: 40px 0;
    min-height: calc(100vh - 150px);
}

.checkout-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-container h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ========== Formulärstyling ========== */
.order-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
    padding-left: 15px;
}

.form-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 20px;
    width: 5px;
    background: linear-gradient(to bottom, #70a6e0, #4a89dc);
    border-radius: 3px;
}

/* ========== Produktval ========== */
.product-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .product-row {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

.product-select,
.size-select,
.quantity-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: #f9f9f9;
    color: #333;
}

.product-select:focus,
.size-select:focus,
.quantity-input:focus {
    border-color: #70a6e0;
    box-shadow: 0 0 0 3px rgba(112, 166, 224, 0.2);
    outline: none;
    background-color: white;
}

.product-select {
    flex: 2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237f8c8d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none;
}

.product-controls {
    display: flex;
    gap: 15px;
    flex: 1;
}

.quantity-input {
    max-width: 100px;
    text-align: center;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.size-select {
    flex: 1;
    min-width: 120px;
}

/* ========== Betalningssektion ========== */
.payment-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 900px) {
    .payment-section {
        grid-template-columns: 1fr 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.password-input {
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.password-input:focus {
    border-color: #70a6e0;
    box-shadow: 0 0 0 3px rgba(112, 166, 224, 0.2);
    outline: none;
    background-color: white;
}

.input-group small {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.5;
}

/* ========== Ordersammanfattning ========== */
.order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #eee;
}

.order-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.summary-item.total {
    font-weight: 600;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 1.1rem;
}

.product-total,
.order-total {
    font-weight: 600;
    color: #70a6e0;
}

/* ========== Skicka-knapp ========== */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(90deg, #70a6e0, #4a89dc);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
    width: 100%;
    max-width: 350px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(112, 166, 224, 0.25);
}

.submit-btn:hover {
    background: linear-gradient(90deg, #5d95d0, #3a76c2);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(112, 166, 224, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ========== Responsiv design ========== */
@media (max-width: 768px) {
    .checkout-container {
        padding: 0 15px;
    }

    .order-form {
        padding: 25px;
    }

    .product-controls {
        flex-direction: column;
    }

    .quantity-input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .checkout-container h1 {
        font-size: 2rem;
    }

    .form-section h2 {
        font-size: 1.3rem;
    }

    .product-select,
    .size-select,
    .quantity-input,
    .password-input {
        padding: 12px 15px;
    }
}