

:root {
    --primary: hsl(16, 90%, 55%);
    --primary-dark: hsl(16, 90%, 45%);
    --secondary: hsl(174, 62%, 47%);
    --background: hsl(0, 0%, 98%);
    --foreground: hsl(222, 47%, 11%);
    --card: hsl(0, 0%, 100%);
    --border: hsl(214, 32%, 91%);
    --muted: hsl(210, 40%, 96%);
    --muted-foreground: hsl(215, 16%, 47%);
    --success: hsl(142, 71%, 45%);
    --warning: hsl(38, 92%, 50%);
    --destructive: hsl(0, 84%, 60%);
}

body {
  background-color: var(--bg);
  color: var(--accent);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

/* LOADER OVERLAY */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-overlay.active {
  display: flex;
}

/* SPINNER */
.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-top: 3px solid var(--primary);
  border-right: 3px solid transparent;
  animation: rotation-2 1s linear infinite;
}

@keyframes rotation-2 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#logoutBtn{
    color: black;
}



.sell-toggle-menu{
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

.brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary);
}



/* ------------------ 3. CONTENT PANE VISIBILITY ------------------ */

/* Hides all content panes by default */
.tab-pane {
  display: none;
}

/* Shows only the active content pane */
.tab-pane.active {
  display: block;
}




/* ===============================
   JUMIA STYLE SIDEBAR
================================= */

.side-main-bar {
  display: flex;
  min-height: 100vh;
}

/* Sidebar container */
.sidebar {
  width: 240px;
  background: #f5f5f5;
  padding: 20px 0;
  border-right: 1px solid #e5e5e5;
}

/* Remove old expanded behavior */
.sidebar.expanded {
  width: 240px;
}

/* Sidebar list */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Sidebar items */
.sidebar li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  color: #333;
  font-size: 15px;
  transition: background 0.2s ease;
}

/* Icon */
.sidebar li i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  color: var(--primary);
}

/* Hover effect */
.sidebar li:hover {
  background: #e9e9e9;
}

/* Active item */
.sidebar li.active {
  background: #dcdcdc;
  font-weight: 600;
  color: #000;
}

/* Remove tooltip text behavior */
.sidebar .text {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: none;
  padding: 0;
  box-shadow: none;
}

/* Content area */
.sd-content {
  flex-grow: 1;
  padding: 30px;
  background: #fff;
}

.mobile-only {
    display: none;
}


/* ===============================
   MOBILE VIEW - TRANSFORM TO MENU LIST
   =============================== */

@media screen and (max-width: 768px) {
    /* Hide the regular sidebar on mobile */
    .sidebar {
        display: none;
    }
    
    /* Transform the side-main-bar for mobile */
    .side-main-bar {
        display: block;
        min-height: auto;
    }
    
    /* Create mobile menu from your existing tabs */
    .sd-content {
        padding: 15px;
    }
    
    /* Hide all tab panes initially */
    .tab-pane {
        display: none;
    }
    
    /* Show active tab */
    .tab-pane.active {
        display: block;
    }
    
    /* Create mobile menu container */
    .mobile-menu-container {
        display: block;
        background: white;
        border-radius: 10px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Mobile menu header */
    .mobile-menu-header {
        padding: 15px;
        font-weight: 600;
        font-size: 16px;
        color: #333;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Mobile menu list */
    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    /* Mobile menu items */
    .mobile-menu-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 15px;
        border-bottom: 1px solid #f5f5f5;
        cursor: pointer;
        transition: background 0.2s;
    }
    
    .mobile-menu-item:active {
        background: #f8f8f8;
    }
    
    /* Left side with icon and text */
    .mobile-menu-item-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-menu-item-left i {
        font-size: 18px;
        color: var(--primary); /* Your primary color */
        width: 24px;
    }
    
    .mobile-menu-item-left span {
        font-size: 15px;
        color: #333;
    }
    
    /* Right chevron icon */
    .mobile-menu-item-right {
        color: #999;
        font-size: 1.4rem;
        font-weight: 600;
    }
    
    /* Special section for Recently Viewed */
    .mobile-recent-section {
        margin-top: 20px;
        background: white;
        border-radius: 10px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .mobile-recent-title {
        font-size: 14px;
        color: #666;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-recent-items {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    
    
    
    
    /* Timestamp */
    .mobile-timestamp {
        text-align: right;
        margin-top: 15px;
        font-size: 12px;
        color: #999;
    }
    
    /* Hide desktop content sections on mobile initially */
    .desktop-content {
        display: none;
    }
    
    /* Show content when a menu item is clicked */
    .mobile-content.active {
        display: block;
    }
    
    /* Back button for mobile content */
    .mobile-back-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 15px;
        background: white;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        font-weight: 500;
    }
    
    .mobile-back-btn i {
        font-size: 16px;
        color: var(--primary); 
    }

    .mobile-only {
        display: block;
    }

    .mobile-item-nav {
        color: #999;
        font-size: 1.4rem;
        font-weight: 600;
    }
}






/* ------------------ 4. ADDITIONAL STYLES ------------------ */
/* FORM CARD STYLE */
.form-card {
    background: var(--card);
    border: 1.5px solid #ddd;
    padding: 25px;
    border-radius: 10px;
    max-width: 600px;
}

.sd-content.form-card label {
    display: block;
    margin-top: 15px;
}

.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc !important;
    margin-top: 5px;
    font-size: 15px !important;
}



.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  border: 1px solid var(--primary) !important;
  box-shadow: 0 0 0.8px var(--primary) !important;
  outline: none !important;
}



.form-card h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}


/* FILE INPUT CUSTOMIZATION */

.file-upload {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  display: block;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-upload:hover {
  border-color: var(--primary);
  background: hsl(22, 45%, 95%);
}

/* Hide the default file input */
.file-upload input[type="file"] {
  display: none;
}


/* Preview image styling */
#imagePreview,
#imagePreviewContainer,
#flashsaleImagePreview,
#SecondhandImagePreview{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#imagePreview img,
#imagePreviewContainer img,
#flashsaleImagePreview img,
#SecondhandImagePreview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}








.form-card {
    background: var(--card);
    border: 1.5px solid #ddd;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
}

.form-card label {
    font-weight: 500;
    margin-top: 20px;
    display: block;
}

.delete-button{
    color: red;
}







.product-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}



.products-layout-box {
    border: 1px solid #ddd;
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    gap: 20px;
}

.top-bar-ads {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
}
.form-actions{
    margin-top: 20px;
    display: flex;
    gap: 20px;
}



/* pagination */

/* =========================================
   PAGINATION STYLES - Seller Dashboard Specific
   ========================================= */

/* Main pagination container - scoped to seller area */
.seller-pagination {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
}

/* Button wrapper */
.seller-pagination-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

/* Base button style */
.seller-pagination-btn {
    padding: 0.5rem 1rem;
    min-width: 2.5rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none;
    text-decoration: none;
}

/* Hover state - using !important to ensure override */
.seller-pagination-btn:hover:not(:disabled) {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}

/* Active/current page button */
.seller-pagination-btn.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Disabled state */
.seller-pagination-btn:disabled,
.seller-pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--muted);
    border-color: var(--border);
}

/* Previous/Next specific styling (optional) */
.seller-pagination-btn.prev-btn,
.seller-pagination-btn.next-btn {
    padding: 0.5rem 1.2rem;
}

/* Ellipsis between page numbers */
.seller-pagination-ellipsis {
    padding: 0.5rem;
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Page info text */
.seller-pagination-info {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .seller-pagination-btn {
        padding: 0.5rem 0.75rem;
        min-width: 2rem;
        font-size: 0.8rem;
    }
    
    .seller-pagination-wrapper {
        gap: 0.3rem;
    }
    
    .seller-pagination-info {
        font-size: 0.8rem;
    }
}

/* Optional: Add a subtle divider above pagination */
.seller-pagination-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 1rem 0;
}
/* Loading and error states */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--muted-foreground);
    font-size: 1rem;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 2rem;
    height: 2rem;
    margin: 1rem auto;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: var(--destructive);
    background: rgba(244, 67, 54, 0.1);
    border-radius: 0.5rem;
    font-size: 1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        min-width: 2rem;
        font-size: 0.8rem;
    }
    
    .pagination-wrapper {
        gap: 0.3rem;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
}


@media (max-width: 768px) {

  .form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    background: #fff;
    padding: 12px 15px;

    display: flex;
    gap: 10px;
    justify-content: space-between;

    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .form-actions .btn {
    flex: 1;
  }

  /* Prevent content from being hidden behind sticky buttons */
  body {
    padding-bottom: 90px;
  }

  .form-card {
    padding: 15px;
  }
  .form-card label {
    margin-top: 15px;
  }

  .hidden-ui {
  display: none !important;
}
}





/* Main button style */
.sd-content .btn.primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;

    /* Glow pulse animation */
    animation: pulseGlow 2s infinite;

}

.sd-content .btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #fff;
}

/* Cancel button style */
.btn.small {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #eee;
    font-size: 14px;
    cursor: pointer;
}

.btn.small:hover {
    background: #ddd;
}








/* PRODUCT PAGE STYLING */

/* The filter categories section */

.product-category{
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
    height: 43px;

}

/* The bar with title and buttons */

.top-row{
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;

}

/* The grid displaying products */

/* Container for each product card */
.product-card,
.flashsale-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    margin: 10px;
    display: flex;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;

    justify-content: space-between;
    align-items: center;
}

.product-card:hover,
.flashsale-card:hover {
    transform: scale(1.01);
}

.rating {
    color: var(--primary);
}

/* Image container */
.product-image-container {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
}

/* Product image */
.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* designing the product texts */


.product-actions button {
    padding: 6px 10px;
    margin-right: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-top: 10px;
}


.product-name-sellers {
  font-size: 1.3rem;
  font-weight: 600;
}

.price {
  font-weight: 600;
}

.stock {
  color: #6b7280;
  font-size: .9rem;
}



.product-name-seller{
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--foreground);
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
}



/*  DESIGNING THE TOP LISTING CARD*/
.listing-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    margin: 10px;
    display: flex;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    justify-content: space-between;
    align-items: center;
}



.listing-card:hover {
    transform: scale(1.03);
}

/* Image container */
.listing-image-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--primary);
    flex-shrink: 0; /* ensures it keeps its size */
}

/* LISTING IMAGE */
.listing-image-container img {
    width: 50%;
    height: 50%;
    object-fit: cover;
}

/* designing THE LISTING TEXT */

.listing-card h3{
    font-size: 15px;
}


.listing-actions button {
    padding: 6px 10px;
    margin-right: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary);
    color: #fff;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-top: 10px;
}








/* DESIGNING ADS */
.ad-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    margin: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.ad-card:hover {
    transform: scale(1.03);
}


/* Image */
.ad-image-container {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    flex-shrink: 0;
}

.ad-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Inline text */
.ad-text-inline {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    font-size: 14px;
    color: #333;
}

.ad-text-inline span {
    white-space: nowrap;
}

/* Actions */
.ad-actions {
    display: flex;
    gap: 8px;
}
.ad-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary);
    color: #fff;
    font-size: 14px;
    transition: background-color 0.2s;
}



/* RESPONSIVE SIDEBAR FOR MOBILE */


/* Shrink seller dashboard product images */
.seller-product-img {
    width: 40px;  /* reduce from default */
    height: 40px;
    object-fit: cover;
    border-radius: 50%; /* optional circular style */
    border: 1.5px solid var(--primary); /* optional */
}


/* =========================
   Service Cards & Images
   ========================= */
.service-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 300px;
    display: inline-block;
    vertical-align: top;
}

.service-card img.service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Service Actions */
.service-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.service-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    transition: background-color 0.2s;
}

.service-actions button:hover {
    background-color: #0056b3;
}

/* =========================
   Service Image Previews
   ========================= */
.service-image-wrapper {
    display: inline-block;
    margin-right: 10px;
    position: relative;
    text-align: center;
}

.service-image-wrapper img.service-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.service-image-wrapper button {
    display: block;
    margin-top: 5px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
}

/* Primary image styling */
.service-image-wrapper[data-primary="true"] img {
    border: 3px solid #28a745; /* Green border for primary image */
}

.service-image-wrapper[data-primary="true"] button {
    background-color: #28a745;
    color: white;
}






/* ================================
   SELLER DASHBOARD – ORDERS CSS
================================ */

/* ===== Container ===== */
#seller-orders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* ===== Order Card ===== */
.order-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 14px;
  color: #64748b;
}

.order-card p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  color: #555;
}

/* ===== Status Labels ===== */
.status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  
  margin-left: 0.3rem;
}

.status.red {
  color: #f44336;
}

.status.green {
  color: #4caf50;
}

.status.orange {
  color: #ff9800;
}

.label-order{
  color: #64748b;
  font-weight: 500;
}

/* ===== Action Buttons ===== */


.order-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.order-actions button:hover {
  opacity: 0.9;
}

.order-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-actions button:nth-child(1) { background-color: var(--primary); color: #fff; }
.order-actions button:nth-child(2) { background-color: #f44336; color: #fff; }


/* ===== Modal ===== */
#order-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background-color: #fff;
  margin: 2rem auto;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #222;
}

.modal-content p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #555;
}

.modal-content ul {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
}

.modal-content li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-actions button {
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.modal-actions button:nth-child(1) { background-color: #eee; 
  color: #000000; } /* Close */
.modal-actions button:nth-child(2) { background-color: var(--primary); color: #fff; } /* Update Status */
.modal-actions button:nth-child(3) { background-color: #f44336; color: #fff; } /* Refund */

.close {
  float: right;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
}

/* ===== Dropdown ===== */
#status-select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}


/* Layout & Spacing */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

label {
  display: block;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  color: #888;
  margin-bottom: 0.4rem;
}

/* Items List Section */
.items-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #eee;
}

.items-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.items-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  font-size: 1.1rem;
  border-top: 2px solid #fff;
}

/* Notes */
.notes-section {
  margin-bottom: 1rem;
}

.notes-text {
  background: #fff9e6;
  padding: 8px;
  border-radius: 4px;
  font-style: italic;
  font-size: 0.9rem;
}

/* Existing Button Fixes */
.copy-btn {
  margin-left: 10px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .order-card {
    padding: 0.8rem 1rem;
  }
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  .order-actions {
    flex-direction: column;
  }
  .modal-actions {
    flex-direction: column;
  }
}





.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-id-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #555;
}

.modal-section {
  background: #fafafa;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.modal-section h4 {
  margin-top: 0;
  font-size: 0.95rem;
  color: #1976d2;
}

.items-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.items-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.modal-content {
  border-top: 4px solid #1976d2;
}




/* Flash Sale List Container */
#flashsaleItemsGrid {
    display: flex;
    flex-direction: column; /* vertical list */
    margin-top: 20px;
}

/* Each flash sale item card  designed together with product cards */

#flashsaleItemForm.active-form {
    display: block !important;
}


/* Preview images */
.service-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* Update your variant row to handle the 6 elements better */
.variant-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px; /* Space between variant blocks */
}

/* Ensure the inputs don't collapse */
.variant-row input {
    width: 100%;
    box-sizing: border-box;
}

/* Make the SKU and Remove Button span both columns */
.variant-row .variant-sku,
.variant-row .remove-variant {
    grid-column: span 2;
}


@media (max-width: 768px) {
  .desktop-only{
    display: none;
  }
  .product-card p,
  .flashsale-card p{
    font-size: 14px;
  }
  .product-name-seller{
    font-size: 1.05rem;
  }

  .toplisting,
  .service-header{
    font-size: 1.3rem;
  }

  .sd-content .btn.primary{
    font-size: 14px;
    padding: 10px 10px;
  }
   
}


/* Container for the cards */
#serviceRequestsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* The Card */
.request-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.request-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Content Styling */
.request-card p {
    margin: 8px 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

.request-card p strong {
    color: #2d3748;
    font-weight: 600;
    display: block; /* Moves labels above the text for better scanability */
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 2px;
}

/* Status & Button Area */
.request-card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f7fafc;
}

.request-card select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background-color: #f8fafc;
    margin-bottom: 12px;
    font-size: 0.9rem;
    cursor: pointer;
}

.request-card button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Label inside the card footer */
.status-label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: #718096;
    text-transform: uppercase;
}

/* Optional: Style the message as a quote */
.request-message {
    font-style: italic;
    background: #f7fafc;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #e2e8f0;
    margin-top: 10px !important;
}



@media(max-width: 768px){
  .request-card-footer{
    margin-top: 0;
    padding-top: 10px;
  }
}




/* Wrapper */
.returns-wrapper {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Header */
.returns-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.returns-header h2 {
  margin: 0;
  font-size: 22px;
}

.subtitle {
  font-size: 14px;
  color: #777;
  margin-top: 5px;
}

/* Grid */
.returns-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual Order Card */
.order {
  background: #f9fafc;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  transition: 0.2s ease;
}

.order:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Buttons */
.btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn.small {
  font-size: 13px;
  padding: 6px 12px;
}

.btn.primary {
  background: #ff9800;
  color: white;
}

.btn.outline {
  background: white;
  border: 1px solid #ccc;
}

.btn:hover {
  opacity: 0.9;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-status {
  background: #e3f2fd;
  color: #1976d2;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.order-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.order-items {
  margin-top: 10px;
  padding-left: 10px;
}

.status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status.requested {
  background: #e3f2fd;
  color: #1976d2;
}

.status.approved {
  background: #fff3cd;
  color: #856404;
}

.status.refunded {
  background: #e6f4ea;
  color: #2e7d32;
}


.order-id {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.order-number {
  font-weight: 600;
}

.copy-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1976d2;
  font-weight: 500;
  padding: 2px 6px;
}

.copy-btn:hover {
  text-decoration: underline;
}

@media(max-width: 768px){
  .return-buyer{
    font-size: 14px;
  }
  .order-items{
    padding-left: 0;
    margin-left: 0;

  }
}


/* =========================================
   SUBSCRIPTION & PLANS STYLING
   ========================================= */

/* 1. Current Subscription Card */
.current-subscription-info {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--foreground);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #e6f4ea;
    color: var(--success);
}

.status-badge.inactive {
    background: #fdeaea;
    color: var(--destructive);
}

/* 2. Quota Progress Bar */
.quota-bar-bg {
    background: var(--muted);
    height: 12px;
    border-radius: 10px;
    width: 100%;
    margin: 15px 0 8px 0;
    overflow: hidden;
}

.quota-bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    width: 0%; /* Controlled by JS */
    transition: width 0.5s ease-in-out;
}

.quota-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 15px;
}

/* 3. Pricing Plans Grid */
#plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.plan-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.plan-card h3 {
    color: var(--foreground);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.plan-card .price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.plan-card p {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    margin: 8px 0;
}

.activate-btn {
    margin-top: 20px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.activate-btn:hover {
    background: var(--primary-dark);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .current-subscription-info {
        padding: 15px;
    }
    
    #plans-container {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   SUBSCRIPTION CARD BODY DESIGN
   ========================================= */

.current-subscription-info .card-body {
    padding-top: 10px;
}

/* Typography for the details */
.current-subscription-info .card-body p {
    margin: 12px 0;
    font-size: 0.95rem;
    color: var(--muted-foreground);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-subscription-info .card-body strong {
    color: var(--foreground);
    font-weight: 600;
}

/* The Progress Bar Container */
.quota-bar-bg {
    background: #eef2f6; /* Light grey track */
    height: 10px;
    border-radius: 5px;
    width: 100%;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

/* The Animated Fill */
.quota-bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    width: 0%; /* Updated by JS */
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Labels below the bar (0 and Max Quota) */
.quota-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 20px;
}

.quota-labels span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Highlight the Plan Name specifically */
#currentPlanText {
    color: var(--primary);
    text-transform: uppercase;
    background: hsl(16, 90%, 95%);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Spacing for the 'Ends On' footer text */
#subscriptionEnd {
    color: var(--foreground);
}



/* Responsive fix for mobile */
@media (max-width: 768px) {
    .current-subscription-info .card-body p {
        font-size: 0.9rem;
    }
    
}

@media (max-width: 768px) {
  .form-actions ~ .sd-content {
    padding-bottom: 90px;
  }
  .seller_logout.mobile-only {
    background-color: var(--muted);
    color: var(--muted-foreground);
    border: none;
  
    padding: 6px 13px;
    width: 100%;
    cursor: pointer;
    display: block;
}
}


.quota-bar-bg {
  position: relative;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.quota-bar-used {
  position: absolute;
  height: 100%;
  background-color: #ff6b6b; /* red for used quota */
  left: 0;
  top: 0;
  width: 0%;
  z-index: 1;
  transition: width 0.5s ease;
}

.quota-bar-fill {
  position: absolute;
  height: 100%;
  background-color: #4caf50; /* green for remaining quota */
  right: 0;
  top: 0;
  width: 0%;
  z-index: 2;
  transition: width 0.5s ease;
}

.image-count-indicator {
    width: 100%;
    text-align: right;
    padding: 5px;
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
}

.image-count-indicator span {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

.image-count-indicator span.warning {
    background: #fff3cd;
    color: #856404;
}

.image-count-indicator span.full {
    background: #d4edda;
    color: #155724;
}

/* Add to your stylesheet */
input.error-highlight {
    border: 2px solid red !important;
    animation: shake 0.5s;
}

.variant-row.error-highlight {
    border: 2px solid red !important;
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.field-hint {
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.field-hint.warning {
    color: orange;
}

.field-hint.error {
    color: red;
}



