/* =====================================
   Global
===================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #111;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    margin-top: 0;
}

/* =====================================
   Header
===================================== */

.main-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.nav a,
.header-actions a {
    margin-left: 15px;
    text-decoration: none;
    color: #111;
    font-weight: 500;
}

/* =====================================
   Header Search
===================================== */

.header-search {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-search form {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.header-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
}

.header-search button {
    padding: 8px 16px;
    border: 1px solid #ff6600;
    background: #ff6600;
    color: #fff;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
}

.header-search button:hover {
    opacity: 0.9;
}

/* =====================================
   Footer
===================================== */

.main-footer {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

/* =====================================
   Buttons
===================================== */

.primary-btn {
    background: #ff6600;
    color: #fff;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s ease;
}

.primary-btn:hover {
    opacity: 0.9;
}

.secondary-btn {
    background: #eee;
    color: #111;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}

.view-btn {
    text-decoration: none;
    background: #ff6600;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
}

.remove-btn {
    background: #eee;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 4px;
}

/* =====================================
   Forms
===================================== */

input,
select,
textarea {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

select {
    background: #fff;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

/* =====================================
   Hero
===================================== */

.hero {
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-bar input {
    width: 300px;
    border: none;
}

/* =====================================
   Shop + Products
===================================== */

.shops-section {
    padding: 60px 0;
}

.shops-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.shop-card,
.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}

.shop-card {
    padding: 20px;
}

.product-card {
    overflow: hidden;
}

.product-card:hover,
.shop-card:hover {
    transform: translateY(-4px);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card-body {
    padding: 15px;
}

.product-price {
    margin-top: 8px;
    font-weight: bold;
}

/* =====================================
   Product Page
===================================== */

.product-page {
    margin-top: 40px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.product-images img {
    width: 100%;
    border-radius: 8px;
}

.thumbnails {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.thumbnails img {
    width: 60px;
    cursor: pointer;
    border-radius: 6px;
}

.quantity-row input {
    width: 80px;
    margin-top: 10px;
}

.stock-warning {
    color: red;
    margin-top: 10px;
}

/* =====================================
   Product Info Enhancements
===================================== */

.product-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-meta {
    color: #666;
    font-size: 14px;
}

.product-price-large {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
}

.variant-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-option {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.variant-option:hover {
    border-color: #ff6600;
}

.variant-option.active {
    border-color: #ff6600;
    background: #fff5ee;
}

.variant-option.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================
   Review Form Improvements
===================================== */

.review-form-container {
    margin-bottom: 25px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.review-title {
    font-weight: 600;
    margin-top: 5px;
}

.review-content {
    margin-top: 5px;
    line-height: 1.5;
}

.review-date {
    margin-top: 8px;
    font-size: 13px;
    color: #777;
}

/* =====================================
   Related Products
===================================== */

.related-section {
    margin-top: 60px;
}

.related-section h2 {
    margin-bottom: 20px;
}

/* =====================================
   Recommendations
===================================== */

.recommendations-section {
    margin-top: 60px;
}

.recommendations-section h2 {
    margin-bottom: 20px;
}

/* =====================================
   Report Buttons
===================================== */

.report-actions {
    margin-top: 15px;
}

.report-btn {
    font-size: 13px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
}

.report-btn:hover {
    color: red;
}

/* =====================================
   Search Page Refinement
===================================== */

.search-page {
    margin-top: 40px;
}

.search-query {
    margin-bottom: 25px;
    font-style: italic;
    color: #666;
}

/* =====================================
   Wishlist Button State
===================================== */

#wishlistBtn.added {
    background: #dff5e1;
    color: #1a7f37;
}

/* =====================================
   Product Badges
===================================== */

.product-badge {
    display: inline-block;
    background: #ff6600;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-badge.out {
    background: #999;
}

/* =====================================
   Utility Spacing Helpers
===================================== */

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

/* =====================================
   Minor UI Polish
===================================== */

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255,102,0,0.15);
}

/* =====================================
   Future Seller UI Prep (Safe Add)
===================================== */

.seller-badge {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.shop-link {
    font-weight: 600;
    text-decoration: none;
    color: #111;
}

.shop-link:hover {
    text-decoration: underline;
}

/* =====================================
   Cart
===================================== */

.cart-page {
    margin-top: 40px;
}

.cart-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-summary {
    margin-top: 30px;
    text-align: right;
}

/* =====================================
   Checkout
===================================== */

.checkout-page {
    margin-top: 40px;
}

.checkout-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.checkout-total {
    margin-top: 30px;
    text-align: right;
}

#payment-form {
    margin-top: 30px;
    max-width: 500px;
}

/* =====================================
   Auth Pages
===================================== */

.auth-page {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.auth-card {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* =====================================
   Account Layout
===================================== */

.account-page {
    margin-top: 40px;
}

.account-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.account-sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.account-sidebar a {
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    color: #111;
    margin-bottom: 8px;
    font-weight: 500;
    transition: 0.2s ease;
}

.account-sidebar a:hover {
    background: #f0f0f0;
}

.account-sidebar a.active {
    background: #ff6600;
    color: #fff;
}

.account-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.account-section {
    display: none;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.profile-label {
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
}

.full-width {
    grid-column: span 2;
}

.account-message {
    margin-top: 10px;
    font-weight: 600;
}

/* Toggle Switch */

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.toggle-switch {
    position: relative;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.3s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background-color: #ff6600;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* =====================================
   Orders
===================================== */

.order-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.order-status {
    font-weight: bold;
}

.order-status.paid { color: green; }
.order-status.pending { color: orange; }
.order-status.failed { color: red; }
.order-status.refunded { color: purple; }

/* =====================================
   Reviews
===================================== */

.reviews-section {
    margin-top: 60px;
}

.review-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* =====================================
   Wishlist
===================================== */

.wishlist-page {
    margin-top: 40px;
}

.wishlist-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================
   Order Detail Page
===================================== */

.order-page {
    margin-top: 40px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-meta {
    margin-bottom: 15px;
    color: #555;
}

.order-line {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-total {
    text-align: right;
    font-size: 18px;
    margin-top: 15px;
}

/* =====================================
   Categories Page
===================================== */

.categories-page {
    margin-top: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card a {
    text-decoration: none;
    color: #111;
    display: block;
    padding: 30px;
}

.category-card-inner h3 {
    margin: 0 0 10px 0;
}

.category-card-inner p {
    color: #666;
    font-size: 14px;
}

/* =====================================
   Category Page
===================================== */

.category-page {
    margin-top: 40px;
}

.category-header {
    margin-bottom: 30px;
}

.category-meta {
    color: #666;
    margin-top: 5px;
}

/* =====================================
   Responsive
===================================== */

@media (max-width: 900px) {

    .product-layout {
        grid-template-columns: 1fr;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }
}
