/* Blush Unlimited E-commerce System Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.main-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.logo .logo-link {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #d63384;
    text-decoration: none;
}

.logo .logo-img {
    display: inline-block !important;
    height: 48px;
    max-height: 56px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo .logo-text {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logo .logo-img {
        height: 40px;
        max-height: 44px;
        max-width: 120px;
    }
    .logo .logo-link {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo .logo-img {
        height: 32px;
        max-height: 36px;
        max-width: 90px;
    }
    .logo .logo-link {
        font-size: 1rem;
        gap: 0.4rem;
    }
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.main-nav a:hover, .main-nav a.active {
    background-color: #f0f0f0;
    color: #d63384;
}

.tabs a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.tabs a:hover { background-color: #f0f0f0; color: #d63384; }
.tabs a.active { background-color: #d63384; color: #fff; }

.user-info {
    color: #666;
    font-size: 0.9rem;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.main-footer {
    background-color: #fff;
    border-top: 1px solid #ddd;
    padding: 1rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #d63384;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

.checkbox-label {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #d63384;
    color: #fff;
}

.btn-primary:hover {
    background-color: #b02a6b;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

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

.btn-remove {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Admin */
.admin-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #d63384;
}

.admin-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    margin-bottom: 1rem;
    color: #333;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.data-table th .sortable-header {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.data-table th .sortable-header:hover {
    text-decoration: underline;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.thumb-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    color: #999;
    font-size: 0.875rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-unpaid {
    background-color: #fff3cd;
    color: #856404;
}

.payout-summary {
    font-weight: normal;
    color: #666;
    font-size: 0.9rem;
}

/* Messages */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

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

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Dashboard */
.dashboard-container h1 {
    color: #d63384;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #d63384;
}

.stat-detail {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.dashboard-section {
    margin-top: 2rem;
}

.dashboard-section h2 {
    margin-bottom: 1rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Filters */
.filters {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Product view */
.product-view {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.product-detail {
    max-width: 900px;
}

.product-detail .product-main {
    margin-bottom: 2rem;
}

.product-detail .product-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.product-detail .product-thumb-link {
    display: block;
    flex: 0 0 auto;
    text-decoration: none;
    cursor: pointer;
}

.product-detail .product-thumbnails .product-thumb-link img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.product-detail .product-thumbnails .product-thumb-link:hover img {
    border-color: #d63384;
}

.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.product-lightbox img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.product-lightbox .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.product-lightbox .lightbox-close:hover {
    color: #d63384;
}

.product-ships {
    font-weight: 600;
    color: #d63384;
    margin: 0.25rem 0;
}

.site-wide-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.product-detail .product-buy-section {
    margin-top: 1rem;
}

.product-detail .product-buy-section form {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.product-images img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-detail .product-details h2,
.product-details h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #d63384;
}

.detail-table {
    width: 100%;
    margin-bottom: 1rem;
}

.detail-table th {
    width: 150px;
    font-weight: 600;
    padding: 0.5rem;
}

.detail-table td {
    padding: 0.5rem;
}

/* Seller/Venue rows */
.seller-row, .venue-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.seller-select, .venue-select {
    flex: 1;
}

.percentage-input, .venue-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-help {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-hint {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Product images - existing */
.existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-preview {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
}

.image-preview img {
    display: block;
    border-radius: 4px;
}

.primary-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #d63384;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.set-primary-link {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #d63384;
    text-decoration: none;
}

.set-primary-link:hover {
    text-decoration: underline;
}

/* Image dropzone */
.image-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
}

.image-dropzone:hover,
.image-dropzone.dropzone-dragover {
    border-color: #d63384;
    background: #fff5f9;
}

.dropzone-content {
    margin-bottom: 0.5rem;
}

.dropzone-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.dropzone-content p {
    margin: 0.25rem 0;
    color: #555;
}

.dropzone-content small {
    color: #888;
    font-size: 0.8rem;
}

.dropzone-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.dropzone-preview-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #e8e8e8;
    border-radius: 4px;
    font-size: 0.85rem;
}

.dropzone-preview-item .preview-order {
    background: #d63384;
    color: #fff;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
    text-align: center;
    border-radius: 50%;
    font-weight: 600;
}

.dropzone-preview-item .primary-tag {
    background: #d63384;
    color: #fff;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.dropzone-preview-item .preview-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-preview {
    background: #dc3545;
    color: #fff;
    border: none;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

.btn-remove-preview:hover {
    background: #c82333;
}

.upload-photos-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.upload-photos-form .form-group {
    margin-bottom: 0;
}

/* Checkout pages */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
}

.checkout-container h1 {
    margin-bottom: 1.5rem;
}

.checkout-shipping-page .shipping-form {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.checkout-shipping-page .shipping-options-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.checkout-shipping-page .shipping-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkout-shipping-page .shipping-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.checkout-shipping-page .shipping-option:hover {
    border-color: #d0d0d0;
    background: #fafafa;
}

.checkout-shipping-page .shipping-option:has(input:checked) {
    border-color: #d63384;
    background: #fff5f9;
}

.checkout-shipping-page .shipping-option-radio {
    flex-shrink: 0;
    padding-top: 2px;
}

.checkout-shipping-page .shipping-option-radio input {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: #d63384;
}

.checkout-shipping-page .shipping-option-details {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    flex: 1;
}

.checkout-shipping-page .shipping-option-carrier {
    font-weight: 600;
    color: #333;
}

.checkout-shipping-page .shipping-option-service {
    color: #555;
}

.checkout-shipping-page .shipping-option-price {
    font-weight: 600;
    color: #d63384;
    margin-left: auto;
}

.checkout-shipping-page .shipping-option-delivery {
    font-size: 0.9rem;
    color: #666;
    flex-basis: 100%;
}

.checkout-shipping-page .shipping-form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.checkout-shipping-page .shipping-loading {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-shipping-page .shipping-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #d63384;
    border-radius: 50%;
    animation: shipping-spin 0.8s linear infinite;
}

@keyframes shipping-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .product-view {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
    }
}
