/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    /* Increase button tap targets for mobile */
    button, .btn, a.btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve modal sizing on mobile */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Stack form inputs on mobile */
    .grid {
        gap: 1rem;
    }

    /* Make cards more compact on mobile */
    .product-card {
        padding: 1rem;
    }

    /* Adjust text sizes for better mobile readability */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p, span, div {
        font-size: 0.95rem;
    }

    /* Smaller labels and badges on mobile */
    .text-xs {
        font-size: 0.7rem;
    }

    .text-sm {
        font-size: 0.8rem;
    }

    /* Adjust button text size */
    button, .btn {
        font-size: 0.9rem;
    }

    /* Make nav header more compact on mobile */
    .nav-header {
        padding: 12px;
        margin-bottom: 16px;
    }

    /* Make glass-effect cards more compact */
    .glass-effect {
        padding: 1rem !important;
    }

    /* Product card specific mobile styles */
    .product-list-item .relative.p-6 {
        padding: 1rem !important;
    }

    /* Product icon size on mobile */
    .product-list-item .w-16.h-16 {
        width: 3rem !important;
        height: 3rem !important;
    }

    /* Product title on mobile */
    .product-list-item h3 {
        font-size: 1.25rem !important;
    }

    /* Product price on mobile */
    .product-list-item .text-3xl {
        font-size: 1.5rem !important;
    }

    /* Product description on mobile */
    .product-list-item p {
        font-size: 0.8rem !important;
    }

    /* Delivery info section on mobile */
    .product-list-item .mb-6.p-3 {
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Badge sizes on mobile */
    .product-list-item .inline-flex {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
    }

    .product-list-item .inline-flex svg {
        width: 0.75rem !important;
        height: 0.75rem !important;
    }

    /* Button sizes on mobile - more compact */
    .product-list-item button {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
    }

    .product-list-item button svg {
        width: 1rem !important;
        height: 1rem !important;
    }

    /* Cart items on mobile */
    .cart-item {
        padding: 0.75rem !important;
    }

    /* Summary section on mobile */
    .cart-sidebar {
        padding: 1rem !important;
    }

    /* Delivery info icons on mobile */
    .product-list-item .w-5.h-5 {
        width: 1rem !important;
        height: 1rem !important;
    }

    /* Product info section margin adjustments */
    .product-list-item .mb-6 {
        margin-bottom: 1rem !important;
    }

    .product-list-item .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    /* Price and action section on mobile - stack vertically */
    .product-list-item .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .product-list-item .flex.items-center.justify-between button {
        width: 100%;
        justify-content: center;
    }

    /* Modal content on mobile */
    #payment-modal .grid {
        grid-template-columns: 1fr !important;
    }

    /* Form inputs on mobile */
    input[type="text"],
    input[type="number"],
    textarea,
    select {
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }

    /* Subscription checkbox on mobile */
    .subscription-checkbox-wrapper {
        padding: 0.75rem !important;
    }

    .checkbox-custom {
        height: 20px !important;
        width: 20px !important;
    }

    .checkbox-custom::after {
        width: 10px !important;
        height: 10px !important;
    }
}

/* For Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* For Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.product-card {
    background: #2a2a2a;
    /* Subtle depth for product cards */
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    /* Keep a tiny lift without adding new shadows */
    transform: translateY(-2px);
}

/* Subtle pulse animation for installation badge */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Staggered slide-up animations */
@keyframes slide-up-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-list-item {
    animation: slide-up-fade 0.5s ease-out forwards;
    opacity: 0;
    border: none !important;
    outline: none;
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Button press effect */
.btn-press:active {
    transform: scale(0.95);
}

.product-card:hover::before {
    opacity: 1;
}

.btn-primary {
    background: #dc2626;
    /* Cleaner buttons – remove extra glow */
    box-shadow: none;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Add to cart button with white border */
.btn-add-to-cart {
    background: #dc2626;
    border-radius: 9999px;
    padding: 10px 24px;
    font-weight: 500;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: none;
}

.btn-add-to-cart:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #dc2626cc;
}

.cart-item {
    background: #2a2a2a;
    /* Flatter cart items */
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.4);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #333333;
    transform: translateX(4px);
}

.step-indicator {
    background: #2a2a2a;
    box-shadow: none;
    padding: 24px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step.active {
    background: #dc2626;
    color: white;
}

.step.completed {
    background: #666666;
    color: white;
}

.floating-cart {
    background: #2a2a2a;
    box-shadow: none;
    padding: 20px;
    z-index: 1000;
    max-width: 300px;
    transition: all 0.3s ease;
}

.quantity-control {
    display: flex;
    align-items: center;
    background: #333333;
    box-shadow: none;
    padding: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    box-shadow: none;
    background: #dc2626;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #dc2626cc;
    transform: scale(1.1);
}

.price-tag {
    background: #dc2626;
    color: white;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: none;
}

.shipping-selector {
    background: #2a2a2a;
    box-shadow: none;
    padding: 16px;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: radial-gradient(circle at top, #1f2933, #0b0f19);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    border-radius: 1.25rem;
    padding: 1.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Unified payment status views (processing, success, redirect) */
.payment-status-view {
    display: none;
    padding: 2rem 0;
    text-align: center;
}

.payment-status-view:not(.hidden) {
    display: block;
}

.payment-status-card {
    max-width: 640px;
    margin: 0 auto;
    background: radial-gradient(circle at top, rgba(31, 41, 55, 0.9), rgba(15, 23, 42, 0.96));
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.payment-status-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 40px rgba(15, 23, 42, 0.9);
}

.payment-status-icon.success {
    background: rgba(22, 163, 74, 0.15);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4), 0 0 40px rgba(22, 163, 74, 0.4);
}

.payment-status-icon.processing {
    background: rgba(220, 38, 38, 0.12);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.45), 0 0 40px rgba(220, 38, 38, 0.45);
}

.payment-status-icon.redirect {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.45);
}

.payment-status-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 0.5rem;
}

.payment-status-text {
    font-size: 0.95rem;
    color: #e5e7eb;
    margin-bottom: 1.75rem;
}

.payment-status-info {
    background: rgba(37, 99, 235, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 1rem 1.25rem;
    margin: 0 auto 1.75rem auto;
    max-width: 480px;
}

.payment-status-info-title {
    color: #bfdbfe;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.payment-status-info-text {
    color: #e5e7eb;
    font-size: 0.85rem;
}

.payment-status-redirect-text {
    font-size: 0.9rem;
    color: #f97373;
    text-align: center;
    animation: pulse-success 1.3s ease-in-out infinite;
}

.payment-status-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.payment-status-dots span {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 9999px;
    background: #dc2626;
    opacity: 0.7;
    animation: pulse 1.4s infinite ease-in-out;
}

.payment-status-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.payment-status-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

/* Animation keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -10px, 0);
    }

    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -5px, 0);
    }

    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-3px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(3px);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-slide-up {
    animation: slideInUp 0.3s ease-out;
}

.animate-bounce {
    animation: bounce 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 0.3s ease-out;
}

.animate-shake {
    animation: shake 0.5s ease-out;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.3s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.3s ease-out;
}

/* Hover animations */
.hover-lift:hover {
    transform: translateY(-4px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgb(253 26 26 / 15%);
    transition: box-shadow 0.3s ease;
}

/* Button press animation */
.btn-press:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-button {
    background: #2a2a2a;
    box-shadow: none;
    color: white;
    padding: 12px 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dropdown-button:hover {
    background: #333333;
    transform: translateY(-1px);
}

.dropdown-button.active {
    box-shadow: 0 0 0 2px rgb(253 26 26 / 15%);
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    color: #dc2626;
}

.dropdown-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    box-shadow: none;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.dropdown-menu.active {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dropdown-option {
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #333333;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #dc2626;
    color: white;
    transform: translateX(4px);
}

.dropdown-option.selected {
    background: #dc2626;
    color: white;
    position: relative;
}

.dropdown-option.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}
.nav-header {
    background: var(--bg-primary);
    box-shadow: none;
    padding: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
    backdrop-filter: blur(10px);
}

/* Unified dark footer */
.cp-footer {
    background: #111111;
    border-top: 1px solid rgba(55, 65, 81, 0.6);
    width: 100%;
}

/* Subscription Toggle Enhanced */
.subscription-container {
    background: #1a1a1a;
    box-shadow: none;
    padding: 20px;
    transition: all 0.3s ease;
}

.subscription-container:hover {
    background: #252525;
    ;
    transform: translateY(-1px);
}

.subscription-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.subscription-checkbox-wrapper:hover {
    background-color: rgba(220, 38, 38, 0.05);
}

/* Hide the default checkbox */
.styled-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom checkbox - red circle */
.checkbox-custom {
    position: relative;
    height: 24px;
    width: 24px;
    background-color: transparent;
    box-shadow: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Checkbox hover effect */
.subscription-checkbox-wrapper:hover .checkbox-custom {
    background-color: rgba(220, 38, 38, 0.1);
    ;
}

/* White center circle (hidden when unchecked) */
.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
}

/* Show white center when checked */
.styled-checkbox:checked ~ .checkbox-custom {
    background-color: #dc2626;
    ;
}

.styled-checkbox:checked ~ .checkbox-custom::after {
    display: block;
}

/* Focus state for accessibility */
.styled-checkbox:focus ~ .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Sidebar Enhancements */
.cart-sidebar {
    background: #2a2a2a;
    /* Flatter sidebar, consistent with product cards */
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.cart-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.cart-header {
    
    margin-bottom: 24px;
}

.cart-count-badge {
    background: #dc2626;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cart-count-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgb(253 26 26 / 15%);
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h3 {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-size: 13px;
    
    padding-left: 12px;
}

.cart-totals {
    padding-top: 12px;
    margin-bottom: 20px;
}

/* Better vertical rhythm inside cart sidebar */
.cart-sidebar .summary-section + .summary-section {
    margin-top: 8px;
}

.cart-sidebar .grid {
    row-gap: 0.75rem;
    column-gap: 0.75rem;
}

/* Modal & cart responsiveness tweaks */
@media (max-width: 1024px) {
    .cart-sidebar {
        padding: 1.25rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    #payment-modal .grid {
        row-gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .cart-sidebar {
        padding: 1rem;
    }

    .cart-header h2 {
        font-size: 1.5rem;
    }

    .summary-section h3 {
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }

    .modal-content {
        padding: 1.25rem;
    }

    #payment-modal .grid {
        row-gap: 1.25rem;
    }
}

/* Payment Modal Animations */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Payment view transitions */
#payment-modal-content > div {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#payment-modal-content > div.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Success checkmark pulse */
#payment-success-view svg {
    animation: pulse-success 0.6s ease 0.5s;
}

@keyframes pulse-success {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}