/**
 * Front-end CSS
 * RTL Arabic Styling
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #2c3e50;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    text-decoration: none;
    color: #fff;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    color: #ecf0f1;
}

.tier-badge {
    background-color: #f39c12;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Navigation */
.main-nav {
    background-color: #34495e;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: #2c3e50;
}

.main-nav ul li .dropdown {
    display: none;
    position: absolute;
    background-color: #34495e;
    min-width: 200px;
    z-index: 1000;
}

.main-nav ul li:hover .dropdown {
    display: block;
}

.main-nav ul li .dropdown li a {
    padding: 10px 20px;
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 40px;
}

.slider-container {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 50px;
    right: 50px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
}

.slide-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-controls button {
    background-color: rgba(255,255,255,0.8);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-controls button:hover {
    background-color: #fff;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dots span {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.slider-dots span.active {
    background-color: #fff;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 40px;
}

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

/* Categories Section */
.categories-section {
    background-color: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px;
    text-align: center;
    color: #2c3e50;
}

.category-card p {
    text-align: center;
    color: #7f8c8d;
    padding-bottom: 15px;
}

/* Auctions Section */
.auctions-section {
    background-color: #f8f9fa;
}

.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.auction-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.auction-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.auction-info {
    padding: 20px;
}

.auction-info h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.auction-info .category {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.auction-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.auction-details .price,
.auction-details .end-time {
    text-align: center;
}

.auction-details .label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.auction-details .value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.countdown {
    color: #e74c3c;
}

/* Products Section */
.products-section {
    background-color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-info .category {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
}

/* Terms Section */
.terms-section {
    background-color: #f8f9fa;
}

.terms-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

.btn i {
    margin-left: 8px;
}

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

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

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

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

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Access Denied */
.access-denied {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.denied-box {
    text-align: center;
    background-color: #fff;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.denied-box i {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.denied-box h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.denied-box p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* Auction Room */
.auction-room {
    padding: 40px 0;
}

.auction-room-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.product-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-images {
    margin-bottom: 30px;
}

.main-product-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.product-details h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.product-details .category {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 20px;
}

.product-description {
    color: #555;
    line-height: 1.8;
}

.bidding-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auction-status {
    text-align: center;
    margin-bottom: 30px;
}

.status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
}

.status-badge.active {
    background-color: #2ecc71;
    color: #fff;
}

.status-badge.concluded {
    background-color: #95a5a6;
    color: #fff;
}

.status-badge.upcoming {
    background-color: #3498db;
    color: #fff;
}

.countdown-timer {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.countdown-timer h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.timer span {
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    min-width: 60px;
}

.current-price {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.current-price h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.price-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
}

.price-display .amount {
    font-size: 3rem;
    font-weight: bold;
    color: #27ae60;
}

.price-display .currency {
    font-size: 1.5rem;
    color: #7f8c8d;
}

.bidders-count,
.tier-cap-info {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

.bidders-count span:last-child,
.tier-cap-info span:last-child {
    font-weight: bold;
    color: #2c3e50;
}

.bidding-form {
    margin-bottom: 30px;
}

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

.bidding-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.bidding-form input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
    text-align: center;
}

.bidding-form input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

.bidding-form small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.auction-ended,
.auction-upcoming {
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.auction-ended i {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 15px;
}

.auction-ended h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.auction-ended p {
    font-size: 1.3rem;
    color: #27ae60;
    font-weight: bold;
}

.recent-bids {
    margin-top: 30px;
}

.recent-bids h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.bids-list {
    max-height: 300px;
    overflow-y: auto;
}

.bid-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.bid-item .bidder {
    color: #2c3e50;
    font-weight: 500;
}

.bid-item .amount {
    color: #27ae60;
    font-weight: bold;
}

.bid-item .time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.no-bids {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #7f8c8d;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.login-footer p {
    margin-bottom: 10px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .auction-room-layout {
        grid-template-columns: 1fr;
    }
    
    .bidding-section {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav ul li .dropdown {
        position: static;
    }
    
    .slider-container {
        height: 300px;
    }
    
    .slide-content {
        bottom: 20px;
        right: 20px;
        left: 20px;
        padding: 20px;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .categories-grid,
    .auctions-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .timer {
        font-size: 1.2rem;
    }
    
    .timer span {
        min-width: 50px;
        padding: 8px 10px;
    }
    
    .price-display .amount {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .slide-content {
        display: none;
    }
    
    .auction-details {
        flex-direction: column;
        gap: 10px;
    }
}
