@keyframes rotate404 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.animate-rotate404 {
    animation: rotate404 2.5s linear infinite;
    display: inline-block;
}
/* === 404 Page Animations === */
@keyframes float404 {
    0% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
    100% { transform: translateY(0); }
}
@keyframes fadeInUp404 {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
.animate-float404 { animation: float404 3s ease-in-out infinite; }
.animate-fadeInUp404 { animation: fadeInUp404 1s cubic-bezier(.39,.575,.565,1) both; }
/*
Theme Name: Alli They Bike
Author: Mustafa
Description: WooCommerce-ready custom bike shop theme for Allithey Bikes.
Version: 1.0
Text Domain: allitheybikes
*/


body {
    font-family: 'Almarai', 'Lexend', sans-serif;
    background-color: #ffffff;
    color: #0f172a;
    /* Page-level animations are handled via GSAP (see js/animations.js) */
}

img {
    max-width: 100%;
    height: auto;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.size-9,
.size-10,
.size-12 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.size-9 {
    width: 2.25rem;
    height: 2.25rem;
}

.size-10 {
    width: 2.5rem;
    height: 2.5rem;
}

.size-12 {
    width: 3rem;
    height: 3rem;
}

.shadow-card {
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.bg-background-off {
    background-color: #f8fafc;
}

/* === Smooth Animations === */

/* Sticky aside filter with scroll, stops before footer */
.shop-filters-sticky {
    position: sticky;
    top: 2rem; /* or use top-32 if tailwind, else 2rem */
    max-height: calc(100vh - 2rem - 120px); /* 120px = footer height estimate, adjust as needed */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

@media (max-width: 1023px) {
    .shop-filters-sticky {
        position: static;
        max-height: none;
        overflow: visible;
    }
    }
@keyframes pageFadeIn {

    
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }


}

@keyframes sectionFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .section-animate {
    /* Used as a GSAP hook. Don't visually hide by default. */
*/

body.animations-ready {
    overflow-x: hidden;
}

.reveal-ready {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-ready.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-item.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-image-float {
    animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-ready,
    .reveal-item,
    .hero-image-float {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

.category-card {
    height: 140px; /* keep category tiles same height on all breakpoints */
    box-sizing: border-box;
}

/* Prevent label wrapping so tile height stays consistent */
.category-card > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product .product-card .p-4 {
    flex: 1;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    display: inline-flex;
    align-items: center;
}

.woocommerce .woocommerce-ordering select {
    border-radius: 9999px;
}

.woocommerce .woocommerce-ordering {
    gap: 0.75rem;
}

/* Local SVG Icons Styling */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    color: inherit;
}

.icon[class*="text-"] {
    width: auto;
    height: auto;
}

/* Icon size utilities */
.text-xs .icon{
    width: 0.75rem;
    height: 0.75rem;
}

.text-sm .icon {
    width: 0.875rem;
    height: 0.875rem;
}

.text-base .icon {
    width: 1rem;
    height: 1rem;
}

.text-lg .icon {
    width: 1.125rem;
    height: 1.125rem;
}

.text-xl .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.text-2xl .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.text-\[20px\] .icon {
    width: 20px;
    height: 20px;
}

.text-\[24px\] .icon {
    width: 24px;
    height: 24px;
}

.text-\[26px\] .icon {
    width: 26px;
    height: 26px;
}

/* زر عرض السلة بعد الإضافة */
.added_to_cart.wc-forward { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 11px; 
  font-weight: bold; 
  background: #020381; 
  color: #fff; 
  padding: 6px 10px; 
  border-radius: 999px; 
  margin-right: 6px; 
  transition: all 0.3s ease; 
  white-space: nowrap; 
}

/* Hover */
.added_to_cart.wc-forward:hover {
  background: #0284c7;
}

/* Animation */
.added_to_cart.wc-forward {
  animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile تحسين */
@media (max-width: 640px) {
  .added_to_cart.wc-forward {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* اخفاء زر add to cart لما يظهر next link */
.add_to_cart_button + .added_to_cart.wc-forward {
  display: inline-flex;
}

/* اخفاء زر الإضافة نفسه */
.add_to_cart_button.ajax_add_to_cart {
  transition: all 0.3s ease;
}

/* لما يظهر "added_to_cart" نخفي الأول */
.add_to_cart_button.ajax_add_to_cart:has(+ .added_to_cart.wc-forward) {
  display: none;
}

#main-product-image {
  /* Add transform to the transition for smooth scaling */
  transition: opacity 0.2s ease-in-out, transform 0.3s ease-out;
}

#main-product-image:hover {
  transform: scale(1.05); /* Adjust zoom level as needed (1.05 = 5%, 1.1 = 10%, etc.) */
}


@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }


.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 768px) {
    .mobile-only  { display: none !important; }
    .desktop-only { display: block !important; }
}


/* Wishlist Button - Mobile Fixes */
[data-wishlist-btn] {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0); /* Force GPU layer for smooth taps */
}

/* Ensure parent card allows overflow for absolute button */
.product-card-wrapper, 
[data-product-card] {
    position: relative !important;
    overflow: visible !important; /* Or use overflow: hidden with padding */
}

/* Optional: Slightly larger tap target on mobile */
@media (max-width: 768px) {
    [data-wishlist-btn] {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    [data-wishlist-btn] .material-symbols-outlined {
        font-size: 1.25rem !important;
    }
}




/* ===== Cart Quantity Controls ===== */
.woocommerce-cart-form .qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  direction: ltr;
}

.woocommerce-cart-form .qty-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.woocommerce-cart-form .qty-input::-webkit-outer-spin-button,
.woocommerce-cart-form .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom +/- buttons (we'll add via JS) */
.qty-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 150ms ease-in-out;
}

.qty-btn:hover {
  background-color: #f7fafc;
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-btn .material-symbols-outlined {
  font-size: 20px;
}

/* Summary scroll */
#order-summary .cart_list {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#order-summary .cart_list::-webkit-scrollbar {
  width: 6px;
}

#order-summary .cart_list::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 0.25rem;
}
/* Loading animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.opacity-60 {
  animation: pulse 1.5s ease-in-out infinite;
}


/* Style the default cart totals table */
.woocommerce-cart-form__contents {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.woocommerce-cart-form__contents th,
.woocommerce-cart-form__contents td {
  border-bottom: 1px solid #f3f4f6;
  padding: 1rem;
}

.cart_totals {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  position: sticky;
  top: 8rem;
}

.cart_totals h2 {
  @apply text-xl font-bold text-gray-900 mb-6;
}

.cart_totals table.shop_table {
  @apply w-full text-sm;
}

.cart_totals table.shop_table td,
.cart_totals table.shop_table th {
  @apply py-2;
}

.cart_totals .order-total td,
.cart_totals .order-total th {
  @apply text-lg font-bold border-t border-gray-200 pt-3;
}

.cart_totals .order-total .amount {
  @apply text-primary;
}







/* ===== WooCommerce My Account Content Styling ===== */
.woocommerce-MyAccount-content-wrapper {
    --wc-primary: theme('colors.primary.DEFAULT');
    --wc-gray-50: #f9fafb;
    --wc-gray-100: #f3f4f6;
    --wc-gray-200: #e5e7eb;
    --wc-gray-300: #d1d5db;
    --wc-gray-600: #4b5563;
    --wc-gray-700: #374151;
    --wc-gray-900: #111827;
}

/* Tables (Orders, Addresses) */
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}
.woocommerce-MyAccount-content th {
    background: var(--wc-gray-50);
    padding: 0.75rem 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--wc-gray-700);
    border-bottom: 2px solid var(--wc-gray-200);
}
.woocommerce-MyAccount-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wc-gray-100);
    color: var(--wc-gray-600);
}
.woocommerce-MyAccount-content tr:hover td {
    background: var(--wc-gray-50);
}

/* Forms (Edit Account, Add Address) */
.woocommerce-MyAccount-content .woocommerce-form-row {
    margin-bottom: 1rem;
}
.woocommerce-MyAccount-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--wc-gray-700);
}
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--wc-gray-300);
    border-radius: 0.5rem;
    background: var(--wc-gray-50);
    transition: all 0.2s;
}
.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
    outline: none;
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 3px rgba(var(--wc-primary), 0.2);
    background: #fff;
}

/* Buttons */
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    background: var(--wc-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content .button:hover {
    filter: brightness(0.9);
}

/* Notices / Messages */
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-info {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}
.woocommerce-MyAccount-content .woocommerce-message {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.woocommerce-MyAccount-content .woocommerce-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.woocommerce-MyAccount-content .woocommerce-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Address Cards */
.woocommerce-MyAccount-content address {
    font-style: normal;
    line-height: 1.6;
    color: var(--wc-gray-700);
}

/* Responsive Tables */
@media (max-width: 768px) {
    .woocommerce-MyAccount-content table,
    .woocommerce-MyAccount-content thead,
    .woocommerce-MyAccount-content tbody,
    .woocommerce-MyAccount-content th,
    .woocommerce-MyAccount-content td,
    .woocommerce-MyAccount-content tr {
        display: block;
    }
    .woocommerce-MyAccount-content thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    .woocommerce-MyAccount-content tr {
        margin-bottom: 1rem;
        border: 1px solid var(--wc-gray-200);
        border-radius: 0.5rem;
        padding: 0.5rem;
    }
    .woocommerce-MyAccount-content td {
        border: none;
        border-bottom: 1px solid var(--wc-gray-100);
        position: relative;
        padding-right: 50%;
    }
    .woocommerce-MyAccount-content td::before {
        content: attr(data-title);
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: var(--wc-gray-700);
    }
}




