* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure touch-friendly sizing */
input[type="radio"],
input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
}

.header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #2c3e50;
    font-size: 24px;
    font-style: italic;
}

.logo p {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 5px;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #2c3e50;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav a:hover {
    background: #ecf0f1;
}

.breadcrumb {
    background: white;
    padding: 15px 40px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.image-preview-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #999;
    position: relative;
    overflow: hidden;
}

.preview-text {
    text-align: center;
}

.preview-text.hide {
    display: none;
}

.image-preview-section p {
    color: #555;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    margin: 5px 0;
}

.preview-image {
    max-width: 100%;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.preview-image.show {
    display: block;
}

.sidebar {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.sidebar h3 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 16px;
}

.sidebar ul {
    list-style: none;
    margin-left: 10px;
}

.sidebar li {
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.sidebar li strong {
    color: #e74c3c;
}

.main-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.page-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.order-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 16px;
}

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

label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
select,
input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
select:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

.dropdown-arrow {
    position: relative;
}

select {
    appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 15px center;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.conditional-field {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    display: none;
}

.conditional-field.active {
    display: block;
}

.cost-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.cost-row.total {
    border-top: 2px solid #2c3e50;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.file-upload-section {
    background: #f0f4f8;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.file-upload-options {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.whatsapp-wrapper {
    width: 100%;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.whatsapp-button:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-button svg {
    flex-shrink: 0;
}

.file-button {
    display: block;
    padding: 15px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    transition: background 0.3s;
}

.file-button:hover {
    background: #2980b9;
}

.file-name {
    margin-top: 10px;
    color: #27ae60;
    font-size: 14px;
}

.submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.quantity-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    flex: 1;
    padding: 10px;
    background: white;
    border: 2px solid #3498db;
    border-radius: 6px;
    color: #3498db;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #3498db;
    color: white;
}

.qty-btn.active {
    background: #3498db;
    color: white;
}

/* Tablet and Mobile Responsiveness */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        display: flex;
        flex-direction: column;
    }
    
    /* Image preview box comes first on mobile */
    .sidebar {
        display: flex;
        flex-direction: column;
        padding: 20px;
    }
    
    .image-preview-section {
        order: -2;
        margin-bottom: 20px;
    }
    
    .main-content {
        order: -1;
    }
    
    .sidebar h2,
    .sidebar h3,
    .sidebar ul {
        order: 1;
    }
    
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .breadcrumb {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .sidebar h2 {
        font-size: 18px;
    }
    
    .sidebar h3 {
        font-size: 15px;
    }
    
    .sidebar li {
        font-size: 13px;
    }
    
    .main-content {
        padding: 25px 20px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .order-subtitle {
        font-size: 14px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .file-upload-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .quantity-buttons {
        flex-direction: column;
    }
    
    .qty-btn {
        padding: 12px;
    }
    
    .cost-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .cost-row input {
        width: 100% !important;
    }
    
    .image-preview-section {
        min-height: 200px;
        padding: 15px;
    }
    
    .image-preview-section p {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 15px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .logo p {
        font-size: 10px;
    }
    
    .nav a {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .breadcrumb {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    label {
        font-size: 13px;
    }
    
    input[type="text"],
    select,
    input[type="number"] {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .submit-button {
        padding: 15px;
        font-size: 16px;
    }
    
    .file-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .cost-section {
        padding: 15px;
    }
    
    .cost-row {
        font-size: 14px;
    }
    
    .cost-row.total {
        font-size: 16px;
    }
    
    footer p:first-child {
        font-size: 20px !important;
    }
    
    footer p:last-child {
        font-size: 12px !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.modal-icon.success {
    background: #d4edda;
    color: #28a745;
}

.modal-icon.success::after {
    content: "✓";
}

.modal-icon.error {
    background: #f8d7da;
    color: #dc3545;
}

.modal-icon.error::after {
    content: "✕";
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

#orderDetails {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

#orderDetails p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 14px;
}

#orderDetails strong {
    color: #000;
}

.modal-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
