/* Modern Ordina CSS */
:root {
    --primary-color: #13499a;
    --primary-hover: #254a70;
    --accent-color: #FF9933;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --input-padding: 10px 12px;
    --input-border: 1px solid #ccc;
    --input-focus-border: #336699;
}

.centro-colonne {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.titolo-menu-colonneh2,
.titolo-pagina {
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Layout Grid - Vertical Stack */
.contenitore-ordine-grid {
    display: grid;
    grid-template-columns: 1fr;
}

/* 2-column layout removed for vertical stacking */

/* Card Styles */
.ordine-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-top: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ordine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.ordine-card h2,
.ordine-card .card-header {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 1.25rem;
    margin: -25px -25px 20px -25px;
    /* Pull header to edges */
    text-align: center;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ordine-card .card-header.accent {
    background-color: var(--accent-color) !important;
    color: #000 !important;
}

.ordine-card .card-header.gray {
    background-color: #E8E8E8 !important;
    color: #000 !important;
}

/* Form Elements */
/* Form Elements - Horizontal Layout */
.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group label,
.etichette1 {
    display: block;
    margin-bottom: 0;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
    min-width: 180px;
    /* Fixed width for labels */
}

/* On mobile, stack them back */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .form-group label,
    .etichette1 {
        width: 100%;
        text-align: left;
        min-width: auto;
    }
}

.form-control,
.campi1 {
    width: 100%;
    padding: var(--input-padding);
    border: var(--input-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    /* Important for width: 100% */
}

.form-control:focus,
.campi1:focus {
    border-color: var(--input-focus-border);
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 102, 153, 0.2);
}

/* Checkbox & Radios */
.radio-list,
.chek-orizzntale {
    display: block;
    width: 100%;
}

.radio-list input[type="radio"],
.radio-list input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

.radio-list label {
    font-weight: normal;
    cursor: pointer;
    margin-right: 30px;
    /* Spacing between groups */
    vertical-align: middle;
    /* Prevent separate wrapping of labels */
    display: inline-block;
}

/* Ensure no wrap on desktop for Ditta selector */
@media (min-width: 992px) {
    #RadioButtonDitta {
        white-space: nowrap;
    }
}

/* Special Sections */
.omaggio-section h2 {
    background-color: var(--accent-color) !important;
    color: #000 !important;
}

.note-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Helpers */
.asterisco {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

.d-none {
    display: none !important;
}

.w-100 {
    width: 100%;
}

.m-top-2 {
    margin-top: 1rem;
}

/* Privacy Section override */
.privacy-panel-header {
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.privacy-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

.bcompila-img {
    margin: 0 auto 20px auto;
    display: block;
    max-width: 300px;
    /* Limit size of the top SVG */
}

/* Custom Checkbox toggle for Delivery Address */
.delivery-check-wrapper {
    background: #eef2f7;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

/* Omaggio Section Layout Refinement */
.omaggio-section .form-group {
    display: flex;
    flex-direction: column;
    /* Stack children vertically */
}

.omaggio-section #LabelOmaggio {
    order: -1;
    /* Move label to top */
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.omaggio-section .divListOm {
    margin-bottom: 15px;
}

/* Stack radio buttons vertically in Omaggio section */
.omaggio-section .radio-list label,
.omaggio-section .radio-list span {
    display: block;
    margin-bottom: 8px;
    margin-right: 0;
    width: auto;
    /* Allow natural width */
}

.omaggio-section .radio-list input[type="radio"] {
    margin-right: 10px;
}

/* Table Styles for Cart */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #333;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: left;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table td.AlignRight,
.table th.AlignRight {
    text-align: right;
}

.table td.AlignCenter,
.table th.AlignCenter {
    text-align: center;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Specific Cart Styles */
.th-carrello {
    background-color: #f1f1f1;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.td-carrello {
    vertical-align: middle;
}

.sotto-carrello {
    background-color: #f9f9f9;
    font-weight: bold;
}

.money {
    font-weight: bold;
    color: var(--primary-color);
}

/* Modern Ordina CSS Updates */

/* Multi-column row for desktop */
.form-row-multi {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
}

.form-row-multi .form-group {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.form-row-multi .form-group label {
    min-width: auto;
    width: 100%;
}

/* Specific widths for CAP/City/Prov layout */
.form-row-multi .col-cap {
    flex: 0 0 100px;
    /* Fixed small width for CAP */
}

.form-row-multi .col-prov {
    flex: 0 0 120px;
    /* Fixed width for Province */
}

.form-row-multi .col-city {
    flex: 1;
    /* City takes remaining space */
}

/* Mobile: Stack everything */
@media (max-width: 768px) {
    .form-row-multi {
        flex-direction: column;
        gap: 0;
    }

    .form-row-multi .form-group {
        width: 100%;
        flex: auto;
    }
}

/* 2 Column Layout */
.form-row-2col {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
}

.form-row-2col .form-group {
    flex: 1;
    width: 50%;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

/* Specific widths for Ditta Panel */
.col-piva {
    flex: 0 0 50%;
}

.col-sdi {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row-2col {
        flex-direction: column;
        gap: 0;
    }

    .form-row-2col .form-group {
        width: 100%;
        flex: auto;
    }
}

/* Empty Cart */
.carrello-vuoto {
    text-align: center;
    padding: 40px 25px;
}

.carrello-vuoto__icon {
    margin-bottom: 20px;
}

.carrello-vuoto__titolo {
    color: #555;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.carrello-vuoto__testo {
    color: #888;
    font-size: 1rem;
    margin-bottom: 25px;
}

.carrello-vuoto__cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.carrello-vuoto__cta:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

/* Hide side columns below 1340px */
@media (max-width: 1340px) {

    #colonna_sx,
    #colonna_dx {
        display: none !important;
    }

    #centrale {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}