/* MasinaNoua.ro - Main Stylesheet */

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

:root {
    --primary: #D90429;
    --primary-dark: #BF0424;
    --dark: #1A1A1A;
    --gray: #6C757D;
    --light-gray: #F8F9FA;
    --white: #FFFFFF;
    --border: #E5E7EB;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 250px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dark);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--dark) 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* Search Widget */
.search-widget {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.btn-search {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Section */
.section {
    padding: 60px 0;
}

.section-gray {
    background: var(--light-gray);
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.listing-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.listing-link {
    text-decoration: none;
    color: inherit;
}

.listing-image {
    height: 200px;
    background: var(--light-gray);
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 14px;
}

.listing-info {
    padding: 20px;
}

.listing-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.listing-price {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
}

.listing-details, .listing-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: var(--gray);
    margin-top: 8px;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.step p {
    color: var(--gray);
}

/* Auth Pages */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Listings Page */
.listings-page {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 40px 0;
}

.filters-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.filters-sidebar h3 {
    margin-bottom: 20px;
}

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

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.filters-form .btn {
    width: 100%;
    margin-bottom: 10px;
}

.listings-main {
    padding-bottom: 40px;
}

.listings-header {
    margin-bottom: 30px;
}

.listings-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.listings-count {
    color: var(--gray);
    font-size: 18px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

/* Listing Detail */
.listing-detail {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.gallery-main {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: var(--light-gray);
}

.gallery-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    height: 80px;
}

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

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--primary);
}

.no-image-large {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--gray);
    font-size: 18px;
    border-radius: 12px;
}

.listing-content {
    padding: 0;
}

.listing-header-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.price-large {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 30px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 12px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
}

.spec-label {
    font-weight: 600;
    color: var(--gray);
}

.spec-value {
    font-weight: 700;
}

.description-section,
.seller-section {
    margin-bottom: 40px;
}

.description-section h3,
.seller-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.description-section p {
    line-height: 1.8;
    color: var(--dark);
}

.seller-info {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 12px;
}

.seller-info p {
    margin-bottom: 10px;
}

.seller-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Form Pages */
.form-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-container h1 {
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.listing-form .form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

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

.listing-form .form-section h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

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

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

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

.form-text {
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

/* Admin Panel */
.admin-panel {
    padding: 40px 0;
}

.admin-panel h1 {
    margin-bottom: 30px;
    font-size: 2.5rem;
}

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

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--gray);
    font-weight: 600;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-section h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--light-gray);
    font-weight: 700;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

.btn-delete {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.btn-delete:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

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

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

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

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

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .listings-page {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .listing-detail {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* Subscription Pages */
.subscription-page, .plans-page {
    padding: 40px 0;
}

.current-plan-box {
    background: linear-gradient(135deg, #D90429 0%, #BF0424 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.current-plan-box h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.plan-info {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 20px;
}

.plan-name {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plan-stats, .plan-expiry {
    font-size: 1rem;
}

.subscription-history {
    margin-top: 40px;
}

.subscription-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.subscription-table th,
.subscription-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.subscription-table th {
    background: var(--light-gray);
    font-weight: 700;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.plan-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    transition: transform 0.3s, border-color 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.plan-card.current-plan {
    border-color: var(--primary);
    background: #fff8f8;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.plan-name {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.plan-price {
    margin-bottom: 20px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
}

.price-period {
    font-size: 1rem;
    color: var(--gray);
}

.plan-description {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.plan-features {
    list-style: none;
    margin: 20px 0;
}

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Subscribe Page */
.subscribe-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    margin-top: 30px;
}

.plan-summary {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.plan-features-summary {
    margin-top: 20px;
}

.plan-features-summary ul {
    list-style: none;
    margin-top: 10px;
}

.plan-features-summary li {
    padding: 8px 0;
    color: var(--dark);
}

.payment-form-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.payment-instructions {
    background: #f0f8ff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #0066cc;
}

.bank-details {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.bank-details p {
    margin: 8px 0;
    font-size: 15px;
}

.payment-note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #ffc107;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Admin Payments */
.btn-approve {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin-right: 10px;
}

.btn-approve:hover {
    background: #218838;
}

.btn-reject {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

.btn-reject:hover {
    background: #c82333;
}

.btn-view {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.admin-nav {
    margin-bottom: 20px;
}

.admin-actions {
    margin-bottom: 20px;
}

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

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

.text-muted {
    color: var(--gray);
}

/* Logo Enhancement */
.logo-img {
    height: 55px;
    width: auto;
    max-width: 280px;
    transition: opacity 0.3s;
}

.logo-img:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .subscribe-layout {
        grid-template-columns: 1fr;
    }
    
    .plan-summary {
        position: static;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-img {
        height: 45px;
        max-width: 220px;
    }
}
