/* ========================================
   Indicator Pro - Main Styles (Final)
   ======================================== */

:root {
  --ip-primary: #6366f1;
  --ip-primary-dark: #4f46e5;
  --ip-success: #10b981;
  --ip-danger: #ef4444;
  --ip-warning: #f59e0b;
  --ip-dark: #1e293b;
  --ip-gray: #64748b;
  --ip-light: #f8fafc;
  --ip-border: #e2e8f0;
  --ip-radius: 12px;
  --ip-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

.ip-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   FLOATING CART BUTTON
   ======================================== */
.ip-cart-float-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ip-primary), #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}
.ip-cart-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6);
    color: white;
}
.ip-cart-float-btn .ip-cart-icon {
    display: block;
    transition: transform 0.3s ease;
}
.ip-cart-float-btn:hover .ip-cart-icon {
    transform: scale(1.1) rotate(-10deg);
}
.ip-cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--ip-danger);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    animation: ipCartBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes ipCartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   CART PAGE STYLES
   ======================================== */
.ip-cart-page-wrapper {
    background: #f8fafc;
    min-height: 80vh;
    padding: 40px 0;
}
.ip-cart-page-container {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    color: #0f172a;
}
.ip-cart-page-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 30px;
    color: var(--ip-dark);
}
.ip-cart-page-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}
.ip-cart-page-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ip-cart-page-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--ip-radius);
    border: 1px solid var(--ip-border);
    box-shadow: var(--ip-shadow);
    align-items: center;
}
.ip-cart-page-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ip-light);
    flex-shrink: 0;
}
.ip-cart-page-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ip-cart-page-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; font-size: 40px; opacity: 0.5;
}
.ip-cart-page-item-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.5;
}
.ip-cart-page-item-info h3 a {
    color: var(--ip-dark);
    text-decoration: none;
    transition: color 0.2s;
}
.ip-cart-page-item-info h3 a:hover {
    color: var(--ip-primary);
}
.ip-cart-page-item-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-gray);
}
.ip-cart-page-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.ip-cart-page-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ip-border);
    border-radius: 8px;
    overflow: hidden;
}
.ip-qty-btn {
    width: 34px;
    height: 34px;
    background: var(--ip-light);
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--ip-dark);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ip-qty-btn:hover {
    background: var(--ip-primary);
    color: white;
}
.ip-qty-input {
    width: 50px;
    height: 34px;
    border: none;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    background: white;
    color: var(--ip-dark);
    -moz-appearance: textfield;
}
.ip-qty-input::-webkit-outer-spin-button,
.ip-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ip-cart-page-item-subtotal {
    font-size: 16px;
    font-weight: 800;
    color: var(--ip-success);
}
.ip-cart-page-item-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.ip-cart-page-item-remove:hover {
    background: var(--ip-danger);
    color: white;
}

/* Sidebar Summary */
.ip-cart-sidebar-col {
    position: sticky;
    top: 100px;
}
.ip-cart-summary-box {
    background: white;
    border-radius: var(--ip-radius);
    padding: 24px;
    border: 1px solid var(--ip-border);
    box-shadow: var(--ip-shadow);
}
.ip-cart-summary-box h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ip-border);
}
.ip-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}
.ip-cart-summary-row span { color: var(--ip-gray); }
.ip-cart-summary-row strong { color: var(--ip-dark); font-weight: 700; }
.ip-cart-total-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--ip-success) !important;
}
.ip-cart-summary-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ip-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ip-cart-clear-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--ip-danger);
    border: 2px solid #fecaca;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.ip-cart-clear-btn:hover {
    background: var(--ip-danger);
    color: white;
    border-color: var(--ip-danger);
}

/* Empty & Login Required */
.ip-cart-empty-page, .ip-cart-login-required {
    text-align: center;
    padding: 80px 30px;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--ip-border);
    box-shadow: var(--ip-shadow);
}
.ip-cart-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}
.ip-cart-empty-page h2, .ip-cart-login-required h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--ip-dark);
    margin: 0 0 10px;
}
.ip-cart-empty-page p, .ip-cart-login-required p {
    color: var(--ip-gray);
    font-size: 15px;
    margin: 0 0 30px;
}

/* Buttons */
.ip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}
.ip-btn-primary { background: var(--ip-primary); color: white; }
.ip-btn-primary:hover { background: var(--ip-primary-dark); color: white; }
.ip-btn-success { background: var(--ip-success); color: white; }
.ip-btn-success:hover { background: #059669; color: white; }
.ip-btn-lg { padding: 15px 30px; font-size: 16px; width: 100%; }

/* Responsive */
@media (max-width: 900px) {
    .ip-cart-page-layout {
        grid-template-columns: 1fr;
    }
    .ip-cart-sidebar-col {
        position: static;
    }
}
@media (max-width: 600px) {
    .ip-cart-float-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    .ip-cart-page-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas: "image info" "actions actions";
        gap: 15px;
    }
    .ip-cart-page-item-image { grid-area: image; width: 80px; height: 80px; }
    .ip-cart-page-item-info { grid-area: info; }
    .ip-cart-page-item-actions {
        grid-area: actions;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed var(--ip-border);
    }
}