/*************************************MODERN SHOP PRODUCT STYLES***********************************************/

/* Fix for shop page layout - prevent sidebar and content from stacking */
@media only screen and (min-width: 1000px) {
    .blog.container .flex-container {
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .blog.container .flex-container > aside,
    .blog.container .flex-container > div {
        flex-shrink: 0 !important;
    }
}

/* Allow stacking on smaller screens */
@media only screen and (max-width: 999px) {
    .blog.container .flex-container {
        flex-wrap: wrap !important;
    }

    .blog.container .flex-container > aside {
        display: none !important;
    }

    .blog.container .flex-container > div {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
}

/* Shop Products Container */
#products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 !important;
    margin-top: 20px !important;
}

.shop-product-card-wrapper {
    width: 100% !important;
    max-width: none !important;
}

/* Shop Product Card Wrapper */
.shop-product-card-wrapper {
    width: 100%;
}

/* Shop Product Card */
.shop-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    text-decoration: none;
}

.shop-product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 3px solid #ffc107;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.shop-product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
}

.shop-product-card:hover::before {
    opacity: 1;
}

/* Shop Product Image Wrapper */
.shop-product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 85%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-product-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-product-card:hover .shop-product-image {
    transform: translate(-50%, -50%) scale(1.15);
}

/* Shop Product Content */
.shop-product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #fff;
    position: relative;
}

/* Shop Product Name */
.shop-product-name {
    font-family: "Oswald", sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #000;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.shop-product-card:hover .shop-product-name {
    color: #ffc107;
}

/* Shop Product Polymer */
.shop-product-polymer {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.shop-product-polymer-label {
    font-weight: 600;
    color: #000;
}

/* Shop Product Footer */
.shop-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.shop-product-card:hover .shop-product-footer {
    border-color: #ffc107;
}

/* Shop Product Price */
.shop-product-price {
    font-family: "Oswald", sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #000;
    transition: color 0.3s ease;
}

.shop-product-card:hover .shop-product-price {
    color: #ffc107;
}

/* Shop Product CTA */
.shop-product-cta {
    font-family: "Open Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #000;
    padding: 5px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.shop-product-cta:hover {
    background: #ffc107;
    color: #000;
    transform: scale(1.05);
}

/* Keep title centered on all screen sizes */
.latest-news .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.latest-news .text-center {
    width: 100%;
    text-align: center !important;
}

/* Enhanced Filter Sidebar - Based on Original Design */
.sidebar {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Search Box Enhancement */
.search-control:focus {
    outline: none;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.15);
}

/* Categories Widget Enhancement */
.widget-categories a {
    transition: all 0.3s ease;
}

.widget-categories a:hover {
    background: #ffc107 !important;
    color: #000 !important;
    padding-left: 20px !important;
}

/* Responsive Design for Shop */
@media only screen and (max-width: 1400px) {
    #products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media only screen and (max-width: 1100px) {
    #products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media only screen and (max-width: 999px) {
    #products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .shop-product-card {
        border-radius: 12px;
    }

    .shop-product-content {
        padding: 20px;
    }

    .shop-product-name {
        font-size: 18px;
    }

    .shop-product-price {
        font-size: 22px;
    }
}

@media only screen and (max-width: 767px) {
    #products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .shop-product-card {
        border-radius: 10px;
    }

    .shop-product-content {
        padding: 16px;
    }

    .shop-product-name {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .shop-product-polymer {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .shop-product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .shop-product-price {
        font-size: 20px;
    }

    .shop-product-cta {
        font-size: 12px;
        padding: 6px 14px;
        align-self: stretch;
        text-align: center;
    }
}

/* Loading Animation for Shop Products */
.shop-product-card-wrapper[data-animation-container] {
    animation: fadeInUp 0.6s ease-out;
}
