 /* Custom styles for Semantic UI E-Commerce Application */

/* Page visibility */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Navigation styles */
.nav-link {
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.nav-link.active {
    background-color: #2185d0 !important;
    color: white !important;
}

/* Mobile navigation */
.mobile-nav-link {
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.mobile-nav-link.active {
    background-color: #2185d0 !important;
    color: white !important;
}

/* Product card enhancements */
.ui.card {
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ui.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #2185d0;
}

.ui.card .image {
    overflow: hidden;
    border-radius: 0;
}

.ui.card .image img {
    transition: all 0.3s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ui.card:hover .image img {
    transform: scale(1.05);
}

.ui.card .content {
    flex: 1;
    padding: 1.2em;
}

.ui.card .extra.content {
    padding: 1em 1.2em;
    border-top: 1px solid rgba(34, 36, 38, 0.1);
    margin-top: auto;
}

/* Center rating, pricing, and view button elements */
.ui.card .extra.content .ui.grid {
    text-align: center;
}

.ui.card .extra.content .ui.grid .column {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui.card .extra.content .ui.grid .ten.wide.column {
    justify-content: center;
}

.ui.card .extra.content .ui.grid .six.wide.column {
    justify-content: center;
}

.ui.card .extra.content .ui.grid .six.wide.column.right.aligned {
    justify-content: center;
}

/* Center the rating stars and count */
.ui.card .extra.content .ui.small.rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ui.card .extra.content .ui.small.text {
    display: inline-block;
    margin-left: 0.5rem;
}

/* Center the pricing elements */
.ui.card .extra.content .ui.large.green.text {
    display: inline-block;
}

.ui.card .extra.content .ui.small.text.line-through {
    display: inline-block;
    margin-left: 0.5rem;
    text-decoration: line-through;
    text-decoration-color: #db2828;
    text-decoration-thickness: 2px;
    text-decoration-style: solid;
    color: #999;
    position: relative;
}

/* Enhanced strikethrough for original price */
.ui.card .extra.content .ui.small.text.line-through::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #db2828 0%, #e74c3c 100%);
    transform: translateY(-50%);
    z-index: 1;
}

/* Ensure the text appears above the line */
.ui.card .extra.content .ui.small.text.line-through {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 2px;
    border-radius: 2px;
}

/* Enhanced original price styling with prominent strikethrough */
.ui.card .extra.content .ui.small.text.original-price,
.ui.card .extra.content .ui.medium.text.original-price {
    display: inline-block;
    margin-left: 0.5rem;
    color: #555;
    position: relative;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.98);
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    font-size: 1.1em;
    font-weight: 600;
    border: 1px solid rgba(219, 40, 40, 0.2);
}

.ui.card .extra.content .ui.small.text.original-price::before,
.ui.card .extra.content .ui.medium.text.original-price::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 2px;
    background: linear-gradient(45deg, #db2828 0%, #e74c3c 50%, #c0392b 100%);
    transform: translateY(-50%) rotate(-20deg);
    z-index: 1;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(219, 40, 40, 0.3);
}

/* Center the view button */
.ui.card .extra.content .ui.mini.primary.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Additional centering improvements for product cards */
.ui.card .extra.content .sixteen.wide.column.center.aligned {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Ensure proper spacing between extra content sections */
.ui.card .extra.content + .extra.content {
    border-top: 1px solid rgba(34, 36, 38, 0.1);
}

/* Mobile responsive adjustments for centered elements */
@media (max-width: 768px) {
    .ui.card .extra.content .ui.grid .column {
        padding: 0.5rem 0;
    }
    
    .ui.card .extra.content .ui.small.rating {
        font-size: 0.9em;
    }
    
    .ui.card .extra.content .ui.large.green.text {
        font-size: 1.1em;
    }
    
    .ui.card .extra.content .ui.mini.primary.button {
        font-size: 0.8em;
        padding: 0.5rem 1rem;
    }
    
    /* Mobile styling for original price */
    .ui.card .extra.content .ui.small.text.original-price,
    .ui.card .extra.content .ui.medium.text.original-price {
        font-size: 0.95em;
        padding: 3px 6px;
        margin-left: 0.4rem;
        color: #444;
        background: rgba(255, 255, 255, 1);
        border: 1px solid rgba(219, 40, 40, 0.3);
        font-weight: 600;
    }
    
    .ui.card .extra.content .ui.small.text.original-price::before,
    .ui.card .extra.content .ui.medium.text.original-price::before {
        height: 1.5px;
        left: -1px;
        right: -1px;
        transform: translateY(-50%) rotate(-18deg);
        box-shadow: 0 1px 1px rgba(219, 40, 40, 0.2);
    }
}

/* Extra small devices - additional readability improvements */
@media (max-width: 480px) {
    .ui.card .extra.content .ui.small.text.original-price,
    .ui.card .extra.content .ui.medium.text.original-price {
        font-size: 0.9em;
        padding: 2px 4px;
        margin-left: 0.3rem;
        color: #333;
        background: #fff;
        border: 1px solid rgba(219, 40, 40, 0.4);
        font-weight: 700;
        letter-spacing: 0.5px;
    }
    
    .ui.card .extra.content .ui.small.text.original-price::before,
    .ui.card .extra.content .ui.medium.text.original-price::before {
        height: 1px;
        left: 0;
        right: 0;
        transform: translateY(-50%) rotate(-15deg);
        box-shadow: none;
    }
}

.ui.card .header {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

.ui.card .description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    margin-bottom: 1em;
}

.ui.card .meta {
    margin-bottom: 0.8em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5em;
}

/* Ribbon labels for discounts and stock status */
.ui.ribbon.label {
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

/* Button styling improvements */
.ui.two.fluid.buttons .button {
    border-radius: 6px !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ui.two.fluid.buttons .button:first-child {
    margin-right: 0.25em;
}

.ui.two.fluid.buttons .button:last-child {
    margin-left: 0.25em;
}

.ui.two.fluid.buttons .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ui.button.disabled,
.ui.button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Price display improvements */
.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

.price-main {
    font-weight: bold;
    font-size: 1.2em;
    color: #21ba45;
}

.price-original {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through;
    margin-top: 0.2em;
}

/* Stock display */
.ui.mini.statistic {
    text-align: center;
    min-width: 60px;
}

.ui.mini.statistic .value {
    font-size: 1em !important;
    font-weight: bold;
    color: #21ba45;
}

.ui.mini.statistic .label {
    font-size: 0.7em !important;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rating improvements */
.ui.mini.rating {
    font-size: 0.8em;
}

.ui.rating .icon {
    color: #f39c12;
}

/* 4-column grid improvements */
.ui.four.stackable.cards {
    margin: -0.875em;
}

.ui.four.stackable.cards .card {
    margin: 0.875em;
    width: calc(25% - 1.75em);
}

/* Desktop responsive adjustments for cards */
@media (max-width: 1200px) {
    .ui.four.stackable.cards .card {
        width: calc(33.333% - 1.75em);
    }
}

/* Mobile responsive adjustments for cards */
@media (max-width: 768px) {
    .ui.four.stackable.cards .card {
        width: calc(50% - 1.75em);
    }
    
    .ui.card .image img {
        height: 180px;
    }
    
    /* Force grid to stack properly on mobile */
    .ui.stackable.grid > .column {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .ui.four.stackable.cards .card {
        width: calc(100% - 1.75em);
    }
    
    .ui.card .image img {
        height: 200px;
    }
    
    .ui.two.fluid.buttons {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .ui.two.fluid.buttons .button {
        margin: 0 !important;
    }
}

/* Rating stars */
.ui.rating {
    margin: 0.5rem 0;
}

/* Product clickable area styling */
.product-clickable-area {
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-clickable-area:hover {
    opacity: 0.8;
}

/* Price styling */
.ui.green.large.text {
    font-weight: bold;
    font-size: 1.2em;
}

/* Button enhancements */
.ui.button {
    transition: all 0.2s ease;
}

.ui.button:hover {
    transform: translateY(-1px);
}

/* Search input */
.ui.icon.input {
    min-width: 200px;
}

/* Filter sidebar */
.ui.segment {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Statistics cards */
.ui.statistics .statistic {
    transition: all 0.3s ease;
}

.ui.statistics .statistic:hover {
    transform: scale(1.05);
}

/* Modal enhancements */
.ui.modal {
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Sidebar enhancements */
.ui.sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Table enhancements */
.ui.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form enhancements */
.ui.form .field > label {
    font-weight: 600;
    color: #333;
}

.ui.input {
    border-radius: 6px;
}

/* Dropdown enhancements */
.ui.dropdown {
    border-radius: 6px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ui.top.fixed.menu {
        padding: 0.5rem 0;
    }
    
    .ui.container {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }
    
    /* Make filter sidebar full width on mobile and stack above products */
    .ui.grid > .four.wide.column {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    .ui.grid > .twelve.wide.column {
        width: 100% !important;
    }
    
    /* Improve filter sidebar on mobile */
    .ui.grid > .four.wide.column .ui.segment {
        padding: 1rem;
    }
    
    .ui.grid > .four.wide.column .ui.form .field {
        margin-bottom: 1rem;
    }
    
    /* Mobile card adjustments */
    .ui.four.stackable.cards {
        margin: 0 !important;
    }
    
    .ui.four.stackable.cards .card {
        margin: 0.5rem 0 !important;
        width: 100% !important;
    }
    
    /* Mobile button improvements */
    .ui.two.fluid.buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5em;
    }
    
    .ui.two.fluid.buttons .button {
        flex: 1;
        margin: 0 !important;
        padding: 0.8em 0.5em !important;
        font-size: 0.9em !important;
        min-height: 44px; /* Touch-friendly minimum height */
    }
    
    /* Mobile form improvements */
    .ui.form .field input,
    .ui.form .field select,
    .ui.dropdown {
        min-height: 44px !important; /* Touch-friendly inputs */
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .ui.dropdown .menu {
        max-height: 200px;
        overflow-y: auto;
    }
    
    /* Improve card content spacing on mobile */
    .ui.card .content {
        padding: 1em !important;
    }
    
    .ui.card .extra.content {
        padding: 0.8em 1em !important;
    }
    
    .ui.card .header {
        font-size: 1em !important;
        line-height: 1.2 !important;
    }
    
    .ui.card .description {
        font-size: 0.85em !important;
        margin-bottom: 0.8em !important;
    }
    
    /* Mobile image adjustments */
    .ui.card .image img {
        height: 200px !important;
    }
    
    /* Mobile meta information */
    .ui.card .meta {
        margin-bottom: 0.6em !important;
        flex-wrap: wrap;
    }
    
    .ui.card .meta .ui.label {
        font-size: 0.8em !important;
        margin-bottom: 0.2em;
    }
    
    /* Mobile price display */
    .price-main {
        font-size: 1.1em !important;
    }
    
    .ui.mini.statistic {
        min-width: 50px !important;
    }
    
    .ui.mini.statistic .value {
        font-size: 0.9em !important;
    }
    
    .ui.mini.statistic .label {
        font-size: 0.6em !important;
    }
}

/* Tablet adjustments */
@media (max-width: 991px) and (min-width: 769px) {
    /* On tablets, keep sidebar but make it narrower */
    .ui.grid > .four.wide.column {
        width: 30% !important;
    }
    
    .ui.grid > .twelve.wide.column {
        width: 70% !important;
    }
    
    .ui.four.stackable.cards .card {
        width: calc(50% - 1rem) !important;
        margin: 0.5rem !important;
    }
}

/* Small tablet adjustments */
@media (max-width: 480px) {
    /* Even more compact on small phones */
    .ui.container {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }
    
    .ui.card {
        border-radius: 8px !important;
    }
    
    .ui.card .image img {
        height: 180px !important;
    }
    
    .ui.card .content {
        padding: 0.8em !important;
    }
    
    .ui.card .extra.content {
        padding: 0.6em 0.8em !important;
    }
    
    .ui.two.fluid.buttons .button {
        padding: 0.7em 0.4em !important;
        font-size: 0.85em !important;
    }
    
    .ui.card .header {
        font-size: 0.95em !important;
    }
    
    .ui.card .description {
        font-size: 0.8em !important;
    }
    
    /* Stack price and stock info vertically on very small screens */
    .ui.card .extra.content > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5em !important;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom color overrides */
.ui.blue.button {
    background-color: #2185d0;
}

.ui.blue.button:hover {
    background-color: #1678c2;
}

.ui.green.button {
    background-color: #21ba45;
}

.ui.green.button:hover {
    background-color: #16ab39;
}

.ui.red.button {
    background-color: #db2828;
}

.ui.red.button:hover {
    background-color: #c62828;
}

/* Header enhancements */
.ui.top.fixed.menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ui.top.fixed.menu .item {
    color: white !important;
    font-weight: 500;
}

.ui.top.fixed.menu .item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.ui.top.fixed.menu .item.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Logo styling */
.ui.top.fixed.menu .item strong {
    font-size: 1.2em;
    font-weight: 700;
}

/* Cart button styling */
#cart-button {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

#cart-button:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Search input styling */
.ui.icon.input input {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.ui.icon.input input:focus {
    background-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Main content spacing */
.pusher {
    padding-top: 60px;
}

/* Category cards */
.ui.card.fluid {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ui.card.fluid:hover {
    transform: translateY(-3px);
    border-color: #2185d0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Deal section styling */
.ui.red.inverted.segment {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 12px;
    padding: 2rem;
}

/* Admin table enhancements */
.ui.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.ui.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Form styling */
.ui.form .field input:focus,
.ui.form .field textarea:focus,
.ui.form .field select:focus {
    border-color: #2185d0;
    box-shadow: 0 0 0 2px rgba(33, 133, 208, 0.2);
}

/* Notification styling */
.ui.message {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Chart container */
canvas {
    border-radius: 8px;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.ml-2 { margin-left: 1rem; }
.mr-2 { margin-right: 1rem; }

.pt-2 { padding-top: 1rem; }
.pb-2 { padding-bottom: 1rem; }
.pl-2 { padding-left: 1rem; }
.pr-2 { padding-right: 1rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Print styles */
@media print {
    .ui.top.fixed.menu,
    .ui.sidebar,
    .ui.modal {
        display: none !important;
    }
    
    .pusher {
        padding-top: 0 !important;
    }
}

/* Additional Semantic UI overrides for better appearance */
.ui.menu {
    border-radius: 0;
}

.ui.card {
    border-radius: 8px;
    overflow: hidden;
}

.ui.card .content {
    padding: 1.5rem;
}

.ui.card .extra {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
}

.ui.segment {
    border: 1px solid #e1e8ed;
    background-color: white;
}

.ui.button {
    border-radius: 6px;
    font-weight: 500;
}

.ui.input {
    border-radius: 6px;
}

.ui.input input {
    border-radius: 6px;
}

.ui.dropdown .menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Product grid improvements */
.ui.four.cards {
    margin: 0 -0.5rem;
}

.ui.four.cards .card {
    margin: 0.5rem;
    width: calc(25% - 1rem);
}

/* Cart sidebar improvements */
.ui.right.sidebar {
    background-color: white;
    border-left: 1px solid #e1e8ed;
}

.cart-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 1.25rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Cart modal font size improvements */
#cart-modal .header {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    padding: 1.25rem 1.5rem !important;
}

#cart-modal .content {
    font-size: 1.05rem !important;
    padding: 1.25rem 1.5rem !important;
}

#cart-modal .ui.item .header {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

#cart-modal .ui.item .meta {
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem !important;
}

#cart-modal .ui.item .description {
    font-size: 1rem !important;
}

#cart-modal .actions {
    padding: 1.25rem 1.5rem !important;
}

#cart-modal #cart-total {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
}

#cart-modal .ui.primary.button {
    font-size: 1.1rem !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 600 !important;
}

/* Search results styling */
.search-results {
    margin-top: 2rem;
}

.search-results .ui.card {
    margin-bottom: 1rem;
}

/* Filter sidebar */
.filter-sidebar {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.filter-sidebar .ui.header {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Price range slider */
.ui.range {
    margin: 1rem 0;
}

/* Category filter */
.category-filter .ui.checkbox {
    margin: 0.5rem 0;
}

/* Sort dropdown */
.sort-dropdown {
    margin-bottom: 1rem;
}

/* Product image container */
.product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.product-image img {
    transition: transform 0.3s ease;
}

.ui.card:hover .product-image img {
    transform: scale(1.05);
}

/* Sale badge */
.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #db2828;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Stock status */
.stock-status {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.stock-status.in-stock {
    color: #21ba45;
}

.stock-status.low-stock {
    color: #f2711c;
}

.stock-status.out-of-stock {
    color: #db2828;
}

/* Rating display */
.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.rating-display .ui.rating {
    margin: 0;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

/* Price display */
.price-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.sale-price {
    color: #db2828;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Add to cart button */
.add-to-cart-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Cart total */
.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    padding: 1rem 0;
    border-top: 2px solid #e1e8ed;
    margin-top: 1rem;
}

/* Empty cart message */
.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-cart .ui.icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner .ui.loader {
    margin: 0;
}

/* Error message */
.error-message {
    background-color: #fff6f6;
    border: 1px solid #e0b4b4;
    color: #9f3a38;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Success message */
.success-message {
    background-color: #fcfff5;
    border: 1px solid #a3c293;
    color: #2c662d;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Info message */
.info-message {
    background-color: #f8ffff;
    border: 1px solid #a9d5de;
    color: #276f86;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* ===== CHECKOUT RESPONSIVE STYLES ===== */

/* Checkout page specific styles */
.checkout-step {
    transition: all 0.3s ease;
}

.checkout-step.hidden {
    display: none !important;
}

/* Checkout page font size improvements */
.checkout-step h2.ui.header {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
}

.checkout-step .ui.segment {
    padding: 1.5rem !important;
    font-size: 1.05rem !important;
}

.checkout-step .ui.form .field label {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}

.checkout-step .ui.form .field input,
.checkout-step .ui.form .field select,
.checkout-step .ui.form .field textarea {
    font-size: 1.05rem !important;
    padding: 0.875rem !important;
}

.checkout-step .ui.button {
    font-size: 1.1rem !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 600 !important;
}

.field.error input {
    border-color: #e0b4b4 !important;
    background: #fff6f6 !important;
}

.error-message {
    margin-top: 0.5rem !important;
}

/* Progress steps responsive */
@media (max-width: 768px) {
    .ui.four.ordered.steps {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
        margin-bottom: 2rem !important;
    }
    
    .ui.four.ordered.steps .step {
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem !important; /* Increased from 0.75rem */
        border-radius: 8px !important;
        background: #f8f9fa;
        border: 1px solid #e1e8ed;
    }
    
    .ui.four.ordered.steps .step.active {
        background: #e3f2fd;
        border-color: #2185d0;
    }
    
    .ui.four.ordered.steps .step .content {
        text-align: center;
    }
    
    .ui.four.ordered.steps .step .title {
        font-size: 1.1rem !important; /* Increased from 0.9rem */
        font-weight: 600;
        line-height: 1.4 !important;
    }
    
    .ui.four.ordered.steps .step .description {
        font-size: 0.95rem !important; /* Increased from 0.8rem */
        margin-top: 0.5rem;
        line-height: 1.4 !important;
    }
}

/* Checkout grid responsive */
@media (max-width: 768px) {
    .ui.grid .twelve.wide.column {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
    
    .ui.grid .four.wide.column {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Order summary becomes full width on mobile */
    .ui.grid .four.wide.column .ui.segment {
        position: static !important;
        margin-bottom: 1rem;
    }
}

/* Form fields responsive */
@media (max-width: 768px) {
    .ui.form .two.fields {
        flex-direction: column !important;
    }
    
    .ui.form .two.fields .field {
        width: 100% !important;
        margin-bottom: 1.25rem !important;
    }
    
    .ui.form .three.fields {
        flex-direction: column !important;
    }
    
    .ui.form .three.fields .field {
        width: 100% !important;
        margin-bottom: 1.25rem !important;
    }
    
    .ui.form .field input,
    .ui.form .field select,
    .ui.form .field textarea {
        font-size: 18px !important; /* Increased from 16px for better readability */
        padding: 1rem !important; /* Increased padding for better touch targets */
        border-radius: 8px !important;
        line-height: 1.5 !important;
    }
    
    .ui.form .field label {
        font-size: 1.05rem !important; /* Increased from 0.9rem */
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.4 !important;
    }
}

/* Button layout responsive */
@media (max-width: 768px) {
    .ui.basic.segment .ui.grid {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .ui.basic.segment .ui.grid .column {
        width: 100% !important;
        text-align: center !important;
    }
    
    .ui.basic.segment .ui.grid .eight.wide.column {
        width: 100% !important;
    }
    
    .ui.button {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }
    
    .ui.primary.button {
        background: #2185d0 !important;
        color: white !important;
    }
    
    .ui.primary.button:hover {
        background: #1678c2 !important;
    }
}

/* Order summary responsive */
@media (max-width: 768px) {
    #order-summary {
        max-height: 250px;
        overflow-y: auto;
        border: 1px solid #e1e8ed;
        border-radius: 8px;
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        font-size: 1.05rem !important;
    }
    
    .ui.relaxed.list .item {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .ui.relaxed.list .item:last-child {
        border-bottom: none;
    }
    
    .ui.relaxed.list .item .content .header {
        font-size: 1.1rem !important; /* Increased from 0.9rem */
        font-weight: 600;
        line-height: 1.4 !important;
    }
    
    .ui.relaxed.list .item .right.floated.content {
        font-weight: 600;
        color: #21ba45;
        font-size: 1.1rem !important;
    }
    
    #total-amount {
        font-size: 1.5rem !important; /* Increased from 1.2rem */
        font-weight: bold !important;
    }
    
    /* Order summary sidebar header */
    .four.wide.column .ui.segment h3.ui.header {
        font-size: 1.4rem !important;
        font-weight: 600 !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Order summary totals */
    .ui.relaxed.list .item .content .header {
        font-size: 1.05rem !important;
    }
    
    .ui.relaxed.list .item .right.floated.content span {
        font-size: 1.1rem !important;
    }
}

/* Cart items responsive */
@media (max-width: 768px) {
    #checkout-cart-items .ui.divided.items {
        gap: 1rem;
    }
    
    #checkout-cart-items .item {
        flex-direction: column !important;
        text-align: center;
        padding: 1.25rem !important;
        border: 1px solid #e1e8ed !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
    }
    
    #checkout-cart-items .item .image {
        width: 100% !important;
        max-width: 150px !important;
        margin: 0 auto 1rem auto !important;
    }
    
    #checkout-cart-items .item .content {
        width: 100% !important;
        text-align: center;
    }
    
    #checkout-cart-items .item .header {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    #checkout-cart-items .item .meta {
        justify-content: center !important;
        margin-bottom: 0.75rem !important;
        font-size: 1.15rem !important; /* Increased from 1.05rem for better visibility */
        font-weight: 600 !important; /* Make it bolder */
    }
    
    #checkout-cart-items .item .description {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.5 !important;
    }
    
    #checkout-cart-items .item .extra {
        justify-content: center !important;
    }
    
    /* Trash icon on mobile checkout step 1 */
    #checkout-cart-items .cart-item-remove {
        padding: 0.3em 0.5em !important; /* Smaller padding */
        font-size: 0.65em !important; /* Much smaller on mobile */
        min-width: 28px !important; /* Smaller size */
        min-height: 28px !important; /* Smaller size */
        max-width: 30px !important; /* Limit maximum size */
        max-height: 30px !important; /* Limit maximum size */
    }
    
    #checkout-cart-items .cart-item-remove .icon {
        font-size: 0.65em !important; /* Much smaller icon */
        width: 0.7em !important;
        height: 0.7em !important;
        line-height: 1 !important;
    }
    
    /* Increase price font size on mobile checkout */
    #checkout-cart-items .cart-item-price {
        font-size: 1.35em !important; /* Larger on mobile */
        font-weight: 700 !important;
    }
    
    #checkout-cart-items .cart-item-row .cart-item-price {
        font-size: 1.45em !important; /* Even larger for total */
    }
}

/* Payment section responsive */
@media (max-width: 768px) {
    .ui.info.message,
    .ui.warning.message,
    .ui.positive.message {
        padding: 1.25rem !important; /* Increased from 1rem */
        margin-bottom: 1.25rem !important;
        border-radius: 8px !important;
        font-size: 1.05rem !important;
    }
    
    .ui.info.message .header,
    .ui.warning.message .header,
    .ui.positive.message .header {
        font-size: 1.2rem !important; /* Increased from 1rem */
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    .ui.info.message p,
    .ui.warning.message p,
    .ui.positive.message p {
        font-size: 1.05rem !important; /* Increased from 0.9rem */
        line-height: 1.5 !important;
    }
    
    #paypal-button-container {
        margin: 1.25rem 0 !important;
        text-align: center;
    }
    
    #paypal-button-container > div {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    /* Terms checkbox styling */
    #terms-checkbox-container label {
        font-size: 1.05rem !important;
        line-height: 1.5 !important;
    }
}

/* Security badge responsive */
@media (max-width: 768px) {
    .ui.center.aligned.basic.segment .ui.green.label {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    .ui.center.aligned.basic.segment .ui.tiny.text {
        font-size: 0.8rem !important;
        margin-top: 0.75rem !important;
        line-height: 1.3 !important;
    }
}

/* Confirmation step responsive */
@media (max-width: 768px) {
    .ui.center.aligned.basic.segment .huge.check.circle.icon {
        font-size: 4rem !important;
        margin-bottom: 1rem !important;
    }
    
    .ui.center.aligned.basic.segment h2.ui.header {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .ui.center.aligned.basic.segment .ui.large.text {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .ui.center.aligned.basic.segment .ui.message {
        padding: 1rem !important;
        margin: 1rem 0 !important;
    }
    
    .ui.center.aligned.basic.segment .ui.message .header {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .ui.center.aligned.basic.segment .ui.message p {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Header responsive */
@media (max-width: 768px) {
    .ui.top.fixed.menu {
        padding: 0.5rem 0 !important;
    }
    
    .ui.top.fixed.menu .ui.container {
        padding: 0 1rem !important;
    }
    
    .ui.top.fixed.menu .item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    .ui.top.fixed.menu .item i.icon {
        margin-right: 0.5rem !important;
    }
    
    .ui.top.fixed.menu .item strong {
        font-size: 1rem !important;
    }
}

/* Container responsive */
@media (max-width: 768px) {
    .ui.container {
        padding: 0 1rem !important;
    }
    
    .pusher {
        padding-top: 70px !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .ui.container {
        padding: 0 0.75rem !important; /* Increased from 0.5rem */
    }
    
    .ui.top.fixed.menu .ui.container {
        padding: 0 0.75rem !important; /* Increased from 0.5rem */
    }
    
    .ui.form .field input,
    .ui.form .field select,
    .ui.form .field textarea {
        padding: 1rem !important; /* Increased from 0.875rem */
        font-size: 18px !important; /* Prevents zoom on iOS and improves readability */
    }
    
    .ui.button {
        padding: 1.125rem 1.25rem !important; /* Increased padding */
        font-size: 1.15rem !important; /* Increased from 1.1rem */
        font-weight: 600 !important;
        min-height: 48px !important; /* Better touch target */
    }
    
    /* Trash icon button on extra small devices */
    .cart-item-remove {
        padding: 0.35em 0.55em !important;
        font-size: 0.8rem !important; /* Smaller on very small screens */
        min-width: 32px !important;
        min-height: 32px !important;
    }
    
    .cart-item-remove .icon {
        font-size: 0.75em !important; /* Even smaller icon */
        width: 0.8em !important;
        height: 0.8em !important;
    }
    
    /* Checkout cart items trash icon on extra small devices */
    #checkout-cart-items .cart-item-remove {
        padding: 0.3em 0.5em !important;
        font-size: 0.6em !important; /* Even smaller on very small screens */
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 28px !important;
        max-height: 28px !important;
    }
    
    #checkout-cart-items .cart-item-remove .icon {
        font-size: 0.6em !important;
        width: 0.65em !important;
        height: 0.65em !important;
        line-height: 1 !important;
    }
    
    /* Price font size on extra small devices */
    #checkout-cart-items .cart-item-price {
        font-size: 1.3em !important;
    }
    
    #checkout-cart-items .cart-item-row .cart-item-price {
        font-size: 1.4em !important;
    }
    
    .ui.four.ordered.steps .step {
        padding: 1.125rem !important; /* Increased from 1rem */
    }
    
    .ui.four.ordered.steps .step .title {
        font-size: 1.15rem !important; /* Increased from 1rem */
    }
    
    .ui.four.ordered.steps .step .description {
        font-size: 1rem !important; /* Increased from 0.85rem */
    }
    
    /* Checkout step headers on small screens */
    .checkout-step h2.ui.header {
        font-size: 1.5rem !important;
    }
    
    /* Cart modal on small screens */
    #cart-modal .header {
        font-size: 1.35rem !important;
    }
    
    #cart-modal .ui.item .header {
        font-size: 1.1rem !important;
    }
    
    #cart-modal #cart-total {
        font-size: 1.35rem !important;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .ui.grid .twelve.wide.column {
        width: 66.66666667% !important;
    }
    
    .ui.grid .four.wide.column {
        width: 33.33333333% !important;
    }
    
    .ui.four.ordered.steps .step .title {
        font-size: 0.85rem !important;
    }
    
    .ui.four.ordered.steps .step .description {
        font-size: 0.75rem !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ui.button,
    .ui.form .field input,
    .ui.form .field select,
    .ui.form .field textarea {
        border-width: 0.5px;
    }
}

/* Print styles for checkout */
@media print {
    .ui.top.fixed.menu,
    .ui.button,
    #paypal-button-container {
        display: none !important;
    }
    
    .pusher {
        padding-top: 0 !important;
    }
    
    .ui.segment {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .checkout-step {
        page-break-inside: avoid;
    }
}

/* Cart item row for price and delete button */
.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    gap: 1rem;
}
.cart-item-price {
    font-size: 1.25em; /* Increased from 1.15em */
    font-weight: bold;
    color: #333;
}

/* Desktop cart and checkout font improvements */
@media (min-width: 769px) {
    /* Cart modal desktop */
    #cart-modal .header {
        font-size: 1.6rem !important;
    }
    
    #cart-modal .ui.item .header {
        font-size: 1.2rem !important;
    }
    
    #cart-modal .ui.item .meta {
        font-size: 1.1rem !important;
    }
    
    #cart-modal #cart-total {
        font-size: 1.5rem !important;
    }
    
    /* Checkout desktop */
    .checkout-step h2.ui.header {
        font-size: 2rem !important;
    }
    
    .checkout-step .ui.form .field label {
        font-size: 1.1rem !important;
    }
    
    .checkout-step .ui.form .field input,
    .checkout-step .ui.form .field select,
    .checkout-step .ui.form .field textarea {
        font-size: 1.1rem !important;
    }
    
    /* Order summary desktop */
    .four.wide.column .ui.segment h3.ui.header {
        font-size: 1.5rem !important;
    }
    
    .ui.relaxed.list .item .content .header {
        font-size: 1.1rem !important;
    }
    
    #total-amount {
        font-size: 1.6rem !important;
    }
}
.cart-item-remove {
    padding: 0.3em 0.5em !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 1.1em !important;
    border-radius: 6px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-remove .icon {
    margin: 0 !important;
}

/* Checkout step 1 - Cart Review - Remove icon sizing */
#checkout-cart-items .cart-item-remove {
    padding: 0.3em 0.5em !important; /* Smaller padding */
    font-size: 0.7em !important; /* Much smaller icon size */
    min-width: 30px !important; /* Smaller button */
    min-height: 30px !important; /* Smaller button */
    max-width: 32px !important; /* Limit maximum size */
    max-height: 32px !important; /* Limit maximum size */
}

#checkout-cart-items .cart-item-remove .icon {
    font-size: 0.7em !important; /* Much smaller icon */
    width: 0.75em !important;
    height: 0.75em !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Increase price font size in checkout for better visibility */
#checkout-cart-items .cart-item-price {
    font-size: 1.4em !important; /* Increased from 1.25em */
    font-weight: 700 !important; /* Bolder */
    color: #333 !important;
}

#checkout-cart-items .cart-item-row .cart-item-price {
    font-size: 1.5em !important; /* Even larger for the total price */
    font-weight: 700 !important;
}

/* Center the Total row in the order summary */
#order-summary .order-total-row,
.four.wide.column .ui.segment .item.order-total-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
#order-summary .order-total-row .header,
#order-summary .order-total-row .right.floated.content {
    text-align: center !important;
    width: auto !important;
    float: none !important;
}
#order-summary .order-total-row .ui.large.green.text {
    font-size: 1.3em !important;
    font-weight: bold !important;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .cart-item-row {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        font-size: 1.1rem !important; /* Increased from 1em */
    }
    .cart-item-price {
        font-size: 1.2rem !important; /* Increased from 1em */
        font-weight: 600 !important;
    }
    .cart-item-remove {
        padding: 0.3em 0.5em !important; /* Reduced padding */
        font-size: 0.75rem !important; /* Reduced from 0.85rem */
        width: auto !important;
        min-width: 32px !important; /* Smaller but still touchable */
        min-height: 32px !important; /* Smaller but still touchable */
        max-width: 34px !important; /* Limit maximum size */
        max-height: 34px !important; /* Limit maximum size */
        flex: 0 0 auto !important;
        box-sizing: content-box !important;
    }
    
    .cart-item-remove .icon {
        font-size: 0.7em !important; /* Smaller icon */
        width: 0.75em !important;
        height: 0.75em !important;
        line-height: 1 !important;
    }
    #order-summary .order-total-row {
        font-size: 1.2rem !important; /* Increased from 1.1em */
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Cart attributes on mobile */
    .cart-attributes {
        font-size: 1rem !important;
        padding: 0.75em 1em !important;
    }
    
    .cart-attribute-pill {
        font-size: 1rem !important;
        padding: 0.4em 0.9em 0.4em 0.5em !important;
    }
}

.color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #eee;
    margin-right: 4px;
    vertical-align: middle;
    box-sizing: border-box;
}

.cart-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    background: #f7fafd;
    border-radius: 8px;
    padding: 0.5em 0.75em;
    margin: 0.5em 0 0.5em 0;
    align-items: center;
    min-height: 36px;
}

/* Center attributes in checkout */
#checkout-cart-items .cart-attributes {
    justify-content: center !important; /* Center the attributes */
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Ensure attribute pills are centered within the container */
#checkout-cart-items .cart-attribute-pill {
    margin-left: 0.1em !important;
    margin-right: 0.1em !important;
}
.cart-attribute-pill {
    display: flex;
    align-items: center;
    background: #eaf3fb;
    border-radius: 16px;
    padding: 0.2em 0.8em 0.2em 0.4em;
    font-size: 0.97em;
    color: #2563eb;
    font-weight: 500;
    margin-right: 0.2em;
    margin-bottom: 0.2em;
    box-shadow: 0 1px 2px rgba(33,133,208,0.04);
    border: 1px solid #dbeafe;
    transition: background 0.2s;
}
.cart-attribute-pill .color-swatch {
    margin-right: 0.5em;
    border: 2px solid #dbeafe;
    width: 20px;
    height: 20px;
}
.cart-attribute-label {
    font-size: 1.05em; /* Increased from 0.97em */
    color: #2563eb;
    font-weight: 500;
}

/* Additional cart item improvements */
#checkout-cart-items .item .header {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

#checkout-cart-items .item .meta {
    font-size: 1.15rem !important; /* Increased from 1.1rem for better visibility */
    font-weight: 600 !important; /* Make it bolder */
}

#checkout-cart-items .item .description {
    font-size: 1.05rem !important;
}

/* Order summary improvements */
.four.wide.column .ui.segment {
    font-size: 1.05rem !important;
}

.four.wide.column .ui.segment h3.ui.header {
    font-size: 1.4rem !important;
    margin-bottom: 1.25rem !important;
}

.ui.relaxed.list .item .content .header {
    font-size: 1.1rem !important;
}

.ui.relaxed.list .item .right.floated.content {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
}

#total-amount {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}