/* ========================================
   ISLAMIC BOOKSTORE - DARK THEME OVERRIDES
   ======================================== */

/* Fix all white backgrounds to dark theme */
.table {
    background: #1a1a1a !important;
    color: #fff !important;
}

.table thead {
    background: #2a2a2a !important;
}

.table th,
.table td {
    border-color: #333 !important;
    color: #fff !important;
}

/* Form inputs - dark theme */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea,
select,
.form-control {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #fff !important;
}

input::placeholder,
textarea::placeholder {
    color: #666 !important;
}

/* Product cards - dark theme with STABLE sizing (NO RESIZE/JUMP) */
.product-card {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    /* ONLY transition transform and box-shadow - prevents resize/jump */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    /* Ensure stable dimensions */
    overflow: hidden;
}

.product-card:hover {
    /* Use ONLY transform - no width/height/padding/margin changes */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2) !important;
    border-color: #ffc107 !important;
}

/* Fix product card flickering - stable hover effects */
.product-card .product-actions {
    transition: opacity 0.3s ease !important;
    will-change: opacity;
}

background: #1a1a1a !important;
border-color: #333 !important;
}

/* Active states */
.account-sidebar ul li a.active,
.account-sidebar ul li a[style*="background: #ffc107"] {
    background: #ffc107 !important;
    color: #000 !important;
}

/* Buttons - ensure visibility on dark */
.custom-btn.custom-btns {
    background: transparent !important;
    border: 2px solid #ffc107 !important;
    color: #ffc107 !important;
}

.custom-btn.custom-btns:hover {
    background: #ffc107 !important;
    color: #000 !important;
}

/* Quantity controls */
.quantity button {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #333 !important;
}

.quantity input {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #333 !important;
}

/* Action buttons on cards */
.product-actions a,
.remove-wishlist {
    background: #2a2a2a !important;
    color: #ffc107 !important;
    border: 1px solid #333 !important;
}

.product-actions a:hover,
.remove-wishlist:hover {
    background: #ffc107 !important;
    color: #000 !important;
}

/* Dashboard cards - keep gradients but ensure text visibility */
.dashboard-card,
.stat-card,
.quick-action {
    color: #fff !important;
}

.quick-action {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

.quick-action:hover {
    background: #2a2a2a !important;
    border-color: #ffc107 !important;
}

/* Fix select dropdowns */
select option {
    background: #1a1a1a !important;
    color: #fff !important;
}

/* Tabs */
.nav-tabs {
    border-bottom-color: #333 !important;
}

.nav-tabs>li>a {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #fff !important;
}

.nav-tabs>li.active>a,
.nav-tabs>li.active>a:hover,
.nav-tabs>li.active>a:focus {
    background: #2a2a2a !important;
    border-color: #333 #333 transparent !important;
    color: #ffc107 !important;
}

/* Pagination */
.pagination>li>a,
.pagination>li>span {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #fff !important;
}

.pagination>li.active>a,
.pagination>li.active>span {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

/* Badges */
.badge {
    font-weight: 600 !important;
}

/* Ensure all text is readable */
.dark {
    color: #fff !important;
}

/* Product detail specific */
.product-detail-info,
.product-description,
.product-details {
    background: #1a1a1a !important;
}

/* Review items */
.review-item {
    border-bottom-color: #333 !important;
}

/* Address cards */
.address-card {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

/* Order items */
.order-item {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

.order-product-item {
    border-bottom-color: #333 !important;
}

/* Smooth animations - prevent flickering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Disable problematic animations on page load */
.wow {
    animation-duration: 0.6s !important;
}

/* Stable hover transitions */
a,
button,
.btn,
.custom-btn {
    transition: all 0.3s ease !important;
}

/* Fix input group buttons */
.input-group-btn .btn {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #333 !important;
}

.input-group-btn .btn:hover {
    background: #ffc107 !important;
    color: #000 !important;
}

/* Checkbox and radio */
input[type="checkbox"],
input[type="radio"] {
    border-color: #666 !important;
}

/* Ensure proper contrast for all links */
a {
    color: #ffc107 !important;
}

a:hover {
    color: #ffdb4d !important;
}

/* Dark theme for modals and overlays */
.modal-content {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

/* Fix any remaining white backgrounds */
[style*="background: #fff"],
[style*="background:#fff"],
[style*="background: white"],
[style*="background:white"] {
    background: #1a1a1a !important;
}

[style*="background: #f9f9f9"],
[style*="background:#f9f9f9"] {
    background: #1a1a1a !important;
}

/* Ensure borders are visible on dark */
[style*="border: 1px solid #ddd"],
[style*="border:1px solid #ddd"] {
    border-color: #333 !important;
}

/* Fix summary boxes */
.summary-row {
    border-bottom-color: #333 !important;
}

/* Category list */
.category-list li {
    border-bottom-color: #333 !important;
}

.category-list li a {
    color: #fff !important;
}

.category-list li a:hover {
    color: #ffc107 !important;
}

/* Footer links */
.footer-links li a {
    color: #999 !important;
}

.footer-links li a:hover {
    color: #ffc107 !important;
}

/* Ensure icons are visible */
.fa,
.icon,
i {
    color: inherit !important;
}

/* Fix any inline light backgrounds in specific sections */
section[style*="background: #f9f9f9"],
div[style*="background: #f9f9f9"],
section[style*="background: #fff"],
div[style*="background: #fff"] {
    background: #1a1a1a !important;
}