/* Digital Product Sales System - Responsive Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar, .admin-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container, .admin-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a:not(.btn) {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.nav-menu a:not(.btn):hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-disabled {
    background: #9ca3af;
    color: white;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.category-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 280px;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.category-box h3 {
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-box .no-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #f3f4f6;
    flex-shrink: 0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.product-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-box .no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #f3f4f6;
    flex-shrink: 0;
}

.product-box h3 {
    padding: 12px 12px 8px;
    font-size: 1rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-box .price {
    padding: 0 12px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.product-box .stock {
    padding: 8px 12px 12px;
    font-size: 0.85rem;
    color: #666;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
}

.product-detail-image .no-image-large {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    background: #f3f4f6;
    border-radius: 8px;
}

.product-detail-info h1 {
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.product-description {
    margin: 20px 0;
    color: #666;
    line-height: 1.8;
}

.product-info-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

.price-large {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.stock-available {
    color: #10b981;
    font-weight: 500;
}

.stock-unavailable {
    color: #ef4444;
    font-weight: 500;
}

/* Checkout */
.checkout-form, .checkout-success {
    max-width: 600px;
    margin: 30px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-summary {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.checkout-success {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

.payment-instructions h2, .payment-instructions h3 {
    margin: 30px 0 15px;
}

.info-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 2;
}

.iban {
    font-family: monospace;
    font-weight: bold;
    color: #667eea;
}

.payment-code {
    font-size: 2rem;
    font-weight: bold;
    background: #fef3c7;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: monospace;
    letter-spacing: 2px;
}

.steps ol {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.steps li {
    margin: 10px 0;
}

/* Page Title */
.page-title {
    margin: 30px 0;
    font-size: 2rem;
    color: #333;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover, .menu-item.active {
    background: #f3f4f6;
    color: #667eea;
}

.menu-item.active {
    border-left: 3px solid #667eea;
}

.menu-item .badge {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: auto;
}

.admin-content {
    flex: 1;
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

/* Quick Actions */
.quick-actions {
    margin: 40px 0;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    color: #667eea;
}

/* Card */
.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card h2 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th {
    background: #f9fafb;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tr:hover {
    background: #f9fafb;
}

.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-grid, .product-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar .container, .admin-navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .nav-menu a, .nav-menu span {
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: nowrap;
    }
    
    .nav-menu span {
        display: none;
    }
    
    .category-grid, .product-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .category-box, .product-box {
        height: auto;
    }
    
    .category-box img, .category-box .no-image {
        height: 250px;
    }
    
    .product-box img, .product-box .no-image {
        height: 220px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-form, .checkout-success {
        padding: 20px;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th, .data-table td {
        padding: 10px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Navbar Container */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-greeting {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.btn-logout-top {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 59, 48, 0.2);
    border: 2px solid rgba(255, 59, 48, 0.4);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-logout-top:hover {
    background: rgba(255, 59, 48, 0.35);
    border-color: rgba(255, 59, 48, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .user-greeting {
        display: none;
    }
}

@media (max-width: 640px) {
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .btn-logout-top {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
}

/* Payment Method Selection */
.payment-method-selection {
    margin: 30px 0;
}

.payment-method-selection h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-card {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.payment-option input[type="radio"]:checked + .payment-card {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.payment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.payment-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.payment-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.payment-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.payment-balance {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
    margin-top: 10px;
}

.balance-info {
    margin-top: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    text-align: center;
}

.product-data-box {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
}

.product-data-box h3 {
    color: #10b981;
    margin-bottom: 15px;
}

.stock-data {
    background: white;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.balance-card h2 {
    color: white !important;
}

.balance-display {
    text-align: center;
    padding: 20px 0;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.balance-note {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
}
    
    .admin-content {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .payment-code {
        font-size: 1.5rem;
        padding: 15px;
    }
    
    .category-grid, .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-menu {
        gap: 5px;
    }
    
    .nav-menu a, .nav-menu .btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .mobile-menu-content {
        width: 80%;
        max-width: 280px;
    }
}

