/* Shop Page Custom Styles - Using Theme Colors */

/* Enhanced card product styling */
.card-product {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    position: relative;
}

.card-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(158, 103, 71, 0.15);
}

.card-product_wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f5f5 0%, var(--white) 100%);
    aspect-ratio: 1 / 1;
}

.card-product_wrapper .product-img {
    display: block;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-product_wrapper .img-product {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-product_wrapper .img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    transform: scale(1.1);
}

.card-product:hover .img-product {
    transform: scale(1.05);
}

.card-product:hover .img-hover {
    opacity: 1;
    transform: scale(1);
}

.list-product-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) translateX(80px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.card-product:hover .list-product-btn {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.list-product-btn .box-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.list-product-btn .box-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(158, 103, 71, 0.3);
}

.list-product-btn .box-icon .icon {
    font-size: 18px;
}

.on-sale-wrap {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.on-sale-item {
    background: linear-gradient(135deg, var(--third) 0%, #e0a850 100%);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(216, 157, 67, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.on-sale-item::before {
    content: "🔥";
    font-size: 13px;
}

/* Product Info Styling */
.card-product_info {
    padding: 20px 15px;
    background: var(--white);
}

.card-product_info .name-product {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: color 0.3s ease;
    min-height: 44px;
}

.card-product_info .name-product:hover {
    color: var(--primary);
}

.card-product_info .price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Pagination styling - Using Theme Colors */
.tf-pagination {
    margin-top: 60px;
    margin-bottom: 40px;
}

.pagination {
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-link {
    border-radius: 12px;
    margin: 0;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
    border: 2px solid var(--text-4);
    background: var(--white);
    font-weight: 600;
    font-size: 14px;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(158, 103, 71, 0.3);
    transform: scale(1.1);
}

.pagination .page-item:not(.disabled) .page-link:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(158, 103, 71, 0.25);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination .page-link .icon {
    font-size: 16px;
}

/* Sort dropdown - Using Theme Colors */
.select-item {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 8px;
    position: relative;
}

.select-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
}

.select-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(158, 103, 71, 0.2);
}

.select-item.active::after {
    content: "✓";
    position: absolute;
    right: 15px;
    font-weight: bold;
}

.select-item.active:hover {
    background: linear-gradient(135deg, #8d5839 0%, var(--primary) 100%);
    transform: translateX(5px);
}

/* Meta filter shop - Using Theme Colors */
.meta-filter-shop {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #faf9f7 0%, var(--white) 100%);
    border-radius: 12px;
    border: 2px solid #f0ede8;
}

.count-text {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
}

.count-text .fw-semibold {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

/* Mobile responsive adjustments */
@media (max-width: 1200px) {
    .canvas-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

    .canvas-sidebar.show {
        right: 0;
    }

    .canvas-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .canvas-sidebar.show::before {
        opacity: 1;
    }
}

/* Price styling - Using Theme Colors */
.price-new {
    color: var(--primary);
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-old {
    color: var(--text-2);
    text-decoration: line-through;
    font-size: 16px;
    position: relative;
    opacity: 0.7;
}

.price-old::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background: var(--third);
    transform: translateY(-50%);
}

/* Category sidebar improvements - Using Theme Colors */
.widget-facet {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
}

.facet-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

.facet-title .h4 {
    color: var(--black);
    font-weight: 700;
}

.category-parent {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-parent:hover {
    background: #faf9f7;
}

.category-title {
    user-select: none;
    padding: 12px 15px !important;
    border-bottom: 1px solid #f0ede8 !important;
    cursor: pointer;
}

.category-title h5 {
    color: var(--black) !important;
    transition: color 0.3s ease;
}

.category-title:hover h5 {
    color: var(--primary) !important;
}

.category-icon {
    color: var(--primary);
    transition: all 0.3s ease;
}

.subcategory-item a {
    padding: 10px 15px 10px 25px !important;
    border-radius: 8px;
    margin-bottom: 5px;
    display: block;
    transition: all 0.3s ease;
}

.subcategory-item a:before {
    content: "→";
    left: 8px !important;
    transition: all 0.3s ease;
}

.subcategory-item a:hover {
    background: linear-gradient(135deg, #f8f5f2 0%, #faf9f7 100%);
    padding-left: 30px !important;
    color: var(--primary);
}

.subcategory-item a:hover:before {
    left: 12px !important;
}

/* Product grid improvements */
.tf-grid-layout.tf-col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.tf-grid-layout.tf-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.tf-grid-layout.tf-col-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .tf-grid-layout.tf-col-3,
    .tf-grid-layout.tf-col-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tf-grid-layout {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 20px;
    }

    .card-product {
        margin-bottom: 20px;
    }
}

/* Control shop improvements - Using Theme Colors */
.tf-shop-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 20px;
    background: linear-gradient(135deg, var(--white) 0%, #faf9f7 100%);
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    gap: 20px;
}

.tf-control-layout {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 12px;
}

.tf-view-layout-switch {
    cursor: pointer;
    padding: 10px 14px;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text);
}

.tf-view-layout-switch:hover {
    background: var(--white);
    color: var(--primary);
    transform: scale(1.05);
}

.tf-view-layout-switch.active {
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(158, 103, 71, 0.3);
}

.br-line.type-vertical {
    width: 2px;
    height: 25px;
    background: var(--text-4);
    margin: 0 5px;
}

.tf-control-sorting {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tf-dropdown-sort {
    position: relative;
}

.btn-select {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid var(--text-4);
    border-radius: 12px;
    cursor: pointer;
    background: var(--white);
    min-width: 220px;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--text);
}

.btn-select:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(158, 103, 71, 0.15);
    transform: translateY(-2px);
}

.dropdown-menu {
    border-radius: 12px;
    border: 2px solid var(--text-4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin-top: 8px;
    min-width: 220px;
}

/* Loading state */
.wrapper-control-shop.loading-shop {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state - Using Theme Colors */
.alert-warning {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid var(--third);
    border-radius: 20px;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(216, 157, 67, 0.2);
    position: relative;
    overflow: hidden;
}

.alert-warning::before {
    content: "🔍";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

.alert-warning::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Tooltip improvements */
.tooltip-left {
    position: relative;
}

.tooltip-left .tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip-left:hover .tooltip {
    opacity: 1;
}

/* Scrollbar Styling - Using Theme Colors */
.canvas-sidebar::-webkit-scrollbar {
    width: 8px;
}

.canvas-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.canvas-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, #b07d5e 100%);
    border-radius: 10px;
}

.canvas-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8d5839 0%, var(--primary) 100%);
}
