﻿
body {
    font-family: "Barlow", serif;
}

.container-sell {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header-sell {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
}

.title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0px !important;
    line-height: normal !important;
}

.business-hours {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.form-section {
    background: white;
    /* Updated border styling to match reference image with thick top border */
    border-top: 4px solid #333;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    border-radius: 0;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.section-header {
    margin-bottom: 25px;
}

.section-title {
    color: #333;
    margin-bottom: 8px;
}

.section-subtitle {
    color: #666;
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    /* Changed to exactly 2 columns on desktop, 1 on mobile */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-group-sell {
    display: flex;
    flex-direction: column;
}

    .form-group-sell.full-width {
        grid-column: 1 / -1;
    }

    .form-group-sell.half-width {
        width: 50%;
    }

    .form-group-sell label {
        font-weight: 500;
        margin-bottom: 2px;
        color: #333;
        font-size: 15px;
    }

    .form-group-sell input,
    .form-group-sell select,
    .form-group-sell textarea {
        padding: 12px;
        font-family: "Barlow", serif;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 15px;
        color: #000 !important;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .form-group-sell input:focus,
        .form-group-sell select:focus,
        .form-group-sell textarea:focus {
            outline: none;
            border-color: #333;
            color:#000!important;
            box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
        }

        .form-group-sell input.error,
        .form-group-sell select.error {
            border-color: #dc3545;
            box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
        }

/* Currency field specific styling */
#desiredPrice {
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #000;
    font-size: 15px;
}

    #desiredPrice:focus {
        border-color: #2c5530;
        box-shadow: 0 0 0 2px rgba(44, 85, 48, 0.1);
        background-color: #fff;
    }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

    .checkbox-group input[type='checkbox'] {
        /* margin-top: 2px; */
        height: 20px;
        width: 20px;
        transform: scale(1);
    }

    .checkbox-group label {
        font-size: 0.9rem;
        color: #000;
        line-height: 1.4;
    }

.btn-primary {
    background-color: #333;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn-primary:hover {
        background-color: #222;
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

/* Photo Upload Styles */
.photo-section {
    margin: 30px 0;
}

.photo-header {
    margin-bottom: 20px;
}

    .photo-header h3 {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 5px;
    }

    .photo-header p {
        color: #666;
        font-size: 0.9rem;
    }

.photo-container {
    display: block; /* Simple block layout for single container */
    margin-bottom: 25px;
}

/* Photo Gallery Layout */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

    .photo-gallery.drag-over {
        background-color: rgba(0, 123, 255, 0.05);
        border-radius: 12px;
        transform: scale(1.01);
    }

/* Upload Box Styles */
.upload-box {
    border: 2px dashed #ddd;
    border-radius: 12px;
    background-color: #f8f9fa;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .upload-box:hover {
        border-color: #007bff;
        background-color: #f0f8ff;
    }

    .upload-box.drag-over {
        border-color: #007bff;
        background-color: #e3f2fd;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    }

.upload-content {
    text-align: center;
    padding: 20px;
}

.upload-icon {
    width: 40px;
    height: 40px;
    color: #666;
    margin: 0 auto 12px;
}

.upload-text {
    color: #007bff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.upload-subtext {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.3;
}

/* Gallery Image Items */
.gallery-image {
    position: relative;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .gallery-image:hover {
        border-color: #007bff;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    }

    .gallery-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .gallery-image .image-controls {
        position: absolute;
        top: 10px;
        right: 10px;
        display: flex;
        gap: 8px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gallery-image:hover .image-controls {
        opacity: 1;
    }

    .gallery-image .control-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 14px;
    }

    .gallery-image .delete-btn {
        background: rgba(220, 53, 69, 0.9);
        color: white;
    }

        .gallery-image .delete-btn:hover {
            background: rgba(220, 53, 69, 1);
            transform: scale(1.1);
        }

.image-counter {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* Photo Examples Section */
.photo-examples {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

    .photo-examples h4 {
        font-size: 1.1rem;
        color: #333;
        margin-bottom: 15px;
        font-weight: 600;
    }

.example-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.example-image {
    text-align: center;
}

    .example-image img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 6px;
        border: 2px solid #e9ecef;
        background-color: #f8f9fa;
        display: block;
        transition: transform 0.2s ease;
    }

        .example-image img:hover {
            transform: scale(1.02);
            border-color: #dee2e6;
        }

    .example-image p {
        margin: 8px 0 0 0;
        font-size: 0.85rem;
        color: #666;
        font-weight: 500;
    }

/* Image preview styles */
.image-preview {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1; /* Force perfect square */
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ddd;
    background-color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .image-preview:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: #333;
        z-index: 2;
    }

    .image-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* Image placeholder styles */
.image-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1; /* Force perfect square to match image-preview */
    border-radius: 6px;
    border: 2px dashed #ccc;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

    .image-placeholder:hover {
        border-color: #007bff;
        background-color: #f0f8ff;
        transform: scale(1.02);
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    }

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Optimized for square layout */
    color: #999;
    text-align: center;
}

.placeholder-icon {
    width: 24px; /* Optimized size for square layout */
    height: 24px;
    stroke-width: 1.5;
}

.placeholder-text {
    font-size: 10px; /* Optimized for square layout */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: #666;
    text-align: center;
}

.image-placeholder:hover .placeholder-text {
    color: #007bff;
}

.image-placeholder:hover .placeholder-icon {
    color: #007bff;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 4px 8px; /* Optimized for square layout */
    transition: opacity 0.3s ease;
}

.image-size {
    color: white;
    font-size: 10px; /* Optimized for square layout */
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.delete-btn {
    position: absolute;
    top: 6px; /* Optimized for square layout */
    right: 6px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px; /* Optimized size */
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

    .delete-btn:hover {
        background: rgba(220, 53, 69, 1);
        transform: scale(1.1);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }

    .delete-btn:active {
        transform: scale(0.95);
    }

/* Alert styling */
.alert-container {
    margin: 20px 0;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifyalert {
    background-color: #f8d7da;
    color: #721c24;
    padding: 16px 20px;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.notifysuccess {
    background-color: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {

    .container-sell {
        padding: 15px;
    }

    .title {
        font-size: 2rem;
    }

    .form-section {
        padding: 20px;
    }

    .form-grid {
        /* Single column layout on mobile */
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .photo-container {
        margin-bottom: 20px;
    }

    .example-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .example-image img {
        height: 220px;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(240px, 2fr));
        gap: 15px;
    }

    .upload-box,
    .gallery-image {
        height: 180px;
    }

    .image-preview-grid {
        height: 480px; /* Increased height for tablet */
        gap: 6px;
        padding: 12px;
        grid-template-columns: repeat(3, 1fr); /* 3 columns on tablet */
        grid-template-rows: repeat(4, 1fr); /* 4 rows to accommodate 10+ images */
        overflow: hidden; /* Keep content contained on tablet */
    }

    .image-preview {
        aspect-ratio: 1; /* Maintain square on tablet */
    }

    .image-placeholder {
        aspect-ratio: 1; /* Maintain square on tablet */
    }

    .placeholder-icon {
        width: 22px;
        height: 22px;
    }

    .placeholder-text {
        font-size: 9px;
    }

    .delete-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
        top: 6px;
        right: 6px;
    }

    .image-size {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .form-section {
        padding: 15px;
    }

    .btn-primary {
        padding: 12px 20px;
    }

    .photo-container {
        margin-bottom: 15px;
    }

    .example-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .example-image img {
        height: 140px;
    }

    .example-image p {
        font-size: 0.8rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 12px;
    }

    .upload-box,
    .gallery-image {
        height: 180px;
    }

    .image-preview-grid {
        height: 560px; /* Optimized height for mobile 5 rows */
        gap: 4px;
        padding: 10px;
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        grid-template-rows: repeat(5, 1fr); /* 5 rows for 10 images */
        overflow: hidden; /* Keep content contained on mobile */
    }

    .image-preview {
        aspect-ratio: 1; /* Maintain square on mobile */
    }

    .image-placeholder {
        aspect-ratio: 1; /* Maintain square on mobile */
    }

    .placeholder-icon {
        width: 18px;
        height: 18px;
    }

    .placeholder-text {
        font-size: 8px;
    }

    .delete-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: 4px;
        right: 4px;
    }

    .image-size {
        font-size: 8px;
    }
}
