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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.8rem;
    font-family: "Prosto One", sans-serif;
    font-weight: 300;
}

.admin-btn {
    background: #b2ccb1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.admin-btn:hover {
    background: #9ab999;
}

/* Fixed Mobile Back Button */
.mobile-back-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-back-btn.visible {
    display: flex;
}

.mobile-back-btn:hover {
    background: #34495e;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Show mobile back button only on mobile and when not on home page */
@media (max-width: 768px) {
    .mobile-back-btn {
        display: none;
    }
    
    .items-section,
    .item-detail,
    .admin-container {
        padding-bottom: 80px;
    }
}

/* Back button icon */
.back-icon {
    font-size: 1.2rem;
}

.oxygen-light {
    font-family: "Oxygen", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.oxygen-regular {
    font-family: "Oxygen", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.oxygen-bold {
    font-family: "Oxygen", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.ubuntu-light {
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.ubuntu-regular {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.ubuntu-medium {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.ubuntu-bold {
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.ubuntu-light-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.ubuntu-regular-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.ubuntu-medium-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-style: italic;
}

.ubuntu-bold-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.prosto-one-regular {
    font-family: "Prosto One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.michroma-regular {
    font-family: "Michroma", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.gluten-<uniquifier> {
    font-family: "Gluten", cursive;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
    font-variation-settings:
    "slnt" 0;
}

.luckiest-guy-regular {
    font-family: "Luckiest Guy", cursive;
    font-weight: 400;
    font-style: normal;
}

.hero {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero-content h1 {
    font-family: "Prosto One", sans-serif;
    font-weight: 200;
    font-size: 3.75rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-content p1 {
    font-size: 0.9rem;
    opacity: 0.9;
}

.categories, .items-section, .item-detail {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.categories h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

/* Category card with image */
.category-card {
    background: white;
    border-radius: 10px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* Category image container - square ratio */
.category-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.category-card:hover .category-image-container img {
    transform: scale(1.05);
}

/* Category content area */
.category-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.category-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Category footer - centered items available text */
.category-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.category-footer small {
    text-align: center;
    width: 100%;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Item card - rectangular with square image on left */
.item-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    width: 100%;
    min-height: 150px;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.item-card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 20px;
}

/* Desktop image container - square */
.item-image-container {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block; /* Ensure image is visible */
}

.item-card:hover .item-image-container img {
    transform: scale(1.05);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.item-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
    line-height: 1.4;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
}

.location-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #3498db;
}

.date-added {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

.more-info-btn {
    background: #b2ccb1;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 10px;
    width: 120px;
}

.more-info-btn:hover {
    background: #9ab999;
}

/* Grid layout for items */
.items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}


/* Portal Styles - Add to existing style.css */
.portal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 10px 10px;
}

.portal-info {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #b2ccb1;
}

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

.stat-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #3498db;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.portal-item-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.item-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

.portal-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.expiry-warning {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.expiry-warning.expired {
    background: #f8d7da;
    border-left: 4px solid #e74c3c;
}

@media (max-width: 768px) {
    .portal-stats {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .portal-actions {
        flex-direction: column;
    }
}

/* For larger screens */
@media (min-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile square image adjustments */
@media (max-width: 768px) {
    .item-card {
        flex-direction: row;
        padding: 12px;
        gap: 15px;
        min-height: 130px;
    }
    
    .item-image-container {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .item-info {
        min-height: 100px;
        justify-content: center;
    }
    
    .item-info h3 {
        font-size: 16px;
    }
    
    .price {
        font-size: 18px;
    }
    
    .more-info-btn {
        width: 110px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* For very small mobile devices */
@media (max-width: 480px) {
    .item-card {
        gap: 12px;
        padding: 10px;
        min-height: 110px;
    }
    
    .item-image-container {
        width: 80px;
        height: 80px;
    }
    
    .item-info {
        min-height: 80px;
    }
    
    .item-info h3 {
        font-size: 15px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .more-info-btn {
        width: 100px;
        padding: 7px 10px;
        font-size: 0.8rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .item-image-container {
        width: 120px;
        height: 120px;
    }
    
    .item-info {
        min-height: 120px;
    }
}


/* Add these styles to your existing style.css file */

/* Animations for messages */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f1f1;
}

/* Button Styles for Category Management */
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Order input styling */
.order-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Sortable item hover */
.sortable-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    border-color: #b2ccb1 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sortable-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .sortable-item > div:last-child {
        margin-top: 0.5rem;
        align-self: flex-end;
    }
}

/* Add these styles to your existing style.css file */

/* Sortable List Styles */
.sortable-list {
    margin-top: 1rem;
}

.sortable-item {
    user-select: none;
}

.sortable-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    border-color: #b2ccb1 !important;
}

.sortable-item.dragging {
    opacity: 0.5;
    background: #f9f9f9 !important;
}

/* Title Search Styles */
.items-list-container {
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 1rem;
}

.title-search-item:hover {
    background: #f8f9fa;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f1f1;
}

/* Button Styles for Category Management */
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Animations for messages */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .title-search-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .title-search-item > div:first-child {
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
    
    .sortable-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .sortable-item > div:last-child {
        margin-top: 0.5rem;
        align-self: flex-end;
    }
}
/* Admin Dashboard Updates */
.submission-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submission-item.approved {
    border-left: 4px solid #27ae60;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.submission-header h4 {
    margin: 0;
    color: #2c3e50;
}

.submission-id {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #7f8c8d;
}

.submission-date {
    color: #7f8c8d;
    font-size: 14px;
    margin-left: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

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

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

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

.submission-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.submission-details p {
    margin: 5px 0;
    color: #555;
    display: flex;
    align-items: center;
}

.submission-details p strong {
    min-width: 120px;
    display: inline-block;
    color: #2c3e50;
}

.submission-images {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.submission-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.submission-images img:hover {
    transform: scale(1.1);
}

.no-images {
    color: #95a5a6;
    font-style: italic;
    font-size: 14px;
}

.submission-description {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

.submission-description p {
    margin: 0;
}

.submission-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.province-stats {
    max-height: 200px;
    overflow-y: auto;
}

.province-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.province-stat:last-child {
    border-bottom: none;
}

.province-name {
    color: #555;
}

.province-count {
    font-weight: bold;
    color: #b2ccb1;
}

.error-state {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 6px;
}

/* Button styles */
.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

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

.btn-info:hover {
    background: #2980b9;
}

/* Auto-refresh indicator */
.auto-refresh-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

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

.detail-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.email-share {
    background: #3498db;
}

.email-share:hover {
    background: #2980b9;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    width: 100%;
}

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

.dashboard-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: #b2ccb1;
    font-weight: bold;
    color: #2c3e50;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Submissions List */
.submissions-list {
    display: grid;
    gap: 20px;
}

.submission-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.submission-date {
    color: #7f8c8d;
    font-size: 14px;
}

.submission-details p {
    margin: 5px 0;
    color: #555;
}

.submission-images {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.submission-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.submission-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #b2ccb1;
    margin: 10px 0;
}

/* Image Preview */
.image-preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    min-height: 60px;
}

/* Terms Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* reCAPTCHA Styles */
.g-recaptcha {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

/* reCAPTCHA responsive */
@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* reCAPTCHA Error Message */
#recaptcha-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    text-align: center;
    font-weight: bold;
}

/* Form group spacing for reCAPTCHA */
.form-group:has(.g-recaptcha) {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

/* Form Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Styles - Updated for better appearance */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.modal-form {
    padding: 2rem;
}

.modal-form .form-group {
    margin-bottom: 1.5rem;
}

.modal-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.modal-form textarea {
    height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

/* Success Modal - Updated with stacked layout */
.success-modal {
    text-align: center;
    max-width: 500px;
}

.success-modal .modal-body {
    padding: 2rem;
}

.success-icon {
    font-size: 60px;
    color: #4CAF50;
    margin: 20px 0;
    line-height: 1;
    display: block;
}

.success-details {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.success-details h4 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
    font-size: 1.1rem;
}

.detail-item {
    margin-bottom: 12px;
    display: block;
}

.detail-label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.detail-value {
    color: #333;
    padding-left: 15px;
    font-size: 1rem;
    word-break: break-all;
}

.success-message {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: left;
}

.success-message p {
    margin-bottom: 10px;
    font-weight: 600;
}

.success-message ol {
    margin: 10px 0 0 20px;
    padding: 0;
}

.success-message li {
    margin-bottom: 8px;
    color: #555;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.success-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 6px;
}

@media (min-width: 768px) {
    .success-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .success-actions .btn {
        width: auto;
        min-width: 180px;
    }
}

/* Mobile Responsive for Checkboxes and Modals */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-form {
        padding: 1.5rem;
    }
    
    .modal-form .form-actions {
        flex-direction: column;
    }
    
    .contact-section .btn {
        width: 100%;
    }
    
    .contact-nav-btn {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .contact-content {
        padding: 1rem;
    }
    
    .modal-form {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
}

/* Contact Navigation Button */
.contact-nav-btn {
    background: white !important;
    color: #b2ccb1;
    margin-right: 10px;
}

.contact-nav-btn:hover {
    background: #82a181 !important;
    color: white;
}

/* Form validation styles */
.invalid {
    border-color: #ff3860 !important;
    background-color: #fff5f5;
}

.error-message {
    color: #ff3860;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success Modal Enhancements */
.success-modal .modal-body h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-modal .modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #7f8c8d;
    font-size: 1rem;
}

/* Form Button States */
.btn-primary {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.btn:hover {
    background: #e9ecef;
}

/* Contact Page Styles */
.contact-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

.info-section:last-of-type {
    border-bottom: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #b2ccb1 0%, #9ab999 100%);
    color: white;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(178, 204, 177, 0.3);
}

.contact-section h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.contact-section .btn {
    background: white;
    color: #667eea;
    font-size: 1.1rem;
    padding: 15px 30px;
    margin-top: 1rem;
    border: none;
    font-weight: 600;
}

.contact-section .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.step-number {
    background: #4CAF50;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.step p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.step p strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.contact-details {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-top: 2rem;
}

.contact-details h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-details p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #555;
}

.contact-details strong {
    color: #2c3e50;
    min-width: 120px;
    display: inline-block;
}

/* Ensure all back buttons have consistent styling */
.section-header .back-btn,
.detail-header .back-btn,
.search-results .back-btn,
.admin-container .back-btn {
    background: #2c3e50 !important;
    color: white;
    font-size: 1.1rem;
    padding: 12px 24px;
}

/* Specific styling for back buttons in search results */
.search-results .btn[onclick*="showSearchForm"] {
    background: #2c3e50 !important;
    color: white;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-results .btn[onclick*="showSearchForm"]:hover {
    background: #34495e !important;
}

/* Back button in standalone item detail page */
.admin-btn[onclick*="goBack"] {
    background: #2c3e50 !important;
    color: white;
    font-size: 1.1rem;
    padding: 10px 20px;
}

.admin-btn[onclick*="goBack"]:hover {
    background: #34495e !important;
}

/* Mobile responsive adjustments for back buttons */
@media (max-width: 768px) {
    .back-btn {
        font-size: 1.05rem !important;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .section-header .back-btn,
    .detail-header .back-btn {
        width: auto;
    }
}

/* Ensure consistency across all back navigation */
.btn[onclick*="Back"],
.btn[onclick*="back"],
button[onclick*="Back"],
button[onclick*="back"] {
    font-size: 1.1rem;
}

/* Specific targeting for back buttons with arrow */
button[onclick*="showCategories"],
button[onclick*="showItems"],
button[onclick*="showSearchForm"] {
    background: #2c3e50 !important;
    color: white !important;
    font-size: 1.1rem !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 5px !important;
}

button[onclick*="showCategories"]:hover,
button[onclick*="showItems"]:hover,
button[onclick*="showSearchForm"]:hover {
    background: #34495e !important;
}

/* Reference Number Search Styling */
.search-ref-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 2rem;
}

.search-ref-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.search-ref-container input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.search-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

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

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

/* Existing Images Styling */
.existing-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.existing-image-item {
    text-align: center;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 8px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
}

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

.delete-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.delete-image-btn:hover {
    opacity: 1;
    background: #c0392b;
}

.image-number {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.image-actions {
    margin-top: 15px;
    text-align: center;
}

.image-actions .btn {
    margin: 5px;
}

/* Item List Improvements */
.item-list-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.item-list-actions {
    display: flex;
    gap: 10px;
}

/* Form Button States */
.btn-primary[style*="display: none"] {
    display: none !important;
}

#updateBtn[style*="display: none"],
#deleteBtn[style*="display: none"] {
    display: none !important;
}

/* Mobile Responsive for Search */
@media (max-width: 768px) {
    .search-ref-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-ref-container .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .existing-images-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .image-preview {
        width: 100px;
        height: 100px;
    }
    
    .item-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .item-list-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* File Input Styling */
.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #3498db;
    background: #f8f9fa;
}

.form-group input[type="file"]:focus {
    border-color: #2980b9;
    outline: none;
}

/* Mobile Responsive for Image Management */
@media (max-width: 768px) {
    .existing-images-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .image-preview {
        width: 100px;
        height: 100px;
    }
    
    .item-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .item-list-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Success/Error Messages */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

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

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

/* Mobile Actions Sticky Footer */
.mobile-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 2px solid #ecf0f1;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Standalone Item Detail Page */
.admin-container .detail-content {
    margin-top: 0;
}

/* Mobile Province Select Fix */
@media (max-width: 768px) {
    .admin-form {
        padding-bottom: 80px; /* Space for sticky buttons */
    }
    
    .mobile-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px 20px;
        border-top: 2px solid #ecf0f1;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    /* Auto-close select on mobile after selection */
    select:focus {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Back button styling */
.admin-btn[onclick*="goBack"] {
    background: #95a5a6;
}

.admin-btn[onclick*="goBack"]:hover {
    background: #7f8c8d;
}

/* Location Info Styling */
.location-info {
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #3498db;
    font-size: 1.1rem;
}

.location-info strong {
    color: #2c3e50;
}

/* Location Badge Styling */
.location-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 5px 0;
    border-left: 3px solid #3498db;
}

/* Share Button Styling */
.share-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #ecf0f1;
    text-align: center;
}

.share-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 5px;
}

.share-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.email-share {
    background: #e74c3c;
}

.email-share:hover {
    background: #c0392b;
}

/* Search Results Page */
.search-results {
    margin-top: 2rem;
}

.search-results h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

/* Item Category Badge */
.item-category {
    display: inline-block;
    background: #f8f9fa;
    color: #7f8c8d;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 5px;
    border: 1px solid #e0e0e0;
}

/* Condition Badge */
.condition-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 2px;
    font-weight: bold;
}

.condition-badge.excellent { background: #d4edda; color: #155724; }
.condition-badge.good { background: #fff3cd; color: #856404; }
.condition-badge.fair { background: #ffeaa7; color: #856404; }
.condition-badge.tlc { background: #f8d7da; color: #721c24; }
.condition-badge.needs-tlc { background: #f8d7da; color: #721c24; }

/* Navbar button container */
.nav-container > div {
    display: flex;
    gap: 10px;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .nav-container > div {
        flex-direction: column;
        gap: 5px;
    }
    
    .share-actions {
        text-align: center;
    }
    
    .share-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Item Detail Section */
.section-header, .detail-header {
    margin-bottom: 2rem;
}

.section-header h2, .detail-header h2 {
    margin-top: 1rem;
    text-align: center;
    color: #2c3e50;
}

.back-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #7f8c8d;
}

.detail-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Detail Images - 1:1 Square ratio */
.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.detail-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fa;
}

.detail-image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.detail-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Stack all elements vertically in detail page */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-info h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.detail-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

.condition {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    margin: 0;
    width: fit-content;
    font-size: 1.1rem;
}

.condition.excellent { background: #d4edda; color: #155724; }
.condition.good { background: #fff3cd; color: #856404; }
.condition.fair { background: #ffeaa7; color: #856404; }
.condition.tlc { background: #f8d7da; color: #721c24; }

.description {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin: 0;
}

.description h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.description p {
    margin: 0;
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 0;
    border-left: 4px solid #3498db;
}

.contact-info h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.contact-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.ref-number {
    padding: 1rem;
    background: #2c3e50;
    color: white;
    border-radius: 5px;
    text-align: center;
    font-family: 'Courier New', monospace;
    margin: 0;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}

/* Image Zoom Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal .modal-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.image-modal .modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
}

.image-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-modal .close-modal:hover {
    background: rgba(231, 76, 60, 0.9);
    transform: scale(1.1);
}

.image-modal .modal-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1001;
}

.image-modal .prev-btn,
.image-modal .next-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.image-modal .prev-btn:hover,
.image-modal .next-btn:hover {
    background: rgba(52, 152, 219, 0.9);
    transform: scale(1.1);
}

.image-modal .image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Search Page Specific Styles */
.search-result {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1rem;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.search-result:hover {
    transform: translateY(-2px);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #e74c3c;
}

.error-message h3 {
    margin-top: 0;
    color: #721c24;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    border-left: 4px solid #27ae60;
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Search history items */
.item-list-item {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.item-list-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* Search input styling */
#searchRef {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}

/* Recent searches section */
#recentSearches {
    border-top: 2px solid #ecf0f1;
    padding-top: 2rem;
}

#recentSearches h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-family: "Prosto One", sans-serif;
        font-weight: 300;
        font-size: 3.25rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .detail-images {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .modal-nav {
        padding: 0 10px;
    }
    
    .prev-btn, .next-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .search-result {
        padding: 1.5rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .detail-images {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .detail-content {
        padding: 1rem;
    }
    
    .detail-info h3 {
        font-size: 1.3rem;
    }
    
    .detail-price {
        font-size: 1.3rem;
    }
    
    .admin-container {
        padding: 0 10px;
    }
    
    .admin-form {
        padding: 1.5rem;
    }
}

/* Admin Styles */
.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-info {
    background: white;
    color: #9b59b6;
}

.btn-info:hover {
    background: #8e44ad;
}

.items-list {
    margin-top: 2rem;
}

.item-list-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.item-list-actions {
    display: flex;
    gap: 10px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 33% { content: '.'; }
    34%, 66% { content: '..'; }
    67%, 100% { content: '...'; }
}

/* Error states */
.error {
    border-color: #e74c3c !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.success {
    border-color: #27ae60 !important;
}

.success-message {
    color: #27ae60;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Ensure all images maintain aspect ratio */
.detail-images img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Section headers for detail view */
.section-header, .detail-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header h2, .detail-header h2 {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Print styles */
@media print {
    .navbar, .admin-btn, .item-list-actions, .quick-actions,
    .back-btn, .more-info-btn, .form-actions {
        display: none !important;
    }
    
    .search-result {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .detail-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Focus styles for accessibility */
button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* New Agent Page Styles */
.commission-table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.commission-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.commission-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 3px solid #b2ccb1;
}

.commission-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.commission-table tr:nth-child(even) {
    background: #f8f9fa;
}

.commission-table tr:hover {
    background: #e8f4e8;
}

.commission-notes {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #3498db;
}

.commission-notes ul {
    margin: 1rem 0 0 1.5rem;
}

.commission-notes li {
    margin-bottom: 0.5rem;
    color: #555;
}

.requirements-grid,
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

.requirement-card,
.benefit-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 4px solid #b2ccb1;
}

.requirement-card h4,
.benefit-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.requirement-card ul,
.benefit-card ul {
    margin-left: 1.2rem;
}

.requirement-card li,
.benefit-card li {
    margin-bottom: 0.5rem;
    color: #555;
}

.benefit-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.benefit-card h4 {
    color: #27ae60;
    font-size: 1.2rem;
}

/* Agent Form Styles */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

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

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b2ccb1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-note {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.terms-content {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.terms-content h4 {
    color: #2c3e50;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.terms-content p {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

.terms-actions {
    margin-top: 2rem;
    text-align: center;
}

.age-display {
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .requirements-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-table th,
    .commission-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .terms-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .commission-table {
        font-size: 0.8rem;
    }
}