/* Custom CSS pour American Shop by Toutou */

/* Amélioration des animations */
@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Styles pour la recherche */
.search-form-container {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-field {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #F3B2C8;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-field:focus {
    border-color: #E092B0;
}

.search-submit {
    background: #F3B2C8;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #E092B0;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    width: 25px;
    height: 20px;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Styles WooCommerce personnalisés */
.woocommerce-page-header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 40px;
}

.woocommerce-page-header .page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.category-description {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Produits WooCommerce */
.woocommerce-products .product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
}

.woocommerce-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.woocommerce-products .product-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.woocommerce-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.woocommerce-products .product-card:hover .product-image img {
    transform: scale(1.1);
}

.woocommerce-products .product-info {
    padding: 25px;
}

.woocommerce-products .product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.woocommerce-products .product-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.woocommerce-products .product-title a:hover {
    color: #F3B2C8;
}

.woocommerce-products .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #F3B2C8;
    margin-bottom: 15px;
}

.woocommerce-products .price del {
    color: #999;
    font-size: 0.9em;
    margin-right: 10px;
}

.woocommerce-products .add_to_cart_button,
.woocommerce-products .button {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.woocommerce-products .add_to_cart_button:hover,
.woocommerce-products .button:hover {
    background: #F3B2C8;
    color: white;
}

/* Badges produits */
.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #F3B2C8;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

/* Pagination WooCommerce */
.woocommerce-pagination {
    text-align: center;
    margin-top: 40px;
}

.woocommerce-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    border: 2px solid #eee;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.woocommerce-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers.current {
    background: #F3B2C8;
    color: white;
    border-color: #F3B2C8;
}

/* Panier */
.cart-contents {
    position: relative;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.cart-contents:hover {
    color: #F3B2C8;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #F3B2C8;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Messages WooCommerce */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.woocommerce-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.woocommerce-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

/* CENTRAGE GLOBAL DES IMAGES PRODUITS */
.woocommerce-products .product-image,
.product-card .product-image,
.product-item .product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
}

.woocommerce-products .product-image img,
.product-card .product-image img,
.product-item .product-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 6px !important;
    padding: 8px !important;
}

/* Correction pour les images WooCommerce */
.woocommerce .products .product a img {
    margin: 0 auto !important;
    display: block !important;
}

/* Image de remplacement centrée */
.woocommerce .product .woocommerce-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f0f0f0 !important;
    color: #ccc !important;
    font-size: 2rem !important;
    text-align: center !important;
}

/* Améliorations responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    
    .main-navigation.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 20px;
    }
    
    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 0;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-field,
    .search-submit {
        border-radius: 8px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .woocommerce-products .product-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
}

/* Animations au scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour les formulaires */
.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="password"],
.woocommerce form textarea,
.woocommerce form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.woocommerce form input[type="text"]:focus,
.woocommerce form input[type="email"]:focus,
.woocommerce form input[type="password"]:focus,
.woocommerce form textarea:focus,
.woocommerce form select:focus {
    outline: none;
    border-color: #F3B2C8;
}

.woocommerce form button,
.woocommerce form input[type="submit"] {
    background: #F3B2C8;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.woocommerce form button:hover,
.woocommerce form input[type="submit"]:hover {
    background: #E092B0;
}

/* Styles pour les étoiles de notation */
.star-rating {
    color: #ffd700;
    font-size: 1rem;
}

.star-rating::before {
    content: "★★★★★";
    color: #ddd;
}

.star-rating span::before {
    content: "★★★★★";
    color: #ffd700;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}