/*
Theme Name: Borderliner
Theme URI: https://borderliner.fr
Author: Borderliner Team
Author URI: https://borderliner.fr
Description: Thème e-commerce minimaliste et sombre pour WooCommerce avec design urbain et engagé
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: borderliner
Tags: e-commerce, woocommerce, dark, minimal, urban

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==========================================
   VARIABLES CSS
   ========================================== */
:root {
    --bg-main: #161616;
    --bg-card: #191817;
    --border-color: #2A2826;
    --accent-gold: #F2C94C;
    --text-primary: #F2F2F2;
    --text-muted: #888888;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ==========================================
   FIX WORDPRESS ERROR PAGE / MAINTENANCE
   ========================================== */
body#error-page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background-color: #161616 !important;
}

#error-page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Pirata One', cursive;
    font-weight: 400;
    letter-spacing: 0.5px;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-gold);
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
/* Règles désactivées - on utilise Tailwind maintenant
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
*/

.logo h1 {
    font-size: 2rem;
    color: var(--accent-gold);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==========================================
   HERO SECTION
   ========================================== */
/* Règles désactivées - on utilise Tailwind maintenant
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'Pirata One', cursive;
    font-size: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
*/

/* ==========================================
   PRODUCTS SECTION
   ========================================== */
/* Règles désactivées - on utilise Tailwind maintenant
.products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.products h2 {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
*/

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* ==========================================
   WOOCOMMERCE PAGINATION
   ========================================== */
.woocommerce-pagination {
    margin-top: 3rem;
    text-align: center;
}

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

.woocommerce-pagination ul li {
    display: inline-block;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.woocommerce-pagination ul li a:hover {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border-color: var(--accent-gold);
}

.woocommerce-pagination ul li span.current {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border-color: var(--accent-gold);
}

/* ==========================================
   WOOCOMMERCE MESSAGES
   ========================================== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-gold);
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: 4px;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    display: none;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.woocommerce-error {
    border-left-color: #e74c3c;
}

/* ==========================================
   WOOCOMMERCE RESULT COUNT
   ========================================== */
.woocommerce-result-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================
   CUSTOM LOGO SUPPORT
   ========================================== */
.custom-logo-link img,
.custom-logo-link,
header img[src*="logo"] {
    height: 60px !important;
    width: auto !important;
    object-fit: contain !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    background: transparent !important;
}

/* Force logo visibility on dark background */
.custom-logo-link img {
    /* Remove any potential color inversion */
    -webkit-filter: none !important;
    filter: none !important;
}

/* ==========================================
   AJAX ADD TO CART ANIMATIONS
   ========================================== */
.ajax_add_to_cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

.added_to_cart {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.added_to_cart:hover {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border-color: var(--accent-gold);
}

/* ==========================================
   WORDPRESS PAGINATION
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    list-style: none;
    padding: 0;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border-color: var(--accent-gold);
}

/* ==========================================
   STICKY HEADER ADJUSTMENT
   ========================================== */
body {
    padding-top: 0;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

/* ==========================================
   CART DRAWER ANIMATIONS
   ========================================== */
#cartDrawer {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

#cartOverlay {
    transition: opacity 0.3s ease;
}

/* Smooth scroll for cart items */
#cartItems::-webkit-scrollbar {
    width: 6px;
}

#cartItems::-webkit-scrollbar-track {
    background: var(--bg-main);
}

#cartItems::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#cartItems::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* ==========================================
   PRODUCT GRID ANIMATIONS
   ========================================== */
#productGrid {
    transition: opacity 0.2s ease-in-out;
}

/* Product card hover effects */
.product-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(242, 201, 76, 0.1);
}

/* ==========================================
   FILTER BUTTONS ACTIVE STATE
   ========================================== */
[data-filter] {
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-filter]:active {
    transform: scale(0.95);
}

/* ==========================================
   COLOR SWATCHES
   ========================================== */
.color-option {
    position: relative;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option:active {
    transform: scale(0.95);
}

/* ==========================================
   LOADING STATES
   ========================================== */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   BUTTON ANIMATIONS
   ========================================== */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* ==========================================
   MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-width: 768px) {
    #cartDrawer {
        width: 100%;
    }

    #productGrid {
        gap: 1rem;
    }
}

/* ==========================================
   SMOOTH SCROLLING
   ========================================== */
html {
    scroll-behavior: smooth;
}

/* Prevent body scroll when cart is open */
body.cart-open {
    overflow: hidden;
}

/* ==========================================
   FOCUS STATES FOR ACCESSIBILITY
   ========================================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ==========================================
   IMAGE LAZY LOADING
   ========================================== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ==========================================
   CATEGORY TEMPLATE STYLES
   ========================================== */

/* Line clamp for product titles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category header image hover effect */
.category-image-wrapper {
    overflow: hidden;
    border-radius: 0.5rem;
}

.category-image-wrapper img {
    transition: transform 0.5s ease;
}

.category-image-wrapper:hover img {
    transform: scale(1.05);
}

/* Toggle description button animation */
.toggle-icon {
    transition: transform 0.3s ease;
}

/* Star rating styles */
.star-rating {
    display: inline-flex;
    gap: 0.125rem;
}

.star-rating svg {
    transition: all 0.2s ease;
}

/* Breadcrumb styles */
.woocommerce-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.woocommerce-breadcrumb a {
    transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover {
    color: var(--accent-gold);
}

/* Category description expandable */
#fullDescription {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Subcategory filter buttons */
.subcategory-filter {
    transition: all 0.2s ease;
}

.subcategory-filter:hover {
    transform: translateY(-2px);
}

/* Product card in category page */
.product-category .product-card {
    transition: all 0.3s ease;
}

.product-category .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(242, 201, 76, 0.15);
}

/* Badge overlay on category image */
.category-badge {
    backdrop-filter: blur(4px);
    background-color: rgba(242, 201, 76, 0.95);
}

/* ==========================================
   RESPONSIVE CATEGORY TEMPLATE
   ========================================== */
@media (max-width: 1024px) {
    /* Stack category header on tablet */
    .category-header-grid {
        grid-template-columns: 1fr;
    }

    /* Adjust category image height */
    .category-image-wrapper img {
        height: 300px;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    /* Smaller category title on mobile */
    .category-title {
        font-size: 2rem;
    }

    /* Compact breadcrumbs */
    .woocommerce-breadcrumb {
        font-size: 0.625rem;
    }

    /* Full width subcategory buttons */
    .subcategory-filter {
        width: 100%;
    }
}

/* ==========================================
   CATEGORY SPECIFIC COLORS
   ========================================== */

/* Collection Signature - Gold accent */
body.product-category-collection-signature .category-badge {
    background-color: var(--accent-gold);
    color: var(--bg-main);
}

/* Collection Manifestes - Alternative styling */
body.product-category-collection-manifestes .category-badge {
    background-color: var(--bg-card);
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

/* ==========================================
   PRINT STYLES FOR CATEGORIES
   ========================================== */
@media print {
    .woocommerce-ordering,
    .add_to_cart_button,
    #toggleDescription {
        display: none;
    }

    .category-header-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   FRONT PAGE SPECIFIC STYLES
   ========================================== */

/* Hero banner full height */
.hero-banner {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero image overlay gradient */
.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(22, 22, 22, 0.8),
        rgba(22, 22, 22, 0.6),
        rgba(22, 22, 22, 1)
    );
}

/* Scroll indicator animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Section headers */
.section-header {
    margin-bottom: 3rem;
}

/* Product card in front page */
.front-page .product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.front-page .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(242, 201, 76, 0.2);
}

/* Category card hover effects */
.category-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-card .category-image {
    transition: transform 0.5s ease;
}

/* Engagement icons hover */
.engagement-icon {
    transition: all 0.3s ease;
}

.engagement-icon:hover {
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

/* Review card animations */
.review-card {
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: var(--accent-gold);
    transform: translateX(4px);
}

/* Newsletter input focus */
.newsletter-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.1);
}

/* Star rating animations */
.star-icon {
    transition: all 0.2s ease;
}

.star-icon:hover {
    transform: scale(1.2);
}

/* CTA button hover effects */
.cta-primary {
    transition: all 0.3s ease;
}

.cta-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(242, 201, 76, 0.3);
}

.cta-secondary {
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    transform: scale(1.05);
}

/* Global rating display */
.global-rating {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

/* Avatar circle */
.review-avatar {
    width: 3rem;
    height: 3rem;
    background-color: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bg-main);
}

/* Arrow icon in category cards */
.category-arrow {
    transition: all 0.3s ease;
}

.category-card:hover .category-arrow {
    transform: scale(1.1) rotate(45deg);
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--border-color),
        transparent
    );
    margin: 4rem 0;
}

/* ==========================================
   FRONT PAGE RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    /* Smaller hero text on tablet */
    .hero-banner h1 {
        font-size: 3.5rem;
    }

    /* Stack CTA buttons */
    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Smaller hero text on mobile */
    .hero-banner h1 {
        font-size: 2.5rem;
    }

    /* Reduce section padding */
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Full width category cards */
    .category-card {
        height: 250px;
    }

    /* Smaller global rating */
    .global-rating {
        font-size: 3rem;
    }

    /* Stack review layout */
    .review-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ANIMATIONS KEYFRAMES
   ========================================== */

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation for product cards */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Pulse animation for scroll indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* ==========================================
   UTILITY CLASSES FOR FRONT PAGE
   ========================================== */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-gold), #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass-card {
    background: rgba(25, 24, 23, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(242, 201, 76, 0.1);
}

/* Glow effect */
.glow-gold {
    box-shadow: 0 0 20px rgba(242, 201, 76, 0.3);
}

.glow-gold:hover {
    box-shadow: 0 0 30px rgba(242, 201, 76, 0.5);
}
