/* Main Stylesheet */

/* Variables */
:root {
    --primary-color: #2ac063;
    --background-color: #040414;
    --secondary-color: #1c2b3c;
    --text-color: #e9eae9;
    --muted-color: #70798d;
    --border-color: #4e5969;
    --success-color: #1c5739;
    --warning-color: #594f24;
    --container-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

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

.text-primary {
    color: var(--primary-color);
}

/* Section Titles */
.section-title {
    position: relative;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Header & Navigation */
header {
    background-color: var(--background-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--muted-color);
}

/* Main Content */
main {
    min-height: 70vh;
    padding: 2rem 0;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.product-image {
    position: relative;
    height: 180px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 150px;
    object-fit: contain;
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 600;
    margin-bottom: 1rem;
}

.select-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: block;
    text-align: center;
}

.select-btn:hover {
    background-color: #239956;
    color: white;
}

/* Single Product Page */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-details-image {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-details-image img {
    max-height: 300px;
    object-fit: contain;
}

.product-details-info h1 {
    margin-bottom: 0.5rem;
}

.product-details-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-options-form {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.option-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(42, 192, 99, 0.1);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-price {
    font-weight: 600;
}

.continue-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease;
}

.continue-btn:hover {
    background-color: #239956;
}

.product-description {
    margin-top: 3rem;
}

.product-description h2 {
    margin-bottom: 1rem;
}

.product-description ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

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

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.order-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.summary-total {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

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

.payment-method {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background-color: rgba(42, 192, 99, 0.1);
}

.payment-method img {
    height: 40px;
    margin-bottom: 0.5rem;
}

.payment-qr {
    text-align: center;
    margin: 2rem 0;
}

.payment-qr img {
    max-width: 200px;
    border-radius: 8px;
}

.payment-proof {
    margin-top: 1.5rem;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-btn {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    display: inline-block;
}

.file-name {
    margin-left: 1rem;
    font-size: 0.9rem;
}

/* Order Confirmation */
.order-confirmation {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.order-confirmation h1 {
    margin-bottom: 1rem;
}

.order-id {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.confirmation-message {
    margin-bottom: 2rem;
}

.order-details {
    text-align: left;
    margin-bottom: 2rem;
}

.continue-shopping {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

.continue-shopping:hover {
    background-color: #239956;
    color: white;
}

/* Admin Styles */
.admin-header {
    background-color: var(--secondary-color);
    padding: 1rem 0;
}

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

.admin-nav-links {
    display: flex;
    gap: 1.5rem;
}

.admin-content {
    padding: 2rem 0;
}

.admin-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.btn-danger:hover {
    background-color: #c62828;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

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

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

.admin-form input, .admin-form textarea, .admin-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 150px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 1rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(42, 192, 99, 0.2);
    border: 1px solid rgba(42, 192, 99, 0.5);
    color: #9dffcc;
}

.alert-danger {
    background-color: rgba(229, 57, 53, 0.2);
    border: 1px solid rgba(229, 57, 53, 0.5);
    color: #ffb3b3;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffe5b3;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #239956;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 100;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .product-details {
        grid-template-columns: 1fr;
    }

    .product-details-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

/* Account Page Styles */
.account-section {
    padding: 2rem 0;
}

.account-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.account-form {
    margin-top: 1.5rem;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.order-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-pending {
    background-color: #FFF9C4;
    color: #F57F17;
}

.status-processing {
    background-color: #E3F2FD;
    color: #1565C0;
}

.status-completed {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-cancelled {
    background-color: #FFEBEE;
    color: #C62828;
}

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

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

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

.admin-form input, .admin-form textarea, .admin-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 150px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 1rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(42, 192, 99, 0.2);
    border: 1px solid rgba(42, 192, 99, 0.5);
    color: #9dffcc;
}

.alert-danger {
    background-color: rgba(229, 57, 53, 0.2);
    border: 1px solid rgba(229, 57, 53, 0.5);
    color: #ffb3b3;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffe5b3;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #239956;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 100;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .product-details {
        grid-template-columns: 1fr;
    }

    .product-details-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }
}
