/* assets/css/cart.css - Black & Orange Theme for Shopping Cart Page */

:root {
    --orange-primary: #ff9900;
    --orange-dark: #e47911;
    --orange-light: #ffb347;
    --black-primary: #1a1a1a;
    --black-secondary: #2d2d2d;
    --black-light: #404040;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #999999;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--black-primary);
    color: var(--white);
    line-height: 1.6;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--black-secondary) 0%, var(--black-primary) 100%) !important;
    border-bottom: 2px solid var(--orange-primary);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
    min-height: 70px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.navbar-brand {
    color: var(--orange-primary) !important;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.navbar-brand i {
    color: var(--orange-primary);
    font-size: 1.5rem;
}

/* ===== NAVBAR TOGGLER - MOBILE ONLY ===== */
.navbar-toggler {
    display: none !important;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark)) !important;
    border: 2px solid var(--orange-light) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3) !important;
    z-index: 1;
}

.navbar-toggler:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.5) !important;
    background: linear-gradient(135deg, var(--orange-dark), var(--orange-primary)) !important;
}

.navbar-toggler:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.3) !important;
}

.navbar-toggler-icon {
    display: inline-block !important;
    width: 1.5em !important;
    height: 1.5em !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 26, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 1.5em !important;
}

/* Show toggler only on mobile/tablet */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: flex !important;
    }
}

/* ===== NAVBAR COLLAPSE ===== */
.navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Desktop layout */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-direction: row;
        background: transparent !important;
        box-shadow: none !important;
        margin-top: 0 !important;
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
    }
}

/* Mobile layout */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        background: var(--black-secondary);
        border: 1px solid var(--gray-dark);
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        margin-top: 0.5rem;
        z-index: 1020;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
    }
}

/* ===== NAVIGATION LINKS ===== */
.navbar-nav {
    display: flex;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        margin-left: auto;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin: 0;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .navbar-nav::-webkit-scrollbar {
        width: 5px;
    }
    
    .navbar-nav::-webkit-scrollbar-track {
        background: var(--black-light);
        border-radius: 10px;
    }
    
    .navbar-nav::-webkit-scrollbar-thumb {
        background: var(--orange-primary);
        border-radius: 10px;
    }
}

.nav-item {
    position: relative;
    margin: 0.125rem 0;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        white-space: nowrap;
    }
    
    .navbar-nav .nav-link:hover {
        transform: translateY(-2px);
        color: var(--orange-primary) !important;
        background-color: var(--black-light);
    }
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--gray-dark);
        white-space: normal;
        width: 100%;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link:hover {
        transform: translateX(5px);
        color: var(--orange-primary) !important;
        background-color: var(--black-light);
    }
}

.navbar-nav .nav-link i {
    color: var(--orange-primary);
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Cart Badge */
.badge-cart {
    background: var(--orange-primary) !important;
    color: var(--black-primary) !important;
    font-weight: 700;
    margin-left: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 50px;
}

@media (max-width: 991.98px) {
    .badge-cart {
        margin-left: auto;
    }
}

/* ===== DROPDOWN MENU ===== */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    color: var(--orange-primary);
    transition: transform 0.3s ease;
}

@media (min-width: 992px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        display: none;
        min-width: 240px;
        padding: 0.5rem;
        margin: 0.125rem 0 0;
        background-color: var(--black-secondary);
        border: 1px solid var(--gray-dark);
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
        list-style: none;
    }
    
    .dropdown-menu.show {
        display: block;
    }
    
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: var(--black-light);
        border: none;
        border-radius: 6px;
        box-shadow: none;
        padding: 0 0 0 1rem;
        list-style: none;
        display: none;
    }
    
    .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
}

@media (min-width: 992px) {
    .dropdown-item {
        white-space: nowrap;
    }
}

@media (max-width: 991.98px) {
    .dropdown-item {
        white-space: normal;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--gray-dark);
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
}

.dropdown-item:hover {
    background-color: var(--black-light);
    color: var(--orange-primary);
    transform: translateX(5px);
}

.dropdown-item .badge {
    background-color: var(--orange-primary) !important;
    color: var(--black-primary);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ===== SEARCH FORM ===== */
.navbar form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

@media (min-width: 992px) {
    .navbar form {
        margin: 0 auto;
    }
}

@media (max-width: 991.98px) {
    .navbar form {
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .navbar form {
        max-width: 300px;
    }
}

.navbar .form-control {
    background-color: var(--black-light);
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    color: var(--white);
    padding: 0.6rem 1rem;
    transition: var(--transition);
    flex: 1;
}

.navbar .form-control:focus {
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
    outline: none;
    background-color: var(--black-secondary);
}

.navbar .btn-outline-primary {
    border: 2px solid var(--orange-primary);
    color: var(--orange-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
    background: transparent;
    white-space: nowrap;
}

.navbar .btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* ===== MAIN CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* ===== CART HEADER ===== */
h1 {
    color: var(--orange-primary) !important;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-dark);
}

h1 i {
    color: var(--orange-primary);
}

/* ===== EMPTY CART STATE ===== */
.text-center.py-5 {
    background: var(--black-secondary);
    border-radius: 12px;
    padding: 4rem 2rem !important;
    border: 1px solid var(--gray-dark);
}

.text-center.py-5 i {
    color: var(--orange-primary) !important;
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.text-center.py-5 h3 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.text-center.py-5 p {
    color: var(--gray-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--orange-dark), var(--orange-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== CART GRID ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.g-4 {
    margin: 0 -1rem;
}

.g-4 > [class*="col-"] {
    padding: 0 1rem;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

@media (max-width: 992px) {
    .col-lg-8, .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== CART ITEMS CARD ===== */
.card {
    background: var(--black-secondary);
    border: 1px solid var(--gray-dark);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

/* Cart Item Row */
.row.align-items-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 -10px;
}

.row.align-items-center > [class*="col-"] {
    padding: 0 10px;
}

.border-bottom {
    border-bottom: 1px solid var(--gray-dark) !important;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.pb-4 {
    padding-bottom: 1.5rem;
}

/* Product Image */
.col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--gray-dark);
    transition: var(--transition);
}

.img-fluid:hover {
    transform: scale(1.05);
    border-color: var(--orange-primary);
}

.bg-light {
    background-color: var(--black-light) !important;
    border-radius: 8px;
}

/* Product Info */
.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

h5 a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

h5 a:hover {
    color: var(--orange-primary);
}

.small.text-muted {
    color: var(--gray-light) !important;
    font-size: 0.875rem;
}

/* Quantity Input */
.col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.form-label.small {
    color: var(--white);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    display: block;
}

.form-control {
    background-color: var(--black-light);
    border: 2px solid var(--gray-dark);
    border-radius: 6px;
    color: var(--white);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
    outline: none;
    background-color: var(--black-secondary);
}

.form-control-sm {
    height: calc(1.5em + 0.5rem + 4px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Price Display */
.fw-bold {
    font-weight: 700;
    color: var(--orange-primary) !important;
    font-size: 1.1rem;
}

.small.text-muted {
    color: var(--gray-light) !important;
    font-size: 0.8rem;
}

/* Remove Button */
.col-md-2.text-end {
    text-align: right;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger-red);
    color: var(--danger-red);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-outline-danger:hover {
    background: var(--danger-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Continue Shopping Button */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--orange-primary);
    color: var(--orange-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-primary:hover {
    background: var(--orange-primary);
    color: var(--black-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* ===== CART SUMMARY ===== */
.sticky-top {
    position: sticky;
    top: 100px;
    z-index: 1;
}

@media (max-width: 992px) {
    .sticky-top {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }
}

.card-title {
    color: var(--orange-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--orange-primary);
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--gray-light) !important;
}

.fw-bold {
    font-weight: 600;
    color: var(--white);
}

.text-success {
    color: var(--success-green) !important;
}

hr {
    border: none;
    border-top: 1px solid var(--gray-dark);
    margin: 1.5rem 0;
}

.h5 {
    font-size: 1.25rem;
    color: var(--white);
}

.h4 {
    font-size: 1.5rem;
    color: var(--orange-primary) !important;
}

/* Checkout Button */
.btn-primary.btn-lg {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    color: var(--white);
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-primary.btn-lg:hover {
    background: linear-gradient(135deg, var(--orange-dark), var(--orange-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Security Badges */
.text-center.small {
    margin-top: 1.5rem;
}

.text-center.small p {
    color: var(--gray-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.text-center.small i {
    color: var(--orange-primary);
}

/* ===== FOOTER ===== */
.bg-dark {
    background: linear-gradient(135deg, var(--black-primary), var(--black-secondary)) !important;
    border-top: 3px solid var(--orange-primary);
}

footer h5 {
    color: var(--orange-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

footer p, footer li {
    color: var(--gray-light) !important;
}

footer .text-white-50 {
    color: var(--gray-light) !important;
    transition: var(--transition);
}

footer .text-white-50:hover {
    color: var(--orange-primary) !important;
    transform: translateX(5px);
}

footer hr {
    background-color: var(--gray-dark) !important;
    opacity: 0.2;
}

footer .fab {
    transition: var(--transition);
    font-size: 1.2rem;
}

footer .fab:hover {
    color: var(--orange-primary) !important;
    transform: translateY(-3px);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Desktop (992px and above) */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        position: static;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
        position: absolute;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .col-lg-8, .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-md-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .col-md-4 {
        flex: 0 0 40%;
        max-width: 40%;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .row.align-items-center {
        position: relative;
        padding-bottom: 3rem;
    }
    
    .col-md-2, .col-md-4, .col-md-2.text-end {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
        text-align: left !important;
    }
    
    .col-md-2.text-end {
        position: absolute;
        bottom: 0;
        right: 0;
        width: auto;
    }
    
    .btn-outline-danger {
        position: absolute;
        bottom: 0;
        right: 0;
    }
    
    .img-fluid {
        max-width: 100px;
    }
}

/* Mobile Landscape */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar-collapse {
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .text-center.py-5 {
        padding: 2rem 1rem !important;
    }
    
    .text-center.py-5 i {
        font-size: 3rem;
    }
    
    .text-center.py-5 h3 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .col-md-2 {
        flex: 0 0 30%;
        max-width: 30%;
    }
    
    .col-md-4 {
        flex: 0 0 70%;
        max-width: 70%;
    }
    
    h5 {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .btn-outline-primary {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .fw-bold {
        font-size: 1rem;
    }
}

/* ===== UTILITIES ===== */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.border-0 {
    border: none;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 3rem;
}

/* Quantity input spinner removal */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .product-card:hover,
    .navbar-brand:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.96);
    }
}