/* ===================================================================
   PawfectStudio Theme CSS - Animations & interactions
   =================================================================== */

/* Smooth transitions for theme color changes */
* {
    transition: background-color 0.3s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
                border-color 0.3s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Pulse animation for badges */
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.cart-count {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fade-in 0.6s var(--ease-out-expo) forwards;
}

/* Slide in from left */
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Slide in from right */
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Product card hover zoom effect enhancement */
.product-card .product-img-wrap {
    overflow: hidden;
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Wiggle animation for decorative elements */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--pink-pale, #FDE8F0);
}

::-webkit-scrollbar-thumb {
    background: var(--pink-primary, #F8A4C8);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pink-light, #FBCFE0);
}

/* Selection color */
::selection {
    background: var(--pink-primary, #F8A4C8);
    color: #fff;
}

::-moz-selection {
    background: var(--pink-primary, #F8A4C8);
    color: #fff;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--pink-primary, #F8A4C8);
    outline-offset: 2px;
}

/* WooCommerce add to cart loading */
.woocommerce .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Newsletter input focus glow */
.site-footer .footer-newsletter input:focus {
    box-shadow: 0 0 0 3px rgba(248, 164, 200, 0.2);
}

/* Category card circular image hover ring */
.category-card .cat-img-wrap::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--pink-primary);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
    pointer-events: none;
}

.category-card:hover .cat-img-wrap::after {
    opacity: 0.3;
}

/* Gradient text effect for accent quote */
.brand-story .accent-quote {
    background: linear-gradient(135deg, var(--pink-primary), var(--lavender-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section title line animation - triggered by .visible class on scroll */
.section-title .title-line {
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.8s var(--ease-out-expo);
}

.section-title.visible .title-line,
.reveal.visible .section-title .title-line,
.reveal-scale.visible .section-title .title-line {
    transform: scaleX(1);
}

.section-title.visible .title-line:last-child,
.reveal.visible .section-title .title-line:last-child {
    transition-delay: 0.1s;
}

/* Newsletter form button glow */
.footer-newsletter .btn-primary {
    position: relative;
    overflow: hidden;
}

.footer-newsletter .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.footer-newsletter .btn-primary:hover::before {
    left: 100%;
}

/* Promo bar gradient background (when no custom bg) */
.announcement-bar:not([style*="background"]) {
    background: linear-gradient(to right, var(--lavender, #C4B5FD), var(--lavender-deep, #A78BFA));
}

/* Mobile drawer slide animation enhancement */
.mobile-drawer {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Better mobile responsiveness for commission images */
@media (max-width: 767px) {
    .commission-cta .commission-text h2 {
        font-size: 28px;
    }
    .commission-cta .commission-text p {
        font-size: 16px;
    }
    .brand-story .brand-logo-circle {
        width: 240px;
        height: 240px;
    }
    .brand-story .brand-logo-circle .logo-heart {
        width: 80px;
        height: 80px;
    }
    .brand-story .brand-logo-circle .logo-heart svg {
        width: 40px;
        height: 40px;
    }
}

/* WooCommerce notices animation */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    animation: fade-in 0.4s ease-out;
}

/* Related products grid fix */
.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .related.products ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Single product gallery flex layout fix */
.woocommerce div.product div.images {
    width: 100%;
    float: none;
    margin-bottom: 32px;
}

@media (min-width: 992px) {
    .woocommerce div.product div.images {
        width: 48%;
        margin-right: 4%;
    }
    .woocommerce div.product div.summary {
        width: 48%;
        float: right;
    }
}

/* WooCommerce single product clear fix */
.woocommerce div.product::after,
.woocommerce div.product::before {
    content: '';
    display: table;
}

.woocommerce div.product::after {
    clear: both;
}

/* Tab content animation */
.woocommerce-Tabs-panel {
    animation: fade-in 0.3s ease-out;
}

/* Cart table responsive */
@media (max-width: 767px) {
    .woocommerce table.shop_table_responsive tr {
        border-radius: var(--radius);
        margin-bottom: 12px;
    }
}

/* Checkout form styling */
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    border: 1px solid var(--pink-pale);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* WooCommerce product gallery thumbnail */
.woocommerce div.product div.images .flex-control-thumbs li {
    width: 23%;
    margin: 1%;
    border-radius: var(--radius);
    overflow: hidden;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    border-radius: 0;
}
