/* Update h2 with Canva style and red color */
#fulfillment-calculator-form h2 { 
    font-weight: 600; 
    color: #e74c3c; /* Match calculate button red */
    text-align: center;
}

/* Update h3 with Canva style */
#fulfillment-calculator-form h3 { 
    font-size: 1.2em; 
    margin-top: 0; 
    color: #34495e; /* Softer blue for hierarchy */
    font-family: 'Poppins', sans-serif; /* Modern font */
}

/* Update p with Canva style and hyperlink */
#fulfillment-calculator-form p { 
    margin-bottom: 20px; 
    color: #7f8c8d; /* Muted gray for text */
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
#fulfillment-calculator-form p a {
    color: #3498db; /* Link color */
    text-decoration: underline;
}
#fulfillment-calculator-form p a:hover {
    color: #2980b9; /* Hover color */
}

/* Default styles for desktop (override mobile if needed) */
#fulfillment-calculator-form #fulfillment-result h3 { 
    text-align: left; 
    font-weight: bold; 
    color: #e74c3c; 
    font-size: 24px; /* Default desktop size */
}
#fulfillment-calculator-form #fulfillment-result p { 
    text-align: left !important; 
    margin-left: 0 !important; 
    font-weight: bold !important; 
}
#fulfillment-calculator-form #comments-section label { 
    font-size: 24px; /* Default desktop size */
    font-weight: bold; 
}

/* Prevent centering inheritance */
#fulfillment-calculator-form #fulfillment-result {
    text-align: left !important;
}

/* Preserve settings textarea style */
#fulfillment-calculator-settings textarea { 
    width: 100%; 
    font-family: monospace; 
    padding: 10px; 
    border-radius: 4px; 
}

/* Update calculator-canvas with Canva gradient and shadow */
.calculator-canvas { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Canva gradient */
    border-radius: 15px; /* Increased for modern look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    font-family: 'Poppins', sans-serif; /* Consistent modern font */
}

/* Preserve product-carousel structure with Canva enhancements */
#fulfillment-calculator-form .product-carousel { 
    display: flex !important; 
    flex-direction: row !important; 
    overflow-x: auto; 
    gap: 10px; 
    margin-bottom: 20px; 
    padding: 10px 0; 
}

/* Enhance product-card with Canva style */
.product-card { 
    min-width: 150px; 
    height: 150px; 
    background-size: cover; 
    background-position: center; 
    position: relative; 
    cursor: pointer; 
    transition: transform 0.3s ease, opacity 0.3s; /* Added transform for hover effect */
    border-radius: 10px; /* Rounded corners */
    overflow: hidden;
}

.product-card:hover { 
    transform: scale(1.05); /* Canva-like zoom effect */
    opacity: 0.9; /* Slight fade */
}

/* Enhance product-description with Canva style */
.product-description { 
    display: none; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: rgba(0, 0, 0, 0.7); 
    color: white; 
    padding: 5px; 
    text-align: center; 
    font-size: 12px; 
    border-radius: 0 0 10px 10px; /* Match card rounding */
}

/* Preserve product-inputs structure */
.product-inputs { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
}

/* Preserve dimension and additional rows */
.dimension-row, .additional-row { 
    display: flex; 
    gap: 20px; 
}

/* Enhance form-group with Canva style */
.form-group { 
    margin-bottom: 10px; 
    background: #ffffff; /* White background for contrast */
    padding: 10px; 
    border-radius: 10px; /* Rounded for modern look */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    flex: 1 1 calc(25% - 15px); /* Distribute width evenly, adjust gap */
    min-width: 0; /* Prevent flex items from overflowing */
}

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

.form-group input, .form-group select { 
    width: 100%; 
    max-width: 150px; /* Consistent max-width for all inputs and selects */
    padding: 8px; 
    border: 1px solid #ecf0f1; /* Lighter border */
    background: #fff; 
    border-radius: 5px; 
    font-family: 'Poppins', sans-serif; /* Consistent font */
    transition: border-color 0.3s ease; /* Smooth hover effect */
    box-sizing: border-box; /* Ensure padding doesn’t affect width */
    appearance: none; /* Remove default select styling for consistency */
    -webkit-appearance: none; /* Safari/Chrome */
    -moz-appearance: none; /* Firefox */
    background-image: none; /* Remove default dropdown arrow if needed */
    position: relative; /* For custom arrow if added later */
}

.form-group input:focus, .form-group select:focus { 
    border-color: #3498db; /* Highlight on focus */
    outline: none;
}

.form-group select {
    /* Existing properties */
    background-image: linear-gradient(45deg, transparent 50%, #34495e 50%), linear-gradient(135deg, #34495e 50%, transparent 50%);
    background-position: calc(100% - 15px) center, calc(100% - 10px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* Update result and comments section styling */
#fulfillment-calculator-form #fulfillment-result, #fulfillment-calculator-form #comments-section { 
    margin-top: 20px; 
}

/* Enhance calculate-button with Canva style */
.calculate-button { 
    padding: 10px 20px; 
    background: #e74c3c; /* Vibrant red */
    color: white; 
    border: none; 
    border-radius: 25px; /* More rounded for Canva look */
    cursor: pointer; 
    font-weight: 600; 
    transition: background 0.3s ease;
}

.calculate-button:hover { 
    background: #c0392b; /* Darker red on hover */
}

/* Enhance save-comments button with Canva style and navy blue */
button#save-comments { 
    padding: 10px 20px; 
    background: #34495e; /* Match h3 navy blue */
    color: white; 
    border: none; 
    border-radius: 20px; /* Rounded for consistency */
    cursor: pointer; 
    font-weight: 500;
}

button#save-comments:hover { 
    background: #2c3e50; /* Darker navy blue on hover */
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    .calculator-canvas { 
        padding: 10px; 
    }
    .dimension-row, .additional-row { 
        flex-direction: column; 
        gap: 10px; 
        width: 100%; 
    }
    .form-group { 
        flex: 1 1 100%; 
        max-width: 100%; 
    }
    .form-group input, .form-group select { 
        max-width: 100%; 
        width: 100%; 
    }
    #fulfillment-calculator-form .form-group#destination-group select { 
        max-width: 100% !important; 
    }
    .product-card { 
        min-width: 120px; 
        height: 120px; 
    }
    .calculate-button { 
        width: 100%; 
        margin-top: 10px; 
    }
    #fulfillment-calculator-form h2 { 
        font-size: 20px; 
    }
    #fulfillment-calculator-form h3 { 
        font-size: 16px; 
    }
    #fulfillment-calculator-form #fulfillment-result h3 { 
        font-size: 18px !important; 
    }
    #fulfillment-calculator-form #fulfillment-result p { 
        font-size: 14px; 
    }
    #fulfillment-calculator-form #comments-section label { 
        font-size: 18px !important; 
    }
}