/* AROVA BD - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #0B6B50;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #064635;
}

/* Product card hover */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* Image zoom on hover */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.3s ease;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Quantity controls */
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.qty-btn:hover {
    background: #0B6B50;
    color: #fff;
    border-color: #0B6B50;
}

/* Discount badge */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 5;
}

/* Stock badge */
.stock-badge {
    font-size: 12px;
    font-weight: 500;
}
.stock-in {
    color: #059669;
}
.stock-out {
    color: #dc2626;
}

/* Tab styles */
.tab-btn {
    padding: 10px 20px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active {
    color: #0B6B50;
    border-bottom-color: #0B6B50;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Image gallery thumbnails */
.gallery-thumb {
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}
.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: #0B6B50;
}

/* Order status timeline */
.timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item:last-child::before {
    display: none;
}
.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #fff;
    z-index: 1;
}
.timeline-item.completed .timeline-dot {
    background: #0B6B50;
}
.timeline-item.active .timeline-dot {
    --glow: 59, 130, 246;
    background: rgb(var(--glow));
    border-color: #fff;
    box-shadow: 0 0 0 5px rgba(var(--glow), 0.25), 0 0 18px 6px rgba(var(--glow), 0.9);
    animation: timeline-glow 2.2s ease-in-out infinite;
}
.timeline-item.active .timeline-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(var(--glow), 0.7);
    animation: timeline-ring 2.2s ease-out infinite;
    pointer-events: none;
}
@keyframes timeline-glow {
    0%, 100% { box-shadow: 0 0 0 5px rgba(var(--glow), 0.25), 0 0 14px 4px rgba(var(--glow), 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(var(--glow), 0.35), 0 0 26px 9px rgba(var(--glow), 1); }
}
@keyframes timeline-ring {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}
/* Per-status active dot colors */
.timeline-item.status-pending.active .timeline-dot { --glow: 245, 158, 11; }
.timeline-item.status-confirmed.active .timeline-dot { --glow: 59, 130, 246; }
.timeline-item.status-processing.active .timeline-dot { --glow: 139, 92, 246; }
.timeline-item.status-shipped.active .timeline-dot { --glow: 6, 182, 212; }
.timeline-item.status-delivered.active .timeline-dot { --glow: 34, 197, 94; }
.timeline-item.status-cancelled.active .timeline-dot { --glow: 239, 68, 68; }

/* Table responsive: tables scroll horizontally inside their card on small screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.table-responsive table {
    min-width: 720px;
    width: 100%;
    border-collapse: collapse;
}
.table-responsive th,
.table-responsive td {
    white-space: nowrap;
    vertical-align: middle;
}

/* Admin shell: prevent wide content from forcing page-level horizontal scroll */
.admin-main {
    min-width: 0;
    width: 100%;
}
body.admin-no-scroll {
    overflow-x: hidden;
}

/* Admin sidebar overlay */
.sidebar-open {
    overflow: hidden;
}

/* Custom checkbox */
.custom-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #0B6B50;
}

/* Toastify overrides */
.toastify {
    font-family: 'Poppins', sans-serif !important;
    border-radius: 8px !important;
}
.toastify .toast-close {
    opacity: 1 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 0 4px 0 12px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    align-self: center !important;
}
.toastify .toast-close:hover {
    opacity: 0.7 !important;
}

/* Pagination active */
.pagination-active {
    background-color: #0B6B50;
    color: white;
}

/* Swiper customization */
.swiper-button-next,
.swiper-button-prev {
    color: #0B6B50 !important;
}
.swiper-pagination-bullet-active {
    background: #0B6B50 !important;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cart item name: max 2 lines with ellipsis */
.cart-item-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    max-height: 2.6em;
    line-height: 1.3;
}

/* Flash messages */
#flash-success, #flash-error, #flash-warning {
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
