/**
 * Welcart Duo Clone - Theme Styles
 * 
 * @package Welcart_Duo_Clone
 */

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Welcart Products
2.0 Welcart Cart
3.0 Mobile Menu
4.0 Scroll to Top Button
5.0 Animations
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Welcart Products
--------------------------------------------------------------*/

/* Product Grid Enhanced */
.products-section,
.bestseller-section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Product Card Enhanced */
.product-card {
    position: relative;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-link {
    display: block;
    color: inherit;
}

.product-link:hover {
    opacity: 1;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.stock-badge.out-of-stock {
    background-color: #dc3545;
}

.product-categories {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.product-categories a {
    color: #666;
}

.product-categories a:hover {
    color: #0066cc;
}

.product-actions {
    padding: 0 1rem 1rem;
}

.product-form {
    margin: 0;
}

/* Product Detail Page */
.single-item .entry-header {
    margin-bottom: 2rem;
}

.item-image-gallery {
    margin-bottom: 2rem;
}

.item-main-image {
    margin-bottom: 1rem;
}

.item-thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.item-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.item-thumbnail:hover,
.item-thumbnail.active {
    border-color: #0066cc;
}

.item-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.item-price {
    font-size: 2rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 1rem;
}

.item-sku-select {
    margin-bottom: 1rem;
}

.sku-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sku-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.item-quantity {
    margin-bottom: 1rem;
}

.quantity-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quantity-input {
    width: 80px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/*--------------------------------------------------------------
2.0 Welcart Cart
--------------------------------------------------------------*/

.cart-page {
    padding: 3rem 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.cart-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-item-remove {
    color: #dc3545;
    cursor: pointer;
}

.cart-item-remove:hover {
    color: #c82333;
}

.cart-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #333;
}

.cart-actions {
    margin-top: 2rem;
}

.continue-shopping {
    margin-right: 1rem;
}

/*--------------------------------------------------------------
3.0 Mobile Menu
--------------------------------------------------------------*/

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-navigation .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .main-navigation .nav-menu li {
        margin: 0.5rem 0;
    }
}

/*--------------------------------------------------------------
4.0 Scroll to Top Button
--------------------------------------------------------------*/

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: #0052a3;
    transform: translateY(-3px);
}

/*--------------------------------------------------------------
5.0 Animations
--------------------------------------------------------------*/

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

.cart-count.bounce {
    animation: bounce 0.5s ease;
}

/* Header Scroll Effects */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card,
.post-card {
    animation: fadeIn 0.6s ease forwards;
}

/* Post Cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.post-card-link {
    display: block;
    color: inherit;
}

.post-card-link:hover {
    opacity: 1;
}

.post-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.post-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-card-excerpt {
    color: #666;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    margin: 3rem 0;
}

.pagination .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.pagination .page-numbers li {
    display: inline-block;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}
