/* =====================================================
   CART PAGE STYLES
   ===================================================== */

.cart-page {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.cart-page h1 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .cart-page h1 {
    color: #f1f5f9;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.night_mode .cart-item {
    background: #1e1e2d;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.cart-item-title a {
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
}
body.night_mode .cart-item-title a {
    color: #f1f5f9;
}

.cart-item-title a:hover {
    color: var(--primary-color, #667eea);
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color, #667eea);
    margin-bottom: 8px;
}

.cart-item-seller {
    font-size: 13px;
    color: var(--text-muted, #666);
}

.cart-item-seller a {
    color: var(--text-muted, #666);
    text-decoration: none;
}

.cart-item-seller a:hover {
    color: var(--primary-color, #667eea);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-quantity button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: var(--input-bg, #f9f9f9);
    color: var(--text-primary, #1a1a1a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}
body.night_mode .cart-quantity button {
    background: #252532;
    border-color: #2d2d3a;
    color: #f1f5f9;
}

.cart-quantity button:hover {
    background: var(--hover-bg, #f0f0f0);
}
body.night_mode .cart-quantity button:hover {
    background: #2d2d3a;
}

.cart-quantity span {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.btn-remove-cart {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-remove-cart:hover {
    background: rgba(239, 68, 68, 0.2);
}

.cart-item-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .cart-item-total {
    color: #f1f5f9;
}

/* Cart Summary */
.cart-summary {
    padding: 24px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.night_mode .cart-summary {
    background: #1e1e2d;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}
body.night_mode .cart-summary-row {
    border-bottom-color: #2d2d3a;
}

.cart-summary-row:last-of-type {
    border-bottom: none;
}

.cart-summary-row.total {
    font-size: 20px;
    font-weight: 700;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--border-color, #e5e5e5);
}
body.night_mode .cart-summary-row.total {
    border-top-color: #2d2d3a;
}

.cart-summary-row.total span:last-child {
    color: var(--primary-color, #667eea);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #667eea);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-checkout:hover {
    background: var(--primary-hover, #5a6fd6);
    transform: translateY(-2px);
}

/* Cart Empty */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
}
body.night_mode .cart-empty {
    background: #1e1e2d;
}

.cart-empty svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted, #999);
    margin-bottom: 20px;
}

.cart-empty h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .cart-empty h3 {
    color: #f1f5f9;
}

.cart-empty p {
    margin: 0 0 20px 0;
    color: var(--text-muted, #666);
}

.btn-browse-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color, #667eea);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-browse-store:hover {
    background: var(--primary-hover, #5a6fd6);
}

/* =====================================================
   CHECKOUT PAGE STYLES
   ===================================================== */

.checkout-page {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.checkout-page h1 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .checkout-page h1 {
    color: #f1f5f9;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

.checkout-section {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
body.night_mode .checkout-section {
    background: #1e1e2d;
}

.checkout-section-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .checkout-section-title {
    color: #f1f5f9;
}

/* Address Selection */
.address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.address-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
body.night_mode .address-card {
    border-color: #2d2d3a;
}

.address-card:hover {
    border-color: var(--primary-color, #667eea);
}

.address-card.selected {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

.address-card input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--primary-color, #667eea);
}

.address-card-content {
    flex: 1;
}

.address-card-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.address-card-details {
    font-size: 14px;
    color: var(--text-muted, #666);
    line-height: 1.5;
}

.btn-add-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--input-bg, #f9f9f9);
    border: 1px dashed var(--border-color, #ccc);
    border-radius: 8px;
    color: var(--text-muted, #666);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
body.night_mode .btn-add-address {
    background: #252532;
    border-color: #2d2d3a;
}

.btn-add-address:hover {
    background: var(--hover-bg, #f0f0f0);
}
body.night_mode .btn-add-address:hover {
    background: #2d2d3a;
}

/* New Address Form */
.new-address-form {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: var(--input-bg, #f9f9f9);
    border-radius: 8px;
}
body.night_mode .new-address-form {
    background: #252532;
}

.new-address-form.active {
    display: block;
}

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

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .form-group label {
    color: #f1f5f9;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: var(--card-bg, #fff);
    font-size: 14px;
}
body.night_mode .form-group input,
body.night_mode .form-group textarea {
    background: #1e1e2d;
    border-color: #2d2d3a;
    color: #f1f5f9;
}

/* Checkout Items */
.checkout-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}
body.night_mode .checkout-item {
    border-bottom-color: #2d2d3a;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.checkout-item-qty {
    font-size: 13px;
    color: var(--text-muted, #666);
}

.checkout-item-price {
    font-weight: 600;
    color: var(--primary-color, #667eea);
}

/* Payment Section */
.wallet-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
}

.wallet-balance-label {
    font-weight: 500;
}

.wallet-balance-amount {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.wallet-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    color: #f59e0b;
    font-size: 14px;
}

.wallet-warning svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Summary Sidebar */
.checkout-summary {
    position: sticky;
    top: 20px;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}
body.night_mode .checkout-total-row {
    border-bottom-color: #2d2d3a;
}

.checkout-total-row:last-of-type {
    border-bottom: none;
}

.checkout-total-row.grand-total {
    font-size: 20px;
    font-weight: 700;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--border-color, #e5e5e5);
}
body.night_mode .checkout-total-row.grand-total {
    border-top-color: #2d2d3a;
}

.checkout-total-row.grand-total span:last-child {
    color: var(--primary-color, #667eea);
}

.btn-place-order {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #667eea);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-place-order:hover:not(:disabled) {
    background: var(--primary-hover, #5a6fd6);
    transform: translateY(-2px);
}

.btn-place-order:disabled {
    background: var(--text-muted, #999);
    cursor: not-allowed;
}

/* =====================================================
   ORDERS PAGE STYLES
   ===================================================== */

.orders-page,
.my-orders-page {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.orders-page h1,
.my-orders-page h1 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .orders-page h1,
body.night_mode .my-orders-page h1 {
    color: #f1f5f9;
}

/* Orders Tabs */
.orders-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--input-bg, #f5f5f5);
    border-radius: 8px;
    overflow-x: auto;
}
body.night_mode .orders-tabs {
    background: #1e1e2d;
}

.orders-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted, #666);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.orders-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #667eea);
}

.orders-tab.active {
    background: var(--primary-color, #667eea);
    color: white;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.night_mode .order-item {
    background: #1e1e2d;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}
body.night_mode .order-item-header {
    border-bottom-color: #2d2d3a;
}

.order-id {
    font-weight: 600;
}

.order-id a {
    color: var(--primary-color, #667eea);
    text-decoration: none;
}

.order-id a:hover {
    text-decoration: underline;
}

.order-date {
    font-size: 13px;
    color: var(--text-muted, #666);
}

.order-item-content {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.order-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-product-info {
    flex: 1;
}

.order-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.order-product-title a {
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
}
body.night_mode .order-product-title a {
    color: #f1f5f9;
}

.order-product-title a:hover {
    color: var(--primary-color, #667eea);
}

.order-buyer,
.order-seller-info {
    font-size: 13px;
    color: var(--text-muted, #666);
    margin-bottom: 8px;
}

.order-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.order-qty {
    color: var(--text-muted, #666);
}

.order-earnings {
    font-weight: 600;
    color: #10b981;
}

.order-price {
    font-weight: 600;
    color: var(--primary-color, #667eea);
}

/* Seller Controls */
.order-seller-controls {
    padding: 16px;
    background: var(--input-bg, #f9f9f9);
    border-radius: 8px;
    margin-bottom: 16px;
}
body.night_mode .order-seller-controls {
    background: #252532;
}

.order-seller-controls.hidden {
    display: none;
}

.status-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: var(--card-bg, #fff);
    font-size: 14px;
    margin-right: 8px;
}
body.night_mode .status-select {
    background: #1e1e2d;
    border-color: #2d2d3a;
    color: #f1f5f9;
}

.btn-update-status {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color, #667eea);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-update-status:hover {
    background: var(--primary-hover, #5a6fd6);
}

.tracking-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tracking-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: var(--card-bg, #fff);
    font-size: 14px;
}
body.night_mode .tracking-input {
    background: #1e1e2d;
    border-color: #2d2d3a;
    color: #f1f5f9;
}

/* Order Footer */
.order-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e5e5e5);
}
body.night_mode .order-item-footer {
    border-top-color: #2d2d3a;
}

.order-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.placed {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.order-status.shipped {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-status.delivered {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.order-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-status.refunded {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.btn-view-order {
    padding: 8px 16px;
    background: var(--input-bg, #f5f5f5);
    border-radius: 6px;
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
body.night_mode .btn-view-order {
    background: #252532;
    color: #f1f5f9;
}

.btn-view-order:hover {
    background: var(--hover-bg, #e5e5e5);
}
body.night_mode .btn-view-order:hover {
    background: #2d2d3a;
}

/* Empty Orders */
.orders-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
}
body.night_mode .orders-empty {
    background: #1e1e2d;
}

.orders-empty svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted, #999);
    margin-bottom: 20px;
}

.orders-empty h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .orders-empty h3 {
    color: #f1f5f9;
}

.orders-empty p {
    margin: 0;
    color: var(--text-muted, #666);
}

/* =====================================================
   MANAGE PRODUCTS PAGE
   ===================================================== */

.manage-products-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.manage-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.manage-products-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .manage-products-header h1 {
    color: #f1f5f9;
}

/* Product Grid */
.manage-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.manage-product-item {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.night_mode .manage-product-item {
    background: #1e1e2d;
}

.manage-product-image {
    position: relative;
    aspect-ratio: 1;
}

.manage-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manage-product-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.manage-product-status.active {
    background: #10b981;
    color: white;
}

.manage-product-status.pending {
    background: #f59e0b;
    color: white;
}

.manage-product-content {
    padding: 16px;
}

.manage-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.manage-product-title a {
    color: var(--text-primary, #1a1a1a);
    text-decoration: none;
}
body.night_mode .manage-product-title a {
    color: #f1f5f9;
}

.manage-product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.manage-product-price {
    font-weight: 600;
    color: var(--primary-color, #667eea);
}

.manage-product-stock {
    color: var(--text-muted, #666);
}

.manage-product-actions {
    display: flex;
    gap: 8px;
}

.manage-product-actions a,
.manage-product-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-edit {
    background: var(--input-bg, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}
body.night_mode .btn-edit {
    background: #252532;
    color: #f1f5f9;
}

.btn-edit:hover {
    background: var(--hover-bg, #e5e5e5);
}
body.night_mode .btn-edit:hover {
    background: #2d2d3a;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* =====================================================
   CREATE/EDIT PRODUCT PAGE - Modern Design
   ===================================================== */

.create-product-container,
.edit-product-container {
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Hero Section */
.product-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: product-shimmer 3s infinite;
    pointer-events: none;
}
@keyframes product-shimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}
.product-hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.product-hero-icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
    fill: none;
}
.product-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.product-hero-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

/* Form Grid Layout */
.product-form-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}
@media (max-width: 968px) {
    .product-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Sections */
.product-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
body.night_mode .product-section {
    background: #1e1e2d;
    border-color: #2d2d3a;
}

.product-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
body.night_mode .product-section-header {
    border-bottom-color: #2d2d3a;
}
.product-section-header svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color, #667eea);
}
.product-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0;
}
body.night_mode .product-section-header h3 {
    color: #f1f5f9;
}

/* Form Fields */
.product-form-group {
    margin-bottom: 20px;
}
.product-form-group:last-child {
    margin-bottom: 0;
}
.product-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #374151);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
body.night_mode .product-form-label {
    color: #cbd5e1;
}
.product-form-label .required {
    color: #ef4444;
}

.product-input,
.product-select,
.product-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    background: var(--input-bg, #f8fafc);
    color: var(--text-primary, #1e293b);
    transition: all 0.2s ease;
}
.product-textarea {
    resize: vertical;
    min-height: 120px;
}
body.night_mode .product-input,
body.night_mode .product-select,
body.night_mode .product-textarea {
    background: #252532;
    border-color: #3d3d4a;
    color: #f1f5f9;
}
.product-input:focus,
.product-select:focus,
.product-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--card-bg, #fff);
}
body.night_mode .product-input:focus,
body.night_mode .product-select:focus,
body.night_mode .product-textarea:focus {
    background: #2d2d3a;
}
.product-input::placeholder,
.product-textarea::placeholder {
    color: #94a3b8;
}

.product-form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 6px;
}

.product-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 500px) {
    .product-form-row {
        grid-template-columns: 1fr;
    }
}

/* Images Upload */
.product-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.product-image-upload {
    aspect-ratio: 1;
    border: 2px dashed var(--border-color, #e2e8f0);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--input-bg, #f8fafc);
    position: relative;
}
body.night_mode .product-image-upload {
    background: #252532;
    border-color: #3d3d4a;
}
.product-image-upload:hover {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}
.product-image-upload svg {
    width: 32px;
    height: 32px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.product-image-upload span {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.product-image-preview {
    aspect-ratio: 1;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-image-preview .remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.product-image-preview .remove-image:hover {
    background: #ef4444;
}
.product-image-preview .remove-image svg {
    width: 16px;
    height: 16px;
}

/* Sidebar Sticky */
.product-form-sidebar {
    position: sticky;
    top: 80px;
}
@media (max-width: 968px) {
    .product-form-sidebar {
        position: static;
    }
}

/* Submit Button */
.product-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.product-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.product-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.product-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Product Alert */
.product-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
}
.product-alert.hidden {
    display: none;
}
.product-alert.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.product-alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Legacy styles for backwards compatibility */
.create-product-page,
.edit-product-page {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.product-form {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 24px;
}
body.night_mode .product-form {
    background: #1e1e2d;
}

.btn-submit-product {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #667eea);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-submit-product:hover {
    background: var(--primary-hover, #5a6fd6);
    transform: translateY(-2px);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .order-item-content {
        flex-direction: column;
    }

    .order-product-image {
        width: 100%;
        height: 150px;
    }

    .tracking-form {
        flex-direction: column;
    }

    .tracking-input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .cart-page,
    .checkout-page,
    .orders-page,
    .my-orders-page,
    .manage-products-page,
    .create-product-page,
    .edit-product-page {
        padding: 12px;
    }

    .cart-page h1,
    .checkout-page h1,
    .orders-page h1,
    .my-orders-page h1 {
        font-size: 22px;
    }

    .orders-tabs {
        gap: 4px;
    }

    .orders-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .manage-products-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .manage-products-grid {
        grid-template-columns: 1fr;
    }
}
