/*
Theme Name: elink
Author: Your Name
Author URI: https://yourwebsite.com/
Description: A modern e-commerce theme for WooCommerce.
Version: 1.2.0
Requires at least: 5.0
Tested up to: 6.5
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: elink-theme
Tags: e-commerce, woocommerce, custom-header, custom-menu, featured-images, theme-options, threaded-comments, translation-ready
*/

body, html {
    font-family: 'Poppins', 'Inter', Arial, sans-serif !important;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom WooCommerce Styles */
.woocommerce div.product form.cart .single_add_to_cart_button {
    @apply w-full bg-pink-600 text-white font-bold py-3 px-4 rounded-lg hover:bg-pink-700 transition-colors duration-200;
}
.woocommerce div.product form.cart .quantity {
    @apply mr-4;
}

.woocommerce .woocommerce-breadcrumb {
    @apply text-sm text-gray-500 mb-6;
}
.woocommerce .woocommerce-breadcrumb a {
    @apply hover:text-pink-600;
}
.woocommerce .woocommerce-breadcrumb .delimiter {
    @apply mx-2;
}

/* --- General Form & Button Styles --- */
.woocommerce .form-row .input-text, 
.woocommerce-page .form-row .input-text,
.woocommerce form .form-row > label,
.woocommerce-page form .form-row > label {
    @apply text-gray-700;
}
.woocommerce form .form-row .input-text, 
.woocommerce-page form .form-row .input-text,
.woocommerce select,
.woocommerce textarea {
    @apply block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-pink-500 focus:border-pink-500 sm:text-sm;
}

/* City loader select styling */
select[name="billing_city"], 
select[name="shipping_city"],
#billing_city,
#shipping_city {
    @apply block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-pink-500 focus:border-pink-500 sm:text-sm;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button,
.woocommerce-page #respond input#submit, 
.woocommerce-page a.button, 
.woocommerce-page button.button, 
.woocommerce-page input.button {
    @apply bg-pink-600 text-white font-bold py-2 px-4 rounded-lg hover:bg-pink-700 transition-colors duration-200;
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    @apply bg-gray-800 hover:bg-gray-900;
}


/* --- Notices --- */
.woocommerce-info, .woocommerce-message, .woocommerce-error {
    @apply border-t-4 rounded-b px-4 py-3 shadow-md mb-6;
}
.woocommerce-info {
    @apply bg-blue-100 border-blue-500 text-blue-900;
}
.woocommerce-message {
    @apply bg-green-100 border-green-500 text-green-900;
}
.woocommerce-error {
    @apply bg-red-100 border-red-500 text-red-900;
}

/* --- Cart & Checkout Tables --- */
.woocommerce table.shop_table {
    @apply w-full border-collapse rounded-lg shadow-md;
}
.woocommerce table.shop_table thead {
    @apply bg-gray-50;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td {
    @apply p-4 text-left border-b border-gray-200;
}
.woocommerce table.shop_table .product-thumbnail img {
    @apply w-16 h-16 object-cover rounded-md;
}
.woocommerce-cart-form__contents .actions {
    @apply text-right;
}
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
    @apply w-full md:w-1/2 float-right p-6 bg-gray-50 rounded-lg mt-8;
}
.woocommerce .cart-collaterals .cart_totals h2 {
    @apply text-2xl font-bold mb-4;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    @apply block text-center w-full;
}

/* --- My Account Page --- */
.woocommerce-account .woocommerce-MyAccount-navigation {
    @apply w-full md:w-1/4 float-left mr-8 mb-8;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    @apply list-none p-0 m-0 border border-gray-200 rounded-lg;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    @apply border-b border-gray-200;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
    @apply border-b-0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    @apply block py-3 px-4 text-gray-700 hover:bg-gray-50 hover:text-pink-600;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    @apply bg-gray-100 font-bold text-pink-600;
}

.woocommerce-account .woocommerce-MyAccount-content {
    @apply w-full md:w-3/4 float-right;
}

/* Loader spinner for AJAX cart */
.loader {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #7d41f5;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

/* Sticky subcategory bar fix: ensure all parents allow sticky positioning */
body, main, .container {
  overflow: visible !important;
}

/* Custom color overrides - replacing pink with #002855 */
.bg-pink-100 {
  background-color: #e6eef7 !important;
}
.bg-pink-50 {
  background-color: #f2f7fc !important;
}
.bg-pink-200 {
  background-color: #cce0f0 !important;
}
.bg-pink-600 {
  background-color: #11eb9a !important;
}
.bg-pink-700 {
  background-color: #11eb9a !important;
}

.text-pink-500 {
  color: #002855 !important;
}
.text-pink-600 {
  color: #002855 !important;
}
.text-pink-700 {
  color: #001f42 !important;
}
.text-pink-800 {
  color: #001a38 !important;
}

.hover\:bg-pink-50:hover {
  background-color: #f2f7fc !important;
}
.hover\:bg-pink-100:hover {
  background-color: #e6eef7 !important;
}
.hover\:bg-pink-700:hover {
  background-color: #001f42 !important;
}

.hover\:text-pink-500:hover {
  color: #002855 !important;
}
.hover\:text-pink-600:hover {
  color: #002855 !important;
}
.hover\:text-pink-700:hover {
  color: #001f42 !important;
}

.focus\:ring-pink-200:focus {
  --tw-ring-color: #e6eef7 !important;
}
.focus\:ring-pink-500:focus {
  --tw-ring-color: #002855 !important;
}
.focus\:border-pink-500:focus {
  border-color: #002855 !important;
}

.shadow-pink-200 {
  --tw-shadow-color: #e6eef7 !important;
  box-shadow: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -2px var(--tw-shadow-color) !important;
}

.woocommerce-privacy-policy-text {
    font-size: 11px;
    font-weight: 200;
    color: #002855;
    padding: 10px;
}

.wc_payment_methods.payment_methods.methods {
    padding: 16px;
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #adbbf1;
    border-radius: 0.5rem !important;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    font-size: 14px;
    color: #002855;
    font-weight: 300;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
    color: #b0b8c9;
    opacity: 1;
    font-weight: 400;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder,
select::-webkit-input-placeholder {
    color: #b0b8c9;
}
input:-moz-placeholder,
textarea:-moz-placeholder,
select:-moz-placeholder {
    color: #b0b8c9;
}
input::-moz-placeholder,
textarea::-moz-placeholder,
select::-moz-placeholder {
    color: #b0b8c9;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder,
select:-ms-input-placeholder {
    color: #b0b8c9;
}

/* Custom font weight overrides - making secondary fonts thinner */
.font-semibold {
  font-weight: 400 !important; /* Changed from 600 to 400 for thinner appearance */
}

.font-medium {
  font-weight: 300 !important; /* Changed from 500 to 300 for thinner appearance */
}

/* Specific overrides for product titles and secondary headings */
h4.font-semibold,
.product-title,
.category-name {
  font-weight: 400 !important;
}

/* Make product prices slightly less bold */
.price .font-bold {
  font-weight: 500 !important; /* Slightly less bold than 700 */
}

/* Cart quantity numbers - keep readable but less bold */
.elink-cart-qty-num {
  font-weight: 500 !important;
}

/* Category and navigation items */
.nav-item,
.category-item {
  font-weight: 400 !important;
}

/* Form labels and secondary text */
label,
.secondary-text {
  font-weight: 300 !important;
}

/* Product brand names */
.product-brand {
  font-weight: 400 !important;
}

/* Sale badges - keep bold for visibility */
.sale-badge,
.discount-badge {
  font-weight: 600 !important;
}

/* Keep primary headings bold */
h1, h2, h3 {
  font-weight: 700 !important;
}

/* But make h4 and h5 thinner */
h4, h5 {
  font-weight: 500 !important;
}

/* Product titles in cards */
.product-card h4 {
  font-weight: 400 !important;
}

/* Category names in navigation */
.category-name {
  font-weight: 400 !important;
}

/* Price display - main price bold, secondary price normal */
.price-main {
  font-weight: 600 !important;
}

.price-secondary {
  font-weight: 400 !important;
}

/* Cart and checkout elements */
.cart-item-name {
  font-weight: 400 !important;
}

.cart-total {
  font-weight: 500 !important;
}

/* Form elements */
.form-label {
  font-weight: 300 !important;
}

.form-input::placeholder {
  font-weight: 300 !important;
}

/* Navigation and menu items */
.menu-item a {
  font-weight: 400 !important;
}

/* Footer headings */
.footer h5 {
  font-weight: 500 !important;
}

/* Search results */
.search-result-title {
  font-weight: 400 !important;
}

/* Related products */
.related-product-title {
  font-weight: 400 !important;
}

/* Similar products */
.similar-product-title {
  font-weight: 400 !important;
}

/* Z-Index Hierarchy - Fixed */
/* 
 * Z-Index Structure:
 * 1-9: Base elements
 * 10-19: Cart buttons and basic UI
 * 20-29: Overlays and modals
 * 30-39: Dropdowns and menus
 * 40-49: Sticky elements
 * 50+: Critical UI (dropdowns, notifications)
 */

/* Base elements */
.elink-cart-wrap {
    z-index: 10 !important;
    position: relative;
}

/* Out of Stock Overlay - should be above cart buttons */
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 10%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    z-index: 1 !important;
}

.out-of-stock-badge {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.out-of-stock-text {
    color: #dc2626;
    font-weight: bold;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Disabled button styles */
.elink-cart-add:disabled,
.elink-cart-add.opacity-50 {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Product categories dropdown - always on top */
.categories-dropdown,
.categories-dropdown *,
.categories-dropdown .absolute,
.categories-dropdown .absolute[class*="z-"] {
    z-index: 9999 !important;
}

.header .categories-dropdown {
    z-index: 9999 !important;
}

.header [x-data*="isOpen"] > div {
    z-index: 9999 !important;
}

/* Single Product Out of Stock Message */
.out-of-stock-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.out-of-stock-message .icon {
    color: #dc2626;
    margin-right: 0.5rem;
}

.out-of-stock-message .title {
    color: #991b1b;
    font-weight: 600;
    font-size: 1rem;
}

.out-of-stock-message .description {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Product title color customization */
h1,
h2,
h3,
h4.product-title,
h4.font-normal.product-title,
h4.font-semibold.product-title,
.product-title {
    color: #002855 !important;
}

/* Custom styles for Swiper pagination */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #d1d5db; /* A light gray */
    opacity: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.swiper-pagination-bullet-active {
    background-color: #ec4899; /* A vibrant pink */
    width: 24px; /* Elongated width for the active bullet */
    border-radius: 9999px;
}

/* Ensure swiper-slide has a flexible width for 'auto' slidesPerView */
.swiper-slide {
    width: 80%; /* Default width for smaller screens */
}

@media (min-width: 768px) {
    .swiper-slide {
        width: 24rem; /* Fixed width on larger screens */
    }
}

/* Hide WooCommerce My Account navigation only on dashboard */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-navigation {
  display: none;
}

/* More specific: Hide sidebar only on dashboard */
body.woocommerce-account .woocommerce-MyAccount-navigation {
  display: none;
}
body.woocommerce-account.woocommerce-account-dashboard .woocommerce-MyAccount-navigation {
  display: none;
}

/* Remove left space and make My Account content full width on all My Account pages */
.woocommerce-account .woocommerce-MyAccount-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none !important;
}
.woocommerce-account .woocommerce {
    display: block !important;
}