/* ARIB WooCommerce Frontend Styles - Professional Edition */

/* ============================================
   WISHLIST & COMPARE BUTTONS
   ============================================ */

.arib-wishlist-btn,
.arib-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.arib-wishlist-btn:hover,
.arib-compare-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.arib-wishlist-btn:active,
.arib-compare-btn:active {
    transform: translateY(0);
}

/* Wishlist Active State */
.arib-wishlist-btn.in-wishlist {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}

.arib-wishlist-btn.in-wishlist:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 20px rgba(239,68,68,0.45);
}

.arib-wishlist-btn.in-wishlist svg {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Compare Active State */
.arib-compare-btn.in-compare {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(31,41,55,0.35);
}

.arib-compare-btn.in-compare:hover {
    background: linear-gradient(135deg, #111827, #030712);
    box-shadow: 0 6px 20px rgba(31,41,55,0.45);
}

/* Icon Styles */
.arib-wishlist-icon,
.arib-compare-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.arib-wishlist-btn:hover .arib-wishlist-icon,
.arib-compare-btn:hover .arib-compare-icon {
    transform: scale(1.1);
}

.arib-wishlist-btn.in-wishlist:hover .arib-wishlist-icon {
    animation: heartbeat 0.6s ease-in-out;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

/* Loop (Archive) Buttons */
.woocommerce ul.products li.product .arib-wishlist-btn,
.woocommerce ul.products li.product .arib-compare-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    position: absolute;
}

/* ============================================
   SWATCHES
   ============================================ */

.arib-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.arib-swatch {
    width: 38px;
    height: 38px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.arib-swatch::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: border-color 0.2s;
}

.arib-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.arib-swatch.selected {
    border-color: #1f2937;
}

.arib-swatch.selected::before {
    border-color: #1f2937;
}

.arib-swatch-color {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.arib-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */

.arib-countdown {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    margin: 18px 0;
    box-shadow: 0 4px 20px rgba(239,68,68,0.3);
}

.arib-countdown-label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}

.arib-countdown-timer {
    display: flex;
    gap: 20px;
}

.arib-countdown-item {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 65px;
    backdrop-filter: blur(4px);
}

.arib-countdown-number {
    font-size: 32px;
    font-weight: 700;
    display: block;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.arib-countdown-text {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mini Countdown */
.arib-countdown.mini {
    padding: 10px 14px;
    border-radius: 8px;
}

.arib-countdown.mini .arib-countdown-timer {
    gap: 8px;
}

.arib-countdown.mini .arib-countdown-item {
    padding: 6px 10px;
    min-width: 45px;
}

.arib-countdown.mini .arib-countdown-number {
    font-size: 18px;
}

.arib-countdown.mini .arib-countdown-text {
    font-size: 9px;
}

/* ============================================
   COMPARE BAR
   ============================================ */

.arib-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 9999;
    border-top: 1px solid #e5e7eb;
}

.arib-compare-bar-items {
    display: flex;
    gap: 12px;
}

.arib-compare-bar-item {
    position: relative;
    width: 64px;
    height: 64px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.arib-compare-bar-item:hover {
    border-color: #9ca3af;
    transform: scale(1.05);
}

.arib-compare-bar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arib-compare-bar-item .remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}

.arib-compare-bar-item .remove:hover {
    background: #dc2626;
    transform: scale(1.15);
}

.arib-compare-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(31,41,55,0.3);
}

.arib-compare-bar-btn:hover {
    background: linear-gradient(135deg, #111827, #030712);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(31,41,55,0.4);
    color: white;
}

/* ============================================
   WISHLIST PAGE
   ============================================ */

.arib-wishlist-page {
    max-width: 1000px;
    margin: 0 auto;
}

.arib-wishlist-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.arib-wishlist-table th {
    background: #f9fafb;
    padding: 16px 20px;
    text-align: right;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.arib-wishlist-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.arib-wishlist-table tr:last-child td {
    border-bottom: none;
}

.arib-wishlist-table .product-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.arib-wishlist-table .product-info img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.arib-wishlist-table .in-stock { 
    color: #10b981; 
    font-weight: 500;
}

.arib-wishlist-table .out-of-stock { 
    color: #ef4444;
    font-weight: 500;
}

.arib-wishlist-remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.arib-wishlist-remove:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ============================================
   COMPARE TABLE
   ============================================ */

.arib-compare-page {
    max-width: 1200px;
    margin: 0 auto;
}

.arib-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.arib-compare-table th,
.arib-compare-table td {
    padding: 18px;
    border: 1px solid #f3f4f6;
    text-align: center;
    vertical-align: top;
}

.arib-compare-table thead th {
    background: #f9fafb;
    position: relative;
    padding-top: 50px;
}

.arib-compare-table thead th img {
    max-width: 160px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.arib-compare-table .arib-compare-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.arib-compare-table .arib-compare-remove:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ============================================
   BRANDS
   ============================================ */

.arib-product-brand {
    display: block;
    margin: 12px 0;
    color: #6b7280;
    font-size: 14px;
}

.arib-product-brand a {
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.arib-product-brand a:hover {
    color: #ef4444;
}

/* ============================================
   RTL ADJUSTMENTS
   ============================================ */

[dir="rtl"] .arib-wishlist-table th,
[dir="rtl"] .arib-wishlist-table td {
    text-align: right;
}

[dir="rtl"] .arib-compare-bar-item .remove {
    right: auto;
    left: -6px;
}

[dir="rtl"] .arib-compare-table .arib-compare-remove {
    right: auto;
    left: 12px;
}
