/* terakhir_dilihat.css - Luxurious Styling for Recently Viewed Page */

body {
    background-color: #fcfcfd;
    overflow-x: hidden;
    width: 100%;
}

.td-header {
    display: flex;
    align-items: center;
    padding: 16px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.td-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.5px;
}

.td-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px;
    background: transparent;
    overflow-x: auto;
    scrollbar-width: none;
}
.td-filters::-webkit-scrollbar { display: none; }

.td-filter-pill {
    padding: 10px 22px;
    border-radius: 30px;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.td-filter-pill:hover {
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.td-filter-pill.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.2);
}
.td-filter-pill .fa-circle-check {
    display: none;
    color: #38bdf8;
}
.td-filter-pill.active .fa-circle-check {
    display: inline-block;
}

.td-filter-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.td-filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.td-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 40px;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .td-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 40px; }
}

.td-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.td-empty i {
    font-size: 54px;
    color: #e2e8f0;
    margin-bottom: 20px;
}
.td-empty p {
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
}

/* Luxurious Calendar Dropdown */
.td-calendar-wrapper {
    position: relative;
    width: auto;
}
.td-calendar-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(226, 232, 240, 0.8);
    z-index: 100;
    padding: 24px;
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.td-calendar-dropdown.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.td-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.td-cal-month {
    font-weight: 800;
    color: #0f172a;
    font-size: 17px;
    letter-spacing: -0.3px;
}
.td-cal-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
}
.td-cal-nav:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    transform: scale(1.05);
}

.td-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}
.td-cal-day {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.td-cal-day:hover:not(.disabled) {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.1);
}
.td-cal-day.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.td-cal-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: transparent !important;
}

.td-cal-close-btn {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
    color: #fff;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.td-cal-close-btn:hover {
    transform: translateX(-50%) translateY(3px);
}

/* Luxurious Product Cards for Terakhir Dilihat */
.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(226, 232, 240, 0.8);
}
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f8fafc;
    overflow: hidden;
}
.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-image img {
    transform: scale(1.08);
}
.badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}
.badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.badge-flash-sale {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
}
.badge-discount {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}
.badge-terlaris {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}
.quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 10;
}
.product-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.quick-view-btn:hover {
    background: #0f172a;
    color: #fff;
}
.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-category {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.product-title a:hover {
    color: #2563eb;
}
.product-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.old-price {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}
.current-price {
    font-size: 17px;
    font-weight: 800;
    color: #e11d48;
}
.product-meta {
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}
