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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header & Logo */
header {
    text-align: center;
    padding: 40px 20px;
}

/* Reduce spacing on order form page */
body .container > header {
    padding: 20px 20px 10px 20px;
}

.order-form {
    margin-top: 0;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
}

/* Navigation */
nav {
    margin: 10px 0 20px 0;
}

/* Order form logo */
.order-logo {
    margin-bottom: 15px;
}

.order-logo .logo {
    max-width: 150px;
    max-height: 150px;
}

.nav-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #059669;
    text-decoration: underline;
}

/* Description Section */
.description {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.description h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
}

.description p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #666;
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 40px 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Form Styles */
.order-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Slideshow Styles */
.slideshow-section {
    margin: 30px 0;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.slideshow {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide {
    min-width: 100%;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    display: flex;
    opacity: 1;
}

.slide-image-container {
    width: 100%;
    height: 400px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
}

.slide-image-placeholder {
    color: #6c757d;
    font-size: 1.1em;
    padding: 40px;
    text-align: center;
}

.slide-caption {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.slide-caption h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2em;
    color: #10b981;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    touch-action: manipulation; /* Prevents double-tap zoom */
    min-width: 44px; /* Minimum touch target size */
    min-height: 44px;
}

.slideshow-nav:hover {
    background: white;
    color: #059669;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slideshow-prev {
    left: 15px;
}

.slideshow-next {
    right: 15px;
}

.slideshow-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 0 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #10b981;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    touch-action: manipulation;
    position: relative;
}

/* Increase touch target size on mobile */
@media (max-width: 768px) {
    .indicator {
        width: 14px;
        height: 14px;
        padding: 8px;
        margin: -8px;
    }
}

.indicator:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: scale(1.2);
}

.indicator.active {
    background: #10b981;
    transform: scale(1.3);
}

.form-section {
    background: #f8f9fa;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.form-section h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid #10b981;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    -webkit-appearance: none; /* Better mobile styling */
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #10b981;
}

/* Color Swatches */
.color-swatches {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 0;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border: 3px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    background: #f8f9fa;
    position: relative;
    flex-shrink: 0;
}

.color-swatch:hover {
    border-color: #10b981;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.color-swatch.selected {
    border-color: #10b981;
    border-width: 4px;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 2px 8px rgba(16, 185, 129, 0.4);
}

.swatch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swatch-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    color: #666;
    text-align: center;
    padding: 2px;
    word-break: break-word;
}

/* Product Row */
.product-row {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    position: relative;
}

.product-row-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.product-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-row-header h3 {
    color: #333;
    font-size: 1.1em;
}

.remove-product {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
    min-height: 36px; /* Minimum touch target size */
    touch-action: manipulation;
}

.remove-product:hover {
    background: #c0392b;
}

.product-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Product Image Preview in Row */
.product-image-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 2px dashed #dee2e6;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.product-preview-img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-placeholder {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px; /* Minimum touch target size */
    touch-action: manipulation; /* Prevents double-tap zoom */
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.payment-notice {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #333;
}

.payment-notice strong {
    color: #10b981;
}

/* Message */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Product Gallery Section */
.product-gallery-section {
    margin-top: 30px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-style: italic;
}

.gallery-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-image-container {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image-placeholder {
    color: #6c757d;
    font-size: 0.9em;
    padding: 20px;
}

.gallery-info {
    padding: 15px;
}

.gallery-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.gallery-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.gallery-info strong {
    color: #333;
}

.gallery-price {
    color: #10b981;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

/* Total Price Section */
.total-price-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.total-price-box h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.total-amount {
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Thank You Page */
.thank-you-section {
    text-align: center;
    padding: 60px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.thank-you-content {
    background: #f8f9fa;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.thank-you-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-content h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
}

.thank-you-message {
    font-size: 1.2em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.thank-you-submessage {
    font-size: 1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

.thank-you-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.thank-you-actions .btn-secondary {
    background: #6c757d;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.thank-you-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.3s;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #10b981;
}

.modal-image-container {
    width: 100%;
    max-width: 800px;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
}

.modal-info {
    text-align: center;
    width: 100%;
}

.modal-info h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.modal-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 20px;
}

.modal-color-swatches .color-swatch {
    width: 80px;
    height: 80px;
    border: 3px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    background: #f8f9fa;
}

.modal-color-swatches .color-swatch:hover {
    border-color: #10b981;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.modal-color-swatches .swatch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Make images clickable */
.slide-image,
.product-preview-img,
.gallery-image {
    cursor: pointer;
    transition: opacity 0.3s;
}

.slide-image:hover,
.product-preview-img:hover,
.gallery-image:hover {
    opacity: 0.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    border-top: 1px solid #e9ecef;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    .description {
        padding: 30px 15px;
    }
    
    .description h1 {
        font-size: 2em;
    }
    
    .description p {
        font-size: 1em;
    }
    
    .logo {
        max-width: 200px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1.1em;
    }
    
    .form-section {
        padding: 20px 15px;
    }
    
    .form-section h2 {
        font-size: 1.5em;
    }
    
    .product-fields {
        grid-template-columns: 1fr;
    }
    
    .product-row {
        padding: 15px;
    }
    
    .product-row-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-row-content {
        grid-template-columns: 1fr;
    }
    
    .product-image-preview {
        min-height: 150px;
        margin-top: 15px;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .slideshow-container {
        max-width: 100%;
    }
    
    .slide-image-container {
        height: 250px;
    }
    
    .slide-caption {
        padding: 15px;
    }
    
    .slide-caption h3 {
        font-size: 1.2em;
    }
    
    .slideshow-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
    
    .slideshow-prev {
        left: 10px;
    }
    
    .slideshow-next {
        right: 10px;
    }
    
    .color-swatch {
        width: 45px;
        height: 45px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 30px;
        font-size: 1em;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .modal-content {
        max-width: 95%;
        padding: 15px;
    }
    
    .modal-image-container {
        max-height: 50vh;
    }
    
    .modal-color-swatches .color-swatch {
        width: 60px;
        height: 60px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header {
        padding: 15px 5px;
    }
    
    .description h1 {
        font-size: 1.75em;
    }
    
    .logo {
        max-width: 150px;
    }
    
    .form-section {
        padding: 15px 10px;
    }
    
    .form-section h2 {
        font-size: 1.3em;
    }
    
    .slide-image-container {
        height: 200px;
    }
    
    .slide-caption h3 {
        font-size: 1.1em;
    }
    
    .slideshow-nav {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
    }
    
    .slideshow-prev {
        left: 5px;
    }
    
    .slideshow-next {
        right: 5px;
    }
    
    .gallery-info {
        padding: 12px;
    }
    
    .gallery-info h4 {
        font-size: 1em;
    }
    
    .gallery-info p {
        font-size: 0.85em;
    }
    
    .color-swatch {
        width: 40px;
        height: 40px;
    }
    
    .total-price-section {
        padding: 15px;
    }
    
    .total-price-box h3 {
        font-size: 1.3em;
    }
    
    .total-amount {
        font-size: 2em;
    }
    
    .thank-you-content {
        padding: 30px 20px;
    }
    
    .thank-you-icon {
        width: 80px;
        height: 80px;
        font-size: 3em;
    }
    
    .thank-you-content h1 {
        font-size: 2em;
    }
    
    .thank-you-message {
        font-size: 1.1em;
    }
    
    .thank-you-actions {
        flex-direction: column;
    }
    
    .thank-you-actions .cta-button,
    .thank-you-actions .btn-secondary {
        width: 100%;
    }
    
    .modal-content {
        max-width: 98%;
        padding: 10px;
    }
    
    .modal-image-container {
        max-height: 40vh;
    }
    
    .modal-info h3 {
        font-size: 1.2em;
    }
    
    .modal-color-swatches {
        padding: 10px;
        gap: 10px;
    }
    
    .modal-color-swatches .color-swatch {
        width: 50px;
        height: 50px;
    }
}

