#prinz-order-form {
    max-width: 1000px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    color: #333;
}

#conForm {
    padding: 0;
}

.left {
    padding: 40px;
}

/* Headings */
#prinz-order-form h2 {
    font-size: 24px;
    color: #1a1a1a;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin: 40px 0 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#prinz-order-form h2:first-child {
    margin-top: 0;
}

/* Grid System */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    align-items: end;
}

.form-row-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    align-items: end;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.form-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-column label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-top: auto;
}

.form-column label strong {
    display: inline-block;
    line-height: 1.3;
    vertical-align: top;
}

/* Inputs */
#prinz-order-form input[type="text"],
#prinz-order-form input[type="email"],
#prinz-order-form input[type="number"],
#prinz-order-form select {
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px;
    transition: all 0.3s;
    background: #fff;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: block;
    line-height: 46px !important; /* Matches height minus borders */
    vertical-align: bottom;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Hide spin buttons for number inputs */
#prinz-order-form input[type="number"]::-webkit-outer-spin-button,
#prinz-order-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#prinz-order-form input[type="number"] {
    -moz-appearance: textfield;
}

/* Unit container */
.input-with-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.input-with-unit input {
    width: 100%;
}

.input-with-unit span {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
    text-align: center;
}

#prinz-order-form select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    padding-right: 40px !important;
}

#prinz-order-form textarea {
    width: 100%;
    height: 45px !important;
    padding: 12px 15px;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px;
    transition: all 0.3s;
    background: #fff;
    box-sizing: border-box !important;
    resize: vertical;
}

#paczkomat {
    position: relative;
}

#paczkomat span {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    display: block;
}

#paczkomat span a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

#paczkomat span a:hover {
    text-decoration: underline;
}

/* Autofill styles */
#prinz-order-form input:-webkit-autofill,
#prinz-order-form input:-webkit-autofill:hover,
#prinz-order-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
}

#prinz-order-form input:focus,
#prinz-order-form select:focus,
#prinz-order-form textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Product Grid */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.product {
    position: relative;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.4s ease;
}

.product .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
}

.product:hover .front {
    opacity: 0;
}

.product:hover .back {
    opacity: 1;
}

.product-qty-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.product-qty-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: none !important;
    background: #f8f9fa !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    line-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.qty-btn:hover:not(:disabled) {
    background: #e9ecef !important;
}

.qty-btn:active:not(:disabled) {
    background: #dee2e6 !important;
}

.qty-btn:disabled {
    color: #ccc !important;
    cursor: not-allowed !important;
}

.product-qty-input {
    width: 45px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 5px !important;
    text-align: center;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    line-height: 34px !important;
    background: #fff !important;
    margin: 0 !important;
}

.product-qty-input:disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed;
}

.product-price {
    font-weight: 700;
    color: #0073aa;
    font-size: 18px;
    margin-top: auto;
}

/* Custom Checkbox for Products */
.checkbox-label {
    display: block;
    height: 100%;
    cursor: pointer;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-label input:checked ~ img {
    /* No direct selector for siblings after img, so we use a wrapper class */
}

.product-wrapper.selected {
    border-color: #0073aa;
    background: rgba(0, 115, 170, 0.03);
    box-shadow: 0 0 0 2px #0073aa;
}

/* Add-ons Section */
.additional-options-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid #eee;
}

.additional-options-section > label {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    color: #1a1a1a;
}

.option-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.options-grid .option-row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    flex-direction: column;
}

.options-grid .option-row .dodatki_text {
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}

.options-grid .option-row input,
.options-grid .option-row select {
    height: 38px !important;
    min-height: 38px !important;
    line-height: 36px !important;
    font-size: 14px;
}

@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.option-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dodatki_panele, .dodatki2 {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
}

.dodatki2 label {
    display: block;
    padding: 5px 0;
    cursor: pointer;
    font-size: 14px;
}

/* Summary Section */
#summary {
    background: #1a1a1a;
    color: #fff;
    padding: 30px 40px;
    margin: 40px -40px;
}

#summary h3 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 20px;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

#summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    color: #ccc;
    gap: 20px;
}

.summary-item .item-name {
    flex: 1;
}

.summary-item .item-price {
    font-weight: 600;
    color: #fff;
}

#total-price {
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
    padding-top: 20px;
}

#price-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffcc00;
}

/* Radios and Selection */
.wyborPlatnosci, .wyborWysylki {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background: #f0f7fb;
    padding: 15px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.wyborPlatnosci label, .wyborWysylki label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

#pInfo, #wInfo {
    display: block;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #0073aa;
    background: #e7f3ff;
    padding: 12px 20px;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    width: 100%;
    box-sizing: border-box;
}

/* Submit Button */
button#submit-order {
    display: block;
    width: 100%;
    background: #e41e26;
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.2s;
    margin-top: 50px;
}

button#submit-order:hover {
    background: #c91a21;
}

button#submit-order:active {
    transform: scale(0.98);
}

button#submit-order:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.acceptance {
    margin-top: 20px;
    background: #fff4e5;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffa500;
}

.acceptance label {
    cursor: pointer;
    font-size: 14px;
}

#form-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .left {
        padding: 20px;
    }
    
    #summary {
        margin: 30px -20px;
        padding: 20px;
    }

    #total-price {
        flex-direction: column;
        gap: 10px;
    }
    
    .wyborPlatnosci, .wyborWysylki {
        flex-direction: column;
        gap: 10px;
    }

    .form-row-inline {
        grid-template-columns: 1fr;
    }
}
