/* Main Body and Container Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.6;
}
.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}
main h1 {
    text-align: center;
    color: #D4AF37;
    margin-bottom: 40px;
    font-size: 2.5rem;
}
.card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}
.btn {
    display: inline-block;
    background-color: #D4AF37;
    color: #000;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid #D4AF37;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
    cursor: pointer;
}
.btn:hover {
    background-color: transparent;
    color: #D4AF37;
}

/* Header Styles */
.site-header {
    background-color: #1e1e1e;
    border-bottom: 2px solid #D4AF37;
    padding: 10px 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}
.logo img {
    height: 60px;
    width: auto;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}
.main-nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    transition: color 0.3s;
}
.main-nav a:hover {
    color: #D4AF37;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-actions a {
    color: #e0e0e0;
    text-decoration: none;
    white-space: nowrap; /* Prevent links from breaking */
}

/* Search Form Styles */
.search-form {
    display: flex;
    align-items: center;
    background-color: #2a2a2a;
    border-radius: 5px;
    border: 1px solid #444;
}
.search-input {
    background: none;
    border: none;
    color: #e0e0e0;
    padding: 8px 12px;
    outline: none;
}
.search-button {
    background: none;
    border: none;
    color: #D4AF37;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 1.2rem;
}
.search-result-info {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Dropdown Menu Styles */
.main-nav .dropdown {
    position: relative;
}
.main-nav .dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7em;
    vertical-align: middle;
}
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 100;
    list-style: none;
    padding: 10px 0;
    border: 1px solid #333;
    border-radius: 5px;
}
.main-nav .dropdown-menu a {
    padding: 10px 20px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}
.main-nav .dropdown:hover .dropdown-menu {
    display: block;
}

/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}
.product-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-card-image {
    width: 100%;
    height: 200px;
    background-color: #2a2a2a;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    flex-grow: 1;
}
.product-card .price {
    color: #D4AF37;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.product-card-footer {
    padding: 0 15px 15px;
}

/* Product Detail Page Styles */
.product-detail {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.product-detail-image {
    flex: 0 0 45%;
    max-width: 45%;
}
.product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.product-detail-info .price {
    font-size: 2rem;
    color: #D4AF37;
}
.product-detail-info .vendor a.vendor-link {
    color: #aaa;
    text-decoration: underline;
    transition: color 0.3s;
}
.product-detail-info .vendor a.vendor-link:hover {
    color: #D4AF37;
}

/* UPDATED: Vendor Social Links Styles */
.vendor-social-links {
    margin-top: -10px;
    margin-bottom: 20px;
}
.vendor-social-links .social-link {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 20px; /* Pill shape */
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    font-style: normal;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid #555;
    transition: all 0.3s;
}
.vendor-social-links .social-link:hover {
    background-color: #D4AF37;
    color: #000;
    border-color: #D4AF37;
    transform: translateY(-2px);
}

/* Cart Page Styles */
.cart-table {
    width: 100%;
}
.cart-header, .cart-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.cart-header {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}
.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #333;
}
.cart-header > div, .cart-item > div {
    padding: 0 10px;
}
.cart-item .product-col {
    flex-basis: 50%;
}
.cart-item .price-col {
    flex-basis: 15%;
    text-align: center;
}
.cart-item .quantity-col {
    flex-basis: 20%;
    text-align: center;
}
.cart-item .total-col {
    flex-basis: 15%;
    text-align: right;
}
.product-col {
    display: flex;
    align-items: center;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}
.cart-item-remove {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
}
.cart-quantity-form {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-quantity-input {
    width: 60px;
    margin-right: 10px;
}
.cart-summary {
    text-align: right;
    margin-top: 20px;
}

/* Form and Auth Page Styles */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #e0e0e0;
    box-sizing: border-box;
}
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-toggle {
    position: absolute;
    right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    color: #888;
}
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.alert-danger {
    background-color: #4d1a1a;
    color: #f8d7da;
}
.alert-success {
    background-color: #1a4d2e;
    color: #d4edda;
}

/* Checkout Page Styles */
.checkout-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.checkout-summary, .checkout-payment {
    flex: 1;
    min-width: 300px;
}
.checkout-summary .summary-item, .checkout-summary .summary-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
#card-container {
    min-height: 120px;
}

/* Account Page Styles */
.account-header {
    text-align: center;
    margin-bottom: 30px;
}
.order-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.order-history-table th, .order-history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    text-align: left;
}
.order-history-table th {
    background-color: #2a2a2a;
    color: #D4AF37;
}

/* Footer Styles */
.site-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    background-color: #1e1e1e;
    border-top: 1px solid #333;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav {
        order: 3; /* Move nav below logo and actions */
    }
    .header-actions {
        order: 2;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }
    .main-nav .dropdown-menu {
        display: contents;
    }
}
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-detail, .checkout-layout {
        flex-direction: column;
    }
    .product-detail-image, .product-detail-info {
        max-width: 100%;
    }
    .cart-header {
        display: none;
    }
    .cart-item {
        display: block;
        border: 1px solid #333;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
    }
    .cart-item > div {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #2a2a2a;
    }
     .cart-item > div:last-child {
        border-bottom: none;
    }
    .cart-item .product-col {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-item::before {
        content: attr(data-label);
        font-weight: bold;
    }
    .order-history-table thead {
        display: none;
    }
    .order-history-table, .order-history-table tbody, .order-history-table tr {
        display: block;
        width: 100%;
    }
    .order-history-table tr {
        margin-bottom: 15px;
        border: 1px solid #333;
        border-radius: 5px;
        padding: 10px;
    }
    .order-history-table td {
        display: flex;
        justify-content: space-between;
        text-align: right;
        border-bottom: 1px solid #2a2a2a;
        padding: 10px 5px;
    }
     .order-history-table tr td:last-child {
        border-bottom: none;
    }
    .order-history-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        margin-right: 20px;
    }
}
/* NEW: Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin-top: 40px;
}
.pagination a {
    color: #aaa;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #444;
    border-radius: 5px;
    transition: all 0.3s;
}
.pagination a:hover {
    background-color: #D4AF37;
    color: #000;
    border-color: #D4AF37;
}
.pagination a.active {
    background-color: #D4AF37;
    color: #000;
    border-color: #D4AF37;
    cursor: default;
}


